Remove unused original-keycode

This commit is contained in:
Cat /dev/Nulo 2021-12-13 19:32:41 -03:00
parent 9cbb053d50
commit 8fefc8cee6

View file

@ -276,26 +276,25 @@
(and slot (vector-set! keys-for-frame slot key)))) (and slot (vector-set! keys-for-frame slot key))))
(define (press-key-aux keycode key) (define (press-key-aux keycode key)
(let ((original-keycode (lookup key))) ;; Sometimes "keycodes" are procedures; in that case we call them with
;; Sometimes "keycodes" are procedures; in that case we call them with ;; true when the key is pressed and false when it's released.
;; true when the key is pressed and false when it's released. (if (procedure? keycode)
(if (procedure? keycode) (keycode #t)
(keycode #t) (if (modifier? keycode)
(if (modifier? keycode) (if (uncombo keycode)
(if (uncombo keycode) (if (= (uncombo keycode) sticky-modifier)
(if (= (uncombo keycode) sticky-modifier) (press-sticky-modifier (unmodify keycode))
(press-sticky-modifier (unmodify keycode))
(begin
(press-modifier (unmodify keycode) key)
(press-key-aux (uncombo keycode) key)))
(press-modifier (unmodify keycode) key))
(let ((sticky (find sticky-modifiers 1)))
(if sticky
(begin (begin
(press-modifier (+ sticky 1) key) (press-modifier (unmodify keycode) key)
(release-sticky-modifier (+ sticky 1))) (press-key-aux (uncombo keycode) key)))
#f) (press-modifier (unmodify keycode) key))
(press-normal-key keycode key)))))) (let ((sticky (find sticky-modifiers 1)))
(if sticky
(begin
(press-modifier (+ sticky 1) key)
(release-sticky-modifier (+ sticky 1)))
#f)
(press-normal-key keycode key)))))
;; Record a key press in the modifiers/keycodes-down vectors for the layout. ;; Record a key press in the modifiers/keycodes-down vectors for the layout.