Browse files

fix get-modifier-map

keycode->keysyms only returns one keysym so it borks if multiple
keycodes map to the same keysym.
  • Loading branch information...
1 parent f4fd30d commit 439180985920a628b18d4426f1a29b1c36576531 @sabetts sabetts committed with Shawn Betts Jun 17, 2010
Showing with 5 additions and 1 deletion.
  1. +5 −1 input.lisp
View
6 input.lisp
@@ -596,7 +596,11 @@ input (pressing Return), nil otherwise."
(defun get-modifier-map ()
(labels ((find-mod (mod codes)
- (find (xlib:keysym->keycodes *display* (keysym-name->keysym mod)) codes)))
+ (find mod
+ (mapcar (lambda (code)
+ (keysym->keysym-name (xlib:keycode->keysym *display* code 0)))
+ codes)
+ :test 'string=)))
(let ((modifiers (make-modifiers)))
(multiple-value-bind
(shift-codes lock-codes control-codes mod1-codes mod2-codes mod3-codes mod4-codes mod5-codes)

0 comments on commit 4391809

Please sign in to comment.