From 8d0fc23d54cb8b044158f6ecb3b85d27f4de27db Mon Sep 17 00:00:00 2001 From: Matthew Flatt Date: Sat, 10 Aug 2013 09:07:56 -0600 Subject: [PATCH] racket/gui: fix `get-key-release-code' result for a key-press event Return 'press (matching docs and pre-v5.1) insteda of 'down. original commit: 082f21c5f80d22baa1d93680d89ae70265ba7ed0 --- pkgs/gui-pkgs/gui-lib/mred/HISTORY.txt | 7 +++++++ pkgs/gui-pkgs/gui-lib/mred/private/wx/common/event.rkt | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/pkgs/gui-pkgs/gui-lib/mred/HISTORY.txt b/pkgs/gui-pkgs/gui-lib/mred/HISTORY.txt index 2bffa405..aab906c1 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/HISTORY.txt +++ b/pkgs/gui-pkgs/gui-lib/mred/HISTORY.txt @@ -1,3 +1,10 @@ +Version 5.90.0.5 + +Fix key-event% get-key-release-code to return 'press instead of 'down + for a key-down event + +---------------------------------------- + Version 5.1, February 2011 The GRacket executable is now a thin wrapper on the Racket executable, diff --git a/pkgs/gui-pkgs/gui-lib/mred/private/wx/common/event.rkt b/pkgs/gui-pkgs/gui-lib/mred/private/wx/common/event.rkt index 5cdd153e..a295de46 100644 --- a/pkgs/gui-pkgs/gui-lib/mred/private/wx/common/event.rkt +++ b/pkgs/gui-pkgs/gui-lib/mred/private/wx/common/event.rkt @@ -82,7 +82,7 @@ [[exact-integer? y] 0]) (init [time-stamp 0]) (init-properties [[bool? caps-down] #f]) - (properties [[(make-alts symbol? char?) key-release-code] 'down] + (properties [[(make-alts symbol? char?) key-release-code] 'press] [[(make-or-false (make-alts symbol? char?)) other-shift-key-code] #f] [[(make-or-false (make-alts symbol? char?)) other-altgr-key-code] #f] [[(make-or-false (make-alts symbol? char?)) other-shift-altgr-key-code] #f]