Altered keymap% to not claim to handle key events that it doesn't

Previously, `keymap%` would return #t for all shift, ctrl, and key release
events. DrRacket's editors would then not handle those events (correctly,
as they shouldn't handle already-handled events), meaning that the events
weren't sent to any snips.

original commit: 8ba8d01ec07d45ec67bd06df0670c7498fa20bb9
This commit is contained in:
Neil Toronto 2014-08-29 16:37:47 -04:00
parent d1eb9f9843
commit 02d85d78ab

View File

@ -457,11 +457,12 @@
(def/public (handle-key-event [any? obj] [key-event% event])
(let ([code (send event get-key-code)])
(or (eq? code 'shift)
(if (or (eq? code 'shift)
(eq? code 'rshift)
(eq? code 'control)
(eq? code 'rcontrol)
(eq? code 'release)
(eq? code 'release))
prefixed?
(let ([score (get-best-score
code
(send event get-other-shift-key-code)