win32: fix alt-combination handling

original commit: 518cff7b6362be675d506dc90175fe5be455e7e0
This commit is contained in:
Matthew Flatt 2010-12-09 15:18:39 -07:00
parent 3c58e55730
commit 2b7d3981c0

View File

@ -150,22 +150,26 @@
[(= msg WM_KILLFOCUS)
(queue-window-event this (lambda () (on-kill-focus)))
0]
[(and (= msg WM_SYSKEYDOWN)
(or (= wParam VK_MENU) (= wParam VK_F4))) ;; F4 is close
[(= msg WM_SYSKEYDOWN)
(let ([result (if (or (= wParam VK_MENU) (= wParam VK_F4)) ;; F4 is close
(begin
(unhide-cursor)
(begin0
(default w msg wParam lParam)
(do-key w msg wParam lParam #f #f void))]
(default w msg wParam lParam))
0)])
(do-key w msg wParam lParam #f #f void)
result)]
[(= msg WM_KEYDOWN)
(do-key w msg wParam lParam #f #f default)]
[(= msg WM_KEYUP)
(do-key w msg wParam lParam #f #t default)]
[(and (= msg WM_SYSCHAR)
(= wParam VK_MENU))
[(= msg WM_SYSCHAR)
(let ([result (if (= wParam VK_MENU)
(begin
(unhide-cursor)
(begin0
(default w msg wParam lParam)
(do-key w msg wParam lParam #t #f void))]
(default w msg wParam lParam))
0)])
(do-key w msg wParam lParam #t #f void)
result)]
[(= msg WM_CHAR)
(do-key w msg wParam lParam #t #f default)]
[(= msg WM_COMMAND)