Author Topic: How to leave keyboard always opened with UIInput?  (Read 3496 times)

IZLogic

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
    • IZLogic!
How to leave keyboard always opened with UIInput?
« on: January 31, 2013, 10:32:55 AM »
Hello,
My question is in the title, for my new words game I need the keyboard will be always opened and active during the game also when the user press the Done/Enter button or touch elsewhere on the screen.
I need it because the user will write more than 1 word and I don't want the keyboard desappear and re-open all the time, but I still need to catch the word submission by return or done.

So I had a look at UIInput class and around lines 200 I found where the keyboard is opened, but I cannot understand how to stop hiding.
Could anyone please help me on this?
Thanks,
IZLogic

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to leave keyboard always opened with UIInput?
« Reply #1 on: February 01, 2013, 01:02:20 AM »
Keyboard will always hide on submit. You can give focus to another input field right after to make it pop back up, however.

Anything else -- and you will need to modify UIInput to suit your needs.

hexaust

  • Newbie
  • *
  • Thank You
  • -Given: 14
  • -Receive: 1
  • Posts: 35
    • View Profile
Re: How to leave keyboard always opened with UIInput?
« Reply #2 on: August 28, 2014, 01:55:47 AM »
There should be an option in UIInput to decide this behaviour. For example in a chat or IM like application the keyboard should remain on screen after submit.

hexaust

  • Newbie
  • *
  • Thank You
  • -Given: 14
  • -Receive: 1
  • Posts: 35
    • View Profile
Re: How to leave keyboard always opened with UIInput?
« Reply #3 on: August 28, 2014, 03:42:30 AM »
Anyone managed to stop hiding the keyboard on submit? Can you explain how you did that?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to leave keyboard always opened with UIInput?
« Reply #4 on: August 28, 2014, 09:11:31 PM »
When you submit, the keyboard gets closed -- just how Unity works here. You can re-open it later. In your OnSubmit notification, set isSelected to false then back to true.

alschwank

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 1
    • View Profile
Re: How to leave keyboard always opened with UIInput?
« Reply #5 on: June 15, 2016, 04:41:37 PM »
Hi,

I have the same issue as hexaust. Is there now a way to keep the keyboard permanently open?

Thanks,
Alex

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: How to leave keyboard always opened with UIInput?
« Reply #6 on: June 16, 2016, 04:01:51 AM »
Hi,

I have the same issue as hexaust. Is there now a way to keep the keyboard permanently open?

Thanks,
Alex
That's a question for Unity.