Skip to content
Snippets Groups Projects
Commit ea7ff93a authored by Jacek Złydach's avatar Jacek Złydach
Browse files

Enabled proper handling of modifier keys.

Solves issue #24.
parent 4a61eea5
No related branches found
No related tags found
No related merge requests found
......@@ -142,6 +142,7 @@
(let ((char (keyboard-event-character event))
(keysym (keyboard-event-key-name event))
#+(or aclpc acl86win32) (modstate (slot-value event 'silica::modifier-state))
#-(or aclpc acl86win32) (modstate (event-modifier-state event))
temp)
(cond ((and (member event *asynchronous-abort-gestures*
:test #'keyboard-event-matches-gesture-name-p)
......@@ -149,7 +150,7 @@
(setq temp (frame-top-level-process temp)))
(process-interrupt temp #'(lambda () (process-abort-gesture stream event))))
((and (characterp char)
#+(or aclpc acl86win32) (not (> modstate +shift-key+))
(not (> modstate +shift-key+)) ; we have a modifier key other than SHIFT active - need to put full event into the queue (in another branch)
(or (ordinary-char-p char)
(diacritic-char-p char)))
(queue-put (stream-input-buffer stream) char))
......@@ -387,18 +388,15 @@
(process-event-locally stream gesture)
nil)
(defmethod receive-gesture
((stream input-protocol-mixin) gesture)
(defmethod receive-gesture ((stream input-protocol-mixin) gesture)
;; don't translate it
gesture)
(defmethod receive-gesture
((stream input-protocol-mixin) (gesture character))
(defmethod receive-gesture ((stream input-protocol-mixin) (gesture character))
(process-abort-or-accelerator-gesture stream gesture)
gesture)
(defmethod receive-gesture
((stream input-protocol-mixin) (gesture key-press-event))
(defmethod receive-gesture ((stream input-protocol-mixin) (gesture key-press-event))
(process-abort-or-accelerator-gesture stream gesture)
gesture)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment