2

I want to have Awesome WM run a command when both Shift keys (left and right) are pressed together.

I know Linux can differentiate between the two shift keys (e.g., one can tell Gnome to change the keyboard layout when both Shift keys are pressed together).

Is there a way to do this in Awesome?

scaramouche
  • 461
  • 2
  • 12
  • See an answer here: http://askubuntu.com/questions/565407/detect-right-and-left-shift-keys-pressed-together-from-within-awesome-wm – scaramouche Jul 08 '15 at 19:15

1 Answers1

0

It is realy very simple, you can set the "Shift" (left shift) as mod key and #62 (right shift) as pressed key. Tested it just now and with me it works. for instance if I want firefox to spawn I do this:

awful.key({ "Shift" }, "#62", function () awful.util.spawn(browser) end),
switch87
  • 295
  • 1
  • 18
  • Thank you. Yes, this is the same as the answer in http://askubuntu.com/questions/565407/detect-right-and-left-shift-keys-pressed-together-from-within-awesome-wm. One problem with this solution, though, is that if one presses right shift before left shift, it does not work. – scaramouche Jul 30 '15 at 00:03