2

Does anybody know a way to change the Android keyboard type that is displayed (search, numerical, password, autocomplete etc) while it is displayed?

Not the IME type, rather the input mask for lack of a better term.

Specifically I am looking to extend the PhoneGap SoftKeyboard plugin with the ability to change keyboard types via JS as I am getting inconsistent keyboards in my application.

If anybody has any example code for switching the keyboard layout (not the IME or actual keyboard vendor) I would really appreciate it.

Many thanks

darryn.ten
  • 6,784
  • 3
  • 47
  • 65

1 Answers1

2

It depends on the type of the input field. See this thread :

Getting Search Keyboard on iPhone using PhoneGap

Community
  • 1
  • 1
Titouan de Bailleul
  • 12,920
  • 11
  • 66
  • 121
  • The problem I'm encountering is that if the input takes focus before jquery has styled it the keyboard works fine and is of the search type, but if the input takes focus after jquery has styled it then I get a different keyboard where the enter button is a return key - what I'm really looking for is a way to switch keyboard layouts at will – darryn.ten Feb 24 '12 at 09:29
  • 1
    Could you add the code to your previous post so when test what you did and try to make it work ? – Titouan de Bailleul Feb 24 '12 at 09:30
  • My colleague has been working on the problem from a different angle, here is is more verbose explanation of the problem http://stackoverflow.com/questions/9248109/input-error-with-keyboard-on-galaxy-s2-using-jquery-mobile-and-phonegap – darryn.ten Feb 24 '12 at 09:37