Keyboard icon indicating copy to clipboard operation
Keyboard copied to clipboard

Enable/Disable Keyboard Function Programmatically

Open joeclarkia opened this issue 1 year ago • 0 comments

I would like to have a checkbox menu item on my web site to "Use Virtual Keyboard" or not. So, I'm searching for a way to disable its visibility (not just disable the controls, so not just toggle()). Somewhat surprisingly, I don't see any way to do this.

The obvious mechanism I tried is:

  • Enable: $("#id").keyboard().getkeyboard().options["openOn"] = "touchstart"
  • Disable: $("#id").keyboard().getkeyboard().options["openOn"] = ""

But this doesn't do anything -- apparently the option is only useful during initialization.

Are there any other mechanisms available short of destroy()ing and rebuilding the keyboard (I have a lot of input fields, with different custom layouts, so that doesn't seem very efficient) ?

joeclarkia avatar Sep 01 '23 14:09 joeclarkia