add f10 key support on windows

This commit is contained in:
Adam D. Ruppe 2017-03-27 11:55:59 -04:00
parent 42de573c1d
commit 19cd27c554
1 changed files with 7 additions and 1 deletions

View File

@ -904,6 +904,10 @@ enum WindowFlags : int {
then further customize the window by changing `WindowFlags`. then further customize the window by changing `WindowFlags`.
You should mostly only need [normal], [undecorated], and [hidden] for normal
use. The others are there to build a foundation for a higher level GUI toolkit,
but are themselves not as high level as you might think from their names.
This list is based on the EMWH spec for X11. This list is based on the EMWH spec for X11.
http://standards.freedesktop.org/wm-spec/1.4/ar01s05.html#idm139704063786896 http://standards.freedesktop.org/wm-spec/1.4/ar01s05.html#idm139704063786896
+/ +/
@ -5116,11 +5120,13 @@ version(Windows) {
if(wind.onFocusChange) if(wind.onFocusChange)
wind.onFocusChange(msg == WM_SETFOCUS); wind.onFocusChange(msg == WM_SETFOCUS);
break; break;
case WM_SYSKEYDOWN:
case WM_SYSKEYUP:
case WM_KEYDOWN: case WM_KEYDOWN:
case WM_KEYUP: case WM_KEYUP:
KeyEvent ev; KeyEvent ev;
ev.key = cast(Key) wParam; ev.key = cast(Key) wParam;
ev.pressed = msg == WM_KEYDOWN; ev.pressed = (msg == WM_KEYDOWN || msg == WM_SYSKEYDOWN);
// FIXME // FIXME
// ev.hardwareCode // ev.hardwareCode