From 5c61b1f21689d2279d3e382e6be6cc84d0c440ae Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Fri, 25 Nov 2011 09:24:23 -0700 Subject: [PATCH] fix treatment of caps lock in keymap% Somewhere along the way --- probably in porting the editor classes to Racket --- the caps-lock specification in a keymap string was treated the same as other modifiers, but it is supposed to be neutral when the key string starts with ":". Closes PR 5486, 10347, 10993, 12184 original commit: d3cbea068ad6e64453b5ddd4f12b461aeef54844 --- collects/mred/private/wxme/keymap.rkt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/collects/mred/private/wxme/keymap.rkt b/collects/mred/private/wxme/keymap.rkt index b040354b..4f66580d 100644 --- a/collects/mred/private/wxme/keymap.rkt +++ b/collects/mred/private/wxme/keymap.rkt @@ -272,6 +272,8 @@ (if (ctrl . < . 0) "~c:" "") (if (shift . > . 0) "s:" "") (if (shift . < . 0) "~s:" "") + (if (caps . > . 0) "l:" "") + (if (caps . < . 0) "~l:" "") (or (hash-ref rev-keylist code) (format "~c" code)))]) (error (method-name 'keymap% 'map-function) @@ -384,7 +386,7 @@ (values downs code)]) (values downs code))]) (let ([newkey - (let ([modval (lambda (c) + (let ([modval (lambda (c [default-off? default-off?]) (cond [(memq c downs) 1] [(memq c ups) -1] @@ -395,7 +397,7 @@ (modval #\a) (modval #\m) (modval #\d) - (modval #\l) + (modval #\l #f) others? fname prev-key