Yup, it's working now!
-
-
Replying to @Miller_Geek @mwichary
Interestingly newlines work on desktop but not mobile. This includes using chrome dev tools to send "enter" from my laptop keyboard.
1 reply 0 retweets 0 likes -
-
Replying to @mwichary
I think I can put in a listener to find out. Give me a minute.
1 reply 0 retweets 0 likes -
Replying to @Miller_Geek @mwichary
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.
1 reply 0 retweets 0 likes -
-
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
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!
-
-
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 - Show replies
New conversation -
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.