mirror of
https://github.com/davatorium/rofi.git
synced 2024-11-25 13:55:34 -05:00
Strip spaces from key-name (Issue: #511)
This commit is contained in:
parent
c759f248b4
commit
3e3fb24ea5
1 changed files with 2 additions and 0 deletions
|
@ -650,6 +650,8 @@ gboolean x11_parse_key ( const char *combo, unsigned int *mod, xkb_keysym_t *key
|
|||
xkb_keysym_t sym = XKB_KEY_NoSymbol;
|
||||
for ( char *entry = strtok_r ( mod_key, "+-", &saveptr ); error_msg == NULL && entry != NULL;
|
||||
entry = strtok_r ( NULL, "+-", &saveptr ) ) {
|
||||
// Remove trailing and leading spaces.
|
||||
entry = g_strstrip ( entry );
|
||||
// Compare against lowered version.
|
||||
char *entry_lowered = g_utf8_strdown ( entry, -1 );
|
||||
if ( g_utf8_collate ( entry_lowered, "shift" ) == 0 ) {
|
||||
|
|
Loading…
Reference in a new issue