[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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

From: York Zhao
Subject: Re: [STUMP] How do I bind left and right shifts simultaneous pressing
Date: Sat, 14 Apr 2018 12:53:37 -0400

Thank you very much David. I've found a way to do this first making
Shift_R + Shift_L available as F21

  xmodmap -e "clear Shift"
  xmodmap -e "add Shift = Shift_R"
  xmodmap -e "keycode 50 = Shift_L F21 NoSymbol"
  xmodmap -e "keycode 62 = Shift_R F21 NoSymbol"

Then bind "F21":

(define-key *top-map* (kbd "F21") "toggle-kbd-layout")
The only problem is that I have to press right shift first, and press
left shift while keep holding the right shift,
but can't do it the other way around by pressing and holding left shift first.


On Fri, Apr 13, 2018 at 10:25 PM, David Bjergaard <address@hidden> wrote:
> I will play with this a bit but I don’t know if stumpwm is set up to respond 
> to two modifier keys pressed to trigger a keybinding.
>     David
>> On Apr 13, 2018, at 12:47 AM, York Zhao <address@hidden> wrote:
>> 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
>> address@hidden

reply via email to

[Prev in Thread] Current Thread [Next in Thread]