[STUMP] How do I bind left and right shifts simultaneous pressing

York Zhao <[email protected]> Fri, 13 Apr 2018 00:47:39 -0400
Newsgroups gmane.comp.window-managers.stumpwm.devel
Message-ID <CAD3zm215s2osxcxjd+U3WN46b95X6_CjTT5iG2S8rqwwtTWCew@mail.gmail.com>
Hi List,

I would like to be able to toggle keyboard layout between DWERT and DVORAK
by pressing both left and right SHIFT keys. I've already written the
following command to do this. However, I'm not sure how to bind this
command to pressing both SHIFT in Stumpwm.

(defcommand set-kbd-layout (layout) ()
  "Set keyboard layout"
  (setf layout (cdr (assoc layout '(("qwert"  . "qwert")
                                    ("dvorak" . "dvorak,"))
                           :test 'equal)))
  (when layout
    (run-shell-command (concatenate 'string "setxkbmap -variant " layout))))

Thanks,

_______________________________________________
Stumpwm-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/stumpwm-devel