Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Support the virtualKeyboard on non touch-device #3796
Now when opening a widget with the virtualkeyboard, the focus is first on the keyboard, then press
My solution is to change the order of the widget. The last one (on top) will be the virtualkeybard so it catch all the keybinding, and below it, make the dialog
There is still some visual weirdness with the focus on the keyboard but it's not a problem.
referenced this pull request
Mar 25, 2018
changed the title from
[WIP] Support the virtualKeyboard on non touch-device
Support the virtualKeyboard on non touch-device
Mar 25, 2018
Had a quick try on the emulator, did not notice side effects.
You can remove/comment these to make the emulator behave a bit more like a pure touch device:
Mar 30, 2018
1 check passed
This was referenced
Mar 30, 2018
(I'm taking the lazy route of just sending keyboard events. It could always be changed later.)
Would you by any chance mind looking at it and proposing some changes?
Also, what exactly is the difference between press and enter? Basically I feel that you have the best handle on this. I have a BeBook 2, but it doesn't run KOReader. ;-)
Yes Press and Enter, I supposed that Enter was legacy since it was not used a lot. I thinked about modifiyng all the keybindinds so they do the same thing, but that useless and it already work.
Actually, with 4 directions,
Alright, in that case I would propose to:
if button == SDL.SDL_CONTROLLER_BUTTON_A then -- send enter genEmuEvent(ffi.C.EV_KEY, 40, 1) -- send end (bound to press) genEmuEvent(ffi.C.EV_KEY, 77, 1)
Anyway, it's mainly the simplifying/deprecating stuff that I'm worried about messing up for no-touch Kindle. Remapping the emulator bindings is otherwise inconsequential.
Souldn't break anything on my side, I'm already using press for everything
on SDL? I'm already doing this on my git version, so much better.
I don't think typing work anymore, I think I broke it, will look into it.
Sorry I forgot, the
I have no idea if that ever worked. My point is more that it shouldn't do weird things.
I'll await the PR. :-)
No, about things like merging Press and Enter into a single event if that is indeed a thing that makes sense, and using Enter instead of End.
I'd also either switch the menu trigger from F1 to context menu or add context menu as an alternative, but all that kind of stuff is much less relevant although I'd appreciate some help in that area. But just remapping won't potentially break anything on Kindle.
We shouldn't confuse the name of the event with what it actually does. In browsers with bad UX backspace still doesn't perform the behavior of Escape and Ctrl+W.
Backspace to close the keyboard is not even funny. That being said, it's not as bad as accidentally losing focus in a browser and pressing backspace so you lose what you were typing.
The direct equivalent to some browser's behavior would be previous page/location.