Map ('5') and allow mod5mask (altgr) as a modifier.

From Artturi Alm (though changed from 'm' to '5')
This commit is contained in:
okan 2020-02-03 16:38:02 +00:00
parent 83de84b7f8
commit d3410dd10d
3 changed files with 9 additions and 14 deletions

3
conf.c
View File

@ -197,10 +197,11 @@ static const struct {
const char ch; const char ch;
int mask; int mask;
} bind_mods[] = { } bind_mods[] = {
{ 'S', ShiftMask },
{ 'C', ControlMask }, { 'C', ControlMask },
{ 'M', Mod1Mask }, { 'M', Mod1Mask },
{ '4', Mod4Mask }, { '4', Mod4Mask },
{ 'S', ShiftMask }, { '5', Mod5Mask },
}; };
static const struct { static const struct {
const char *key; const char *key;

18
cwmrc.5
View File

@ -84,6 +84,8 @@ Meta key.
Shift key. Shift key.
.It Ic 4 .It Ic 4
Mod4 (windows) key. Mod4 (windows) key.
.It Ic 5
Mod5 (AltGr) key.
.El .El
.Pp .Pp
The The
@ -101,18 +103,10 @@ The modifier keys come first, followed by a
.Sq - , .Sq - ,
then the button number. then the button number.
.Pp .Pp
The following modifiers are recognised: The same modifiers are recognised as for
.Pp .Ar key
.Bl -tag -width Ds -offset indent -compact in
.It Ic C .Nm bind-key .
Control key.
.It Ic M
Meta key.
.It Ic S
Shift key.
.It Ic 4
Mod4 (windows) key.
.El
.Pp .Pp
The following buttons are recognised: The following buttons are recognised:
.Pp .Pp

View File

@ -69,7 +69,7 @@ void (*xev_handlers[LASTEvent])(XEvent *) = {
}; };
static KeySym modkeys[] = { XK_Alt_L, XK_Alt_R, XK_Super_L, XK_Super_R, 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 static void
xev_handle_maprequest(XEvent *ee) xev_handle_maprequest(XEvent *ee)