Hello list, I just installed Stumpwm for the first time today, found that my G keys were not working, actually, Prefix h k did not show anything since stumpwm uses keysyms instead of keycodes to handle keys. I should say that there are at least 2 versions of the G15 keyboard, one I'm aware of is an azerty keyboard with blue backlight, and the other (the one I have) has a qwerty layout with orange backlight. Anyway, what I needed here was a keysym for every special key so used the XF86Launch and Audio keysyms that should be available on every box.
As of now, all these keys are perfectly working and labeled Gx. I'm sending the snippet of code I used to get these working, I know it's not done the right way but since I couldn't get XLIB:CHANGE-KEYBOARD-MAPPING working in time I just used xmodmap. About the snippet usage, well, just add (load #P"path/to/g15conf.lisp") in your .stumpwmrc and you're ready to go. PD: If anyone has a working example of how to use XLIB:CHANGE-KEYBOARD-MAPPING I'll be glad to see it and to rewrite the code snippet using that instead of xmodmap. (hints are also welcome) -- TC-Rucho
(in-package :stumpwm) (let ((gkeycodes '(177 152 190 208 129 178)) ;; These are the keycodes G keys in order (mediakeycodes '((144 "Prev") (153 "Next") (160 "Mute") (162 "Play") (164 "Stop") (174 "LowerVolume") (176 "RaiseVolume")))) (dotimes (i (length gkeycodes)) (run-shell-command (concatenate 'string "xmodmap -e 'keycode " (write-to-string (nth i gkeycodes)) " = XF86Launch" (write-to-string (1+ i)) "'")) (define-keysym (+ (keysym-name->keysym "XF86Launch1") i) (concatenate 'string "G" (write-to-string (1+ i))))) (dotimes (i (length mediakeycodes)) (run-shell-command (concatenate 'string "xmodmap -e 'keycode " (write-to-string (first (nth i mediakeycodes))) " = XF86Audio" (second (nth i mediakeycodes)) "'"))))
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Stumpwm-devel mailing list Stumpwm-devel@nongnu.org http://lists.nongnu.org/mailman/listinfo/stumpwm-devel