git-svn-id: http://svn2.nishi.boats/svn/milsko/trunk@633 b9cfdab3-6d41-4d17-bbe4-086880011989
This commit is contained in:
NishiOwO
2025-11-07 21:47:12 +00:00
parent 962cd2e1c1
commit 4417c26678
6 changed files with 18 additions and 30 deletions

View File

@@ -130,7 +130,6 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
int n = wp;
const int base = 'A' - 1;
/* FIXME: this catches escape key (!?!?!?) */
if(n <= 0x1f) {
n = (n + base) | MwLLControlMask;
if(!(GetKeyState(VK_LSHIFT) || GetKeyState(VK_RSHIFT))) n += 0x20;
@@ -138,6 +137,8 @@ static LRESULT CALLBACK wndproc(HWND hWnd, UINT msg, WPARAM wp, LPARAM lp) {
if(HIBYTE(VkKeyScan(wp)) & 2) n |= MwLLControlMask;
if(msg == WM_SYSCHAR) n |= MwLLAltMask;
printf("%c\n", n & 0xff);
if((0x20 <= n && n <= 0x7f) || (n & MwLLKeyMask)) MwLLDispatch(u->ll, key, &n);
} else if(msg == WM_SETFOCUS) {
MwLLDispatch(u->ll, focus_in, NULL);