1
0
Fork 0
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:
Dave Davenport 2016-12-06 19:30:53 +01:00
parent c759f248b4
commit 3e3fb24ea5

View file

@ -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 ) {