x.piter | 25 Jul 2012 14:25
Picon

'Shift_L + Shift_R' keybinding

Hi awesome list.
I cannot figure out a way to define a key binding to simultaneous press of
both Shifts.
if i use this, terminal starts if i press Shift_L alone
awful.key({ "Shift_R", }, "Shift_L",function () awful.util.spawn(terminal) end),
and if i use this than nothing happens
awful.key({ "Shift_R",  "Shift_L"} function () awful.util.spawn(terminal) end),
Any recommendations?
Thanks.

Vincent Bernat | 25 Jul 2012 14:58
Gravatar

Re: 'Shift_L + Shift_R' keybinding

 ❦ 25 juillet 2012 14:25 CEST, x.piter <at> gmail.com :

> I cannot figure out a way to define a key binding to simultaneous press of
> both Shifts.
> if i use this, terminal starts if i press Shift_L alone
> awful.key({ "Shift_R", }, "Shift_L",function () awful.util.spawn(terminal) end),
> and if i use this than nothing happens
> awful.key({ "Shift_R",  "Shift_L"} function ()
> awful.util.spawn(terminal) end),

I don't know if awesome can bind functions to only modifiers, but if it
cannot, you should be able to workaround the issue by providing a custom
xkb rule.

xkb_symbols "lshift_rshift_terminal" {
 key <LFSH> { [ Shift_L, XF86Start ] },
 key <RTSH> { [ Shift_R, XF86Start ] }
}

It's just a raw guess, not sure if it would work.
--

-- 
Indent to show the logical structure of a program.
            - The Elements of Programming Style (Kernighan & Plauger)


Gmane