From 8fefc8cee6400362a686c57c086cf5a7946463fb Mon Sep 17 00:00:00 2001 From: Nulo Date: Mon, 13 Dec 2021 19:32:41 -0300 Subject: [PATCH] Remove unused original-keycode --- menelaus.scm | 37 ++++++++++++++++++------------------- 1 file changed, 18 insertions(+), 19 deletions(-) diff --git a/menelaus.scm b/menelaus.scm index a28c604..c43830d 100644 --- a/menelaus.scm +++ b/menelaus.scm @@ -276,26 +276,25 @@ (and slot (vector-set! keys-for-frame slot key)))) (define (press-key-aux keycode key) - (let ((original-keycode (lookup key))) - ;; Sometimes "keycodes" are procedures; in that case we call them with - ;; true when the key is pressed and false when it's released. - (if (procedure? keycode) - (keycode #t) - (if (modifier? keycode) - (if (uncombo keycode) - (if (= (uncombo keycode) sticky-modifier) - (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 + ;; Sometimes "keycodes" are procedures; in that case we call them with + ;; true when the key is pressed and false when it's released. + (if (procedure? keycode) + (keycode #t) + (if (modifier? keycode) + (if (uncombo keycode) + (if (= (uncombo keycode) sticky-modifier) + (press-sticky-modifier (unmodify keycode)) (begin - (press-modifier (+ sticky 1) key) - (release-sticky-modifier (+ sticky 1))) - #f) - (press-normal-key keycode key)))))) + (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 + (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.