Get ALT key.

This commit is contained in:
Brad Nelson
2022-02-21 20:42:41 -08:00
parent 8680cbad06
commit 52ba7ab685
2 changed files with 8 additions and 2 deletions

View File

@ -84,15 +84,19 @@ cell allocate throw to backbuffer
l GET_Y_LPARAM $ffff and rescale l GET_Y_LPARAM $ffff and rescale
0 exit 0 exit
then then
WM_KEYDOWN msg = if WM_SYSKEYDOWN msg =
WM_KEYDOWN msg = or if
w 0 max 255 min to last-key w 0 max 255 min to last-key
1 last-key key-state! 1 last-key key-state!
PRESSED to event PRESSED to event
last-key VK_ALT = if 0 exit then
then then
WM_KEYUP msg = if WM_SYSKEYUP msg =
WM_KEYUP msg = or if
w 0 max 255 min to last-key w 0 max 255 min to last-key
0 last-key key-state! 0 last-key key-state!
RELEASED to event RELEASED to event
last-key VK_ALT = if 0 exit then
then then
WM_CHAR msg = if WM_CHAR msg = if
w to last-char w to last-char

View File

@ -168,4 +168,6 @@ IDI_ASTERISK constant IDI_INFORMATION
: GET_Y_LPARAM ( n -- n ) >r rp@ 2 + sw@ rdrop ; : GET_Y_LPARAM ( n -- n ) >r rp@ 2 + sw@ rdrop ;
: GET_X_LPARAM ( n -- n ) >r rp@ sw@ rdrop ; : GET_X_LPARAM ( n -- n ) >r rp@ sw@ rdrop ;
18 constant VK_ALT
only forth definitions only forth definitions