diff options
author | Dave Davenport <qball@gmpclient.org> | 2016-12-06 19:30:53 +0100 |
---|---|---|
committer | Dave Davenport <qball@gmpclient.org> | 2016-12-06 19:30:53 +0100 |
commit | 3e3fb24ea52c860f333675ab33b001bdb82c3b47 (patch) | |
tree | d671920d9b8f7a4efe869dd23b073acd28951b93 | |
parent | c759f248b4c4609859538829f04d8481e9bda076 (diff) |
Strip spaces from key-name (Issue: #511)
-rw-r--r-- | source/x11-helper.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/x11-helper.c b/source/x11-helper.c index a9a79e4a..5061e347 100644 --- a/source/x11-helper.c +++ b/source/x11-helper.c @@ -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 ) { |