From d3410dd10d9c199521f92fcf45a43766bcd8f8d3 Mon Sep 17 00:00:00 2001 From: okan Date: Mon, 3 Feb 2020 16:38:02 +0000 Subject: Map ('5') and allow mod5mask (altgr) as a modifier. From Artturi Alm (though changed from 'm' to '5') --- conf.c | 3 ++- cwmrc.5 | 18 ++++++------------ xevents.c | 2 +- 3 files changed, 9 insertions(+), 14 deletions(-) diff --git a/conf.c b/conf.c index d25e00f..55dc40f 100644 --- a/conf.c +++ b/conf.c @@ -197,10 +197,11 @@ static const struct { const char ch; int mask; } bind_mods[] = { + { 'S', ShiftMask }, { 'C', ControlMask }, { 'M', Mod1Mask }, { '4', Mod4Mask }, - { 'S', ShiftMask }, + { '5', Mod5Mask }, }; static const struct { const char *key; diff --git a/cwmrc.5 b/cwmrc.5 index 41093a5..5208d29 100644 --- a/cwmrc.5 +++ b/cwmrc.5 @@ -84,6 +84,8 @@ Meta key. Shift key. .It Ic 4 Mod4 (windows) key. +.It Ic 5 +Mod5 (AltGr) key. .El .Pp The @@ -101,18 +103,10 @@ The modifier keys come first, followed by a .Sq - , then the button number. .Pp -The following modifiers are recognised: -.Pp -.Bl -tag -width Ds -offset indent -compact -.It Ic C -Control key. -.It Ic M -Meta key. -.It Ic S -Shift key. -.It Ic 4 -Mod4 (windows) key. -.El +The same modifiers are recognised as for +.Ar key +in +.Nm bind-key . .Pp The following buttons are recognised: .Pp diff --git a/xevents.c b/xevents.c index 696ff32..c4bff7d 100644 --- a/xevents.c +++ b/xevents.c @@ -69,7 +69,7 @@ void (*xev_handlers[LASTEvent])(XEvent *) = { }; static KeySym modkeys[] = { XK_Alt_L, XK_Alt_R, XK_Super_L, XK_Super_R, - XK_Control_L, XK_Control_R }; + XK_Control_L, XK_Control_R, XK_ISO_Level3_Shift }; static void xev_handle_maprequest(XEvent *ee) -- cgit 1.4.1