diff --git a/menelaus.scm b/menelaus.scm index 3415b3b..1579a1f 100644 --- a/menelaus.scm +++ b/menelaus.scm @@ -154,8 +154,8 @@ (define (press-normal-key keycode key) (let ((slot (find keycodes-down 0))) - (vector-set! keycodes-down slot keycode) - (vector-set! keys-for-frame slot key))) + (and slot (vector-set! keycodes-down slot keycode)) + (and slot (vector-set! keys-for-frame slot key)))) (define (press-key key) (let ((keycode (lookup key))) diff --git a/test.rkt b/test.rkt index eb95943..57bf4b9 100644 --- a/test.rkt +++ b/test.rkt @@ -92,6 +92,8 @@ ((40) . (())) ;; base layer key ((2) . (() ,key-e)) + ;; seven keys down + ((1 2 3 4 7 8 9) . (() ,key-e ,key-w ,key-r ,key-t ,key-u ,key-i)) ;; shift combo and shift key simultaneously ((40) . (())) ((40 1 36) . ((shift) ,key-2))