1
0
Fork 0
mirror of https://github.com/davatorium/rofi.git synced 2024-11-18 13:54:36 -05:00

Tell the users what Modifiers exist, warn if using Mod?

* Mod? modifier is deprecated.

Issue: #290
This commit is contained in:
Dave Davenport 2015-12-04 08:54:27 +01:00
parent eaa553bfd5
commit 6b609b8e6d
2 changed files with 11 additions and 1 deletions

View file

@ -153,7 +153,7 @@ This does not validate all passed values (e.g. colors).
rofi -key-run F12
rofi -key-ssh control+shift+s
rofi -key-window mod1+Tab
rofi -key-window SuperL+Tab
`-threads` *num*

View file

@ -483,6 +483,10 @@ void x11_parse_key ( char *combo, unsigned int *mod, KeySym *key )
g_string_append_printf ( str, "X11 configured keyboard has no <b>HyperR</b> key.\n" );
}
}
int seen_mod = FALSE;
if ( strcasestr ( combo, "Mod")) {
seen_mod = TRUE;
}
*mod = modmask;
@ -498,6 +502,12 @@ void x11_parse_key ( char *combo, unsigned int *mod, KeySym *key )
if ( sym == NoSymbol || ( !modmask && ( strchr ( combo, '-' ) || strchr ( combo, '+' ) ) ) ) {
// TODO popup
g_string_append_printf ( str, "Sorry, rofi cannot understand the key combination: <i>%s</i>\n", combo );
g_string_append(str, "\nRofi supports the following modifiers:\n\t");
g_string_append(str, "<i>Shift,Control,Alt,AltGR,SuperL,SuperR,");
g_string_append(str, "MetaL,MetaR,HyperL,HyperR</i>");
if(seen_mod) {
g_string_append(str, "\n\n<b>Mod1,Mod2,Mod3,Mod4,Mod5 are no longer supported, use one of the above.</b>" );
}
}
if ( str->len > 0 ) {
show_error_message ( str->str, TRUE );