ok, weirdly if I just do `window.addEventListener('Input'...` on my phone I can see the input events (but nothing for enter), but I see no input events at all if I use the same listener on my computer. Gonna try looking for keypress events instead.
-
-
-
Replying to @mwichary @Miller_Geek
I only listen to keydown for Enter, not on mobile. For letters etc., I listen to keydown on desktop, and input on mobile.
1 reply 0 retweets 0 likes -
Replying to @mwichary @Miller_Geek
So it really can’t work in the current setup. I think I’d need to add keydown to the mirror input field to intercept Enter.
2 replies 0 retweets 0 likes -
-
Replying to @mwichary
That works much better. The input field itself is still a single line, but the segmented type appears on multiple lines
1 reply 0 retweets 0 likes -
Replying to @Miller_Geek
Yeah, the mirroring technique is a hack, but it allows to try out new things. Seems more healthy than building a soft keyboard in HTML!
1 reply 0 retweets 1 like -
Replying to @mwichary @Miller_Geek
However, since I just saw
@slightlylate passing by this thread… any chance for a Virtual Keyboard API in HTML? :·)1 reply 0 retweets 1 like -
Replying to @mwichary @Miller_Geek
Would it model a second kbd? How would layout be provided? /cc
@RickByers1 reply 0 retweets 0 likes -
Not sure I understand the questions. Here’s what I was thinking of: a) a way to invoke/close the soft keyboard whenever I want, and listen to its input b) a better way to measure how the keyboard occupies the screen space
2 replies 0 retweets 1 like
Both of the above I had to do in a rather hacky way in the demo above. (I can explain more if that’s helpful.) I *think* that’s the only way to do it now, but I might be wrong?
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.