2

Using Debian (jessie) and the "awesome" window manager (3.4.15), I can't figure out how to map Ctrl+Alt to a command. I would like to switch my keyboard layout like on a windows box. This is what I do to test the mapping:

awful.key({ "Alt",},"Shift", function ()awful.util.spawn("xfce4-terminal") end),

Of course the aforementioned line us within a

globalkeys = awful.util.table.join( ...

just like the other (working) hotkeys. Has anyone managed to map Alt+Shift as a shortcut?

Andrii Omelchenko
  • 13,183
  • 12
  • 43
  • 79
Simon
  • 497
  • 1
  • 6
  • 11

2 Answers2

5

The following works for me (figured this out by experimenting + running xev and looking at its output a bit):

awful.key({ "Mod1" }, "Shift_L", function () print("key 1") end),
awful.key({ "Shift" }, "Alt_L", function () print("key 2") end),

The first one is for when you press Alt first while the second one is for when Shift is pressed first (yup, this makes a difference; pressing Shift while "a" is pressed also does something else than the opposite order).

Uli Schlachter
  • 9,337
  • 1
  • 23
  • 39
4

In Awesome WM, Whilst control key is "Control", Alt is "Mod1".

So, you would have this kind of syntax:

awful.key({ "Mod1", "Control"}, "KEY(for example j)" , function desired...),
L911
  • 89
  • 5