diff options
author | Devaev Maxim <[email protected]> | 2020-09-23 23:30:05 +0300 |
---|---|---|
committer | Devaev Maxim <[email protected]> | 2020-09-23 23:30:05 +0300 |
commit | fdd41a4382a4990c2ee03caf988e96c0b33881d6 (patch) | |
tree | 441d8bee6cffc33431a59e005588a8d837c7c212 /genmap.py | |
parent | f605e91bf254dee021bbd18fe40cf9270d735950 (diff) |
minor genmap fix
Diffstat (limited to 'genmap.py')
-rwxr-xr-x | genmap.py | 11 |
1 files changed, 5 insertions, 6 deletions
@@ -84,12 +84,11 @@ def _resolve_keysym(name: str) -> int: def _parse_x11_names(names: str) -> Set[_X11Key]: keys: Set[_X11Key] = set() - if names: - for name in names.split(","): - shift = name.startswith("^") - name = (name[1:] if shift else name) - code = _resolve_keysym(name) - keys.add(_X11Key(name, code, shift)) + for name in filter(None, names.split(",")): + shift = name.startswith("^") + name = (name[1:] if shift else name) + code = _resolve_keysym(name) + keys.add(_X11Key(name, code, shift)) return keys |