cocoa: use alternate key if ctl-combination has no mapping

--- fixes ctl-space, and maybe other combinations
 Closes PR 11403
This commit is contained in:
Matthew Flatt 2010-11-08 20:43:28 -07:00
parent fc111f8909
commit c9b7c98525

View File

@ -269,8 +269,10 @@
(let ([alt-code (string-ref alt-str 0)]) (let ([alt-code (string-ref alt-str 0)])
(unless (equal? alt-code (send k get-key-code)) (unless (equal? alt-code (send k get-key-code))
(send k set-other-altgr-key-code alt-code))))) (send k set-other-altgr-key-code alt-code)))))
(when (and option? (when (and (or (and option?
special-option-key? special-option-key?)
(and control?
(equal? (send k get-key-code) #\u00)))
(send k get-other-altgr-key-code)) (send k get-other-altgr-key-code))
;; swap altenate with main ;; swap altenate with main
(let ([other (send k get-other-altgr-key-code)]) (let ([other (send k get-other-altgr-key-code)])