From 52ba7ab6852a98b6b1cbbeadd08985a43db90880 Mon Sep 17 00:00:00 2001 From: Brad Nelson Date: Mon, 21 Feb 2022 20:42:41 -0800 Subject: [PATCH] Get ALT key. --- ueforth/windows/grf.fs | 8 ++++++-- ueforth/windows/windows_user.fs | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ueforth/windows/grf.fs b/ueforth/windows/grf.fs index e681845..d1897bb 100644 --- a/ueforth/windows/grf.fs +++ b/ueforth/windows/grf.fs @@ -84,15 +84,19 @@ cell allocate throw to backbuffer l GET_Y_LPARAM $ffff and rescale 0 exit then - WM_KEYDOWN msg = if + WM_SYSKEYDOWN msg = + WM_KEYDOWN msg = or if w 0 max 255 min to last-key 1 last-key key-state! PRESSED to event + last-key VK_ALT = if 0 exit then then - WM_KEYUP msg = if + WM_SYSKEYUP msg = + WM_KEYUP msg = or if w 0 max 255 min to last-key 0 last-key key-state! RELEASED to event + last-key VK_ALT = if 0 exit then then WM_CHAR msg = if w to last-char diff --git a/ueforth/windows/windows_user.fs b/ueforth/windows/windows_user.fs index e233eb7..451ef77 100644 --- a/ueforth/windows/windows_user.fs +++ b/ueforth/windows/windows_user.fs @@ -168,4 +168,6 @@ IDI_ASTERISK constant IDI_INFORMATION : GET_Y_LPARAM ( n -- n ) >r rp@ 2 + sw@ rdrop ; : GET_X_LPARAM ( n -- n ) >r rp@ sw@ rdrop ; +18 constant VK_ALT + only forth definitions