Closed LiamFry closed 3 years ago
Hi @LiamFry!
It appears that the keyAction
definitions for those custom buttons are missing. See https://github.com/Mottie/Keyboard/wiki/Actions
Thank you! I didn't realize I needed an keyAction
handler. My custom keys (?) are now appearing. I'm using insertText()
to insert the text I want. But for some reason, the keyboard is not longer "smart enough" to know that ct
was entered with one key and therefore should have its two characters deleted on ⌫
My input is a bit odd (I'm using fractional weights, e.g. 3-⅜ lb) so when I rubout the 'lb' I need to go back two chars; the same for getting rid of the -⅜
. So the fact that ct
isn't auto-deleted on ⌫
is no biggie; I have to implement a special bksp
action so as it is. I also need to implement some custom data during editing that survives callbacks and event handlers; I found that I can put a custom property into the keyboard definition object then access it in a key action handler via base.options.myObj.myProp
I have no idea what you call a custom key label that you place between { and } ...
My HTML element:
<input id="item-quantity" class="shorter nudge-up" type="text" val="" size="8" readonly/>
My Virtual Keyboard code:
When my keyboard is displayed, none of the fractionals render.
As shown in the fractional demo, I also tried
$.keyboard.layouts.numpad = { ... }
and usingnumpad
as my layout. The results are the same. If I use a literal Unicode character - or its code point equivalent (\uXXXX), all is fine. I've also tried'default'
instead ofnormal
: no difference..