cocoa: fix problem with dispatching key-up events

Closes PR 11635
 Merge to 5.1
(cherry picked from commit 152c636e1c)
This commit is contained in:
Matthew Flatt 2011-01-31 12:39:57 -07:00 committed by Eli Barzilay
parent c417d1f39d
commit 40055e2ba1

View File

@ -58,7 +58,12 @@
(and r
(begin
(parameterize ([recurring-for-command #t])
(tell r keyDown: evt))
(let ([evt-type (tell #:type _NSInteger evt type)])
(cond
[(= NSKeyDown evt-type)
(tell r keyDown: evt)]
[(= NSKeyUp evt-type)
(tell r keyUp: evt)])))
#t)))))))))
(define cocoa-mb (tell (tell MyBarMenu alloc) init))