1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2025-02-03 15:34:54 -05:00

Only add modmask if not numlock.

This commit is contained in:
Qball Cow 2015-11-23 14:10:07 +01:00
parent b974b10c96
commit 596c92c814
2 changed files with 15 additions and 2 deletions

View file

@ -1496,7 +1496,6 @@ MenuReturn menu ( Switcher *sw, char **input, char *prompt, unsigned int *select
KeySym key; // = XkbKeycodeToKeysym ( display, ev.xkey.keycode, 0, 0 );
int len = Xutf8LookupString ( xic, &( ev.xkey ), pad, sizeof ( pad ), &key, &stat );
pad[len] = 0;
if ( stat == XLookupKeySym || stat == XLookupBoth ) {
// Handling of paste
if ( abe_test_action ( PASTE_PRIMARY, ev.xkey.state, key ) ) {

View file

@ -420,7 +420,21 @@ static void x11_figure_out_numlock_mask ( Display *display )
// Combined mask, without NumLock
CombinedMask = ShiftMask | MetaLMask | MetaRMask | AltMask | AltRMask | SuperRMask | SuperLMask | HyperLMask | HyperRMask |
ControlMask;
CombinedMask |= Mod1Mask | Mod2Mask | Mod3Mask | Mod4Mask | Mod5Mask;
if ( Mod1Mask != NumlockMask ) {
CombinedMask |= Mod1Mask;
}
if ( Mod2Mask != NumlockMask ) {
CombinedMask |= Mod2Mask;
}
if ( Mod3Mask != NumlockMask ) {
CombinedMask |= Mod3Mask;
}
if ( Mod4Mask != NumlockMask ) {
CombinedMask |= Mod4Mask;
}
if ( Mod5Mask != NumlockMask ) {
CombinedMask |= Mod5Mask;
}
XFreeModifiermap ( modmap );
}