diff options
| author | trustable-code <krauter.simon@arcor.de> | 2019-09-02 23:20:15 +0200 |
|---|---|---|
| committer | trustable-code <krauter.simon@arcor.de> | 2019-09-02 23:20:15 +0200 |
| commit | dfa771aa27c24e05b87f99afb16cb2aa5ea46cab (patch) | |
| tree | 022009fdd43f57f427731a6d0f79f25f05f030b1 /src/nigui | |
| parent | 77c16099f12e76ef7dddaf4270e0ec5c177c429f (diff) | |
| download | NiGui-dfa771aa27c24e05b87f99afb16cb2aa5ea46cab.tar.gz NiGui-dfa771aa27c24e05b87f99afb16cb2aa5ea46cab.zip | |
Add Key_NumpadEnter
/run/media/user/server_hdd_3tb_1/Simon/Main/Develop/ActPub/NiGui/repo--/src/nigui.nim
Diffstat (limited to 'src/nigui')
| -rwxr-xr-x | src/nigui/private/gtk3/platform_impl.nim | 1 | ||||
| -rwxr-xr-x | src/nigui/private/windows/platform_impl.nim | 5 | ||||
| -rwxr-xr-x | src/nigui/private/windows/windows.nim | 1 |
3 files changed, 7 insertions, 0 deletions
diff --git a/src/nigui/private/gtk3/platform_impl.nim b/src/nigui/private/gtk3/platform_impl.nim index 7bb13c3..4dbf761 100755 --- a/src/nigui/private/gtk3/platform_impl.nim +++ b/src/nigui/private/gtk3/platform_impl.nim @@ -119,6 +119,7 @@ proc pKeyvalToKey(keyval: cint): Key = of 65377: Key_Print of 65383: Key_ContextMenu of 65407: Key_NumLock + of 65421: Key_NumpadEnter of 65450: Key_NumpadMultiply of 65451: Key_NumpadAdd of 65452: Key_NumpadSeparator diff --git a/src/nigui/private/windows/platform_impl.nim b/src/nigui/private/windows/platform_impl.nim index 1687cd8..8569d79 100755 --- a/src/nigui/private/windows/platform_impl.nim +++ b/src/nigui/private/windows/platform_impl.nim @@ -227,6 +227,11 @@ proc pWMParamsToKey(wParam, lParam: pointer): Key = of VK_OEM_PERIOD: result = Key_Point of VK_OEM_COMMA: result = Key_Comma of VK_OEM_MINUS: result = Key_Minus + of VK_RETURN: + if (cast[int32](lParam) and 0x1000000) > 0: + result = Key_NumpadEnter + else: + result = Key_Return # the following block is probably only correct for german keyboard layout of VK_OEM_2: result = Key_NumberSign diff --git a/src/nigui/private/windows/windows.nim b/src/nigui/private/windows/windows.nim index ec04f01..ed1420e 100755 --- a/src/nigui/private/windows/windows.nim +++ b/src/nigui/private/windows/windows.nim @@ -90,6 +90,7 @@ const SW_RESTORE* = 9 SWP_NOMOVE* = 2 SWP_NOSIZE* = 1 + VK_RETURN* = 13 VK_SHIFT* = 16 VK_CONTROL* = 17 VK_MENU* = 18 |
