NiGui
NiGui copied to clipboard
Not all keys implemented
Keys on the numberpad with or without Numlock do not trigger any key.events. so pressing on the Enter key on the numpad of a full size keyboard would yield:
Window Key Down event: key: 65421(invalid data!) ...
and similar for the other keys there.
Yes, the numpad keys needs to be added in the implementation.
in addition, most of the symbol key and all of the function keys are also invalid.
@qqtop, @sk-Prime: I have implemented most of the keys now. Please test which keys are still missing or work wrong, which probably depends on keyboard layout. I tested only with German keyboard layout.
this keys and their shift version are not working (shift version is after '|') i made a patch quote left to caps lock should work now
- quote left : ` | ~
- quote right : ' | "
- bracket left : [ | {
- bracket right : ] | }
- semicolon : ; | :
- caps lock
- AltL and AltR
- f10
in regards f10
, take a look here Docs Microsoft WM_KEYDOWN
If the F10 key is pressed, the DefWindowProc function sets an internal flag. When DefWindowProc receives the WM_KEYUP message, the function checks whether the internal flag is set and, if so, sends a WM_SYSCOMMAND message to the top-level window. The WM_SYSCOMMAND parameter of the message is set to SC_KEYMENU.
I am testing this on a Corsair K68 mechanical keyboard with US layout on linux.
sk-Prime's list works fine here , having said that, some key combinations
do emit the (invalid data!) notice in the example_06_keyboard_events.nim
program. E.g. here this key shows the notice ,however, works ok /|?
The numpad works fine now.
i tested that in acer windows laptop. i don't know how you managed to work. in nigui.nim
there is no Key_CapsLock
thus i added it as Key_CapsLock = 20
and then it works in my laptop. same goes to other key which i mentioned above.
@sk-Prime: Thanks for the hint. I have added Key_CapsLock now.
Key_QuoteLeft = 192 ` Key_QuoteRight = 222 ' Key_BracketLeft = 219 [ Key_BracketRight = 221 ] Key_Semicolon = 186 ;
add this keys too.
Related commit: https://github.com/trustable-code/NiGui/commit/4d79522d656684524766f77f8538403e7449fe18
` ´
Seems to also not work (tested on windows on a german keyboard with deadkeys)