ZeroPhone / ZPUI

Official ZeroPhone UI framework, based on pyLCI
http://zpui.rtfd.org/
Apache License 2.0
78 stars 19 forks source link

[Discussion] Changing KEY_{NUMBER} keys to KEY_KP{NUMBER} keys #137

Open CRImier opened 5 years ago

CRImier commented 5 years ago

I'm thinking about the QWERTY keyboard compatibility. The ZPUI input system, by and large, uses Linux input keycode names, so there's no fundamental incompatibility between current input devices and QWERTY keyboards. However, there's a small problem - we can't quite unite the ZPUI keypad-suitable (NumpadCharInput) and QWERTY-suitable (NumpadKeyboardInput) UI elements into one, because the number keys (KEY_{NUMBER}) conflict, they allow input of characters for the first UI element but input of numbers for the last one. In order to merge two UI elements into one (which I think is the preferred way of QWERTY-keypad coexistence), we need to somehow resolve that conflict. For now, I was thinking about changing the ZeroPhone keypad's keycodes from codes like KEY_0 to QWERTY keyboard numpad codes, like KEY_KP0. That would allow us to use the ZP keypad and QWERTY keyboards seamlessly in a single UI element. However, it's a change that touches a lot of ZPUI internals, and its impact needs to be considered better.