summaryrefslogtreecommitdiff
path: root/genmap.py
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2020-09-23 23:30:05 +0300
committerDevaev Maxim <[email protected]>2020-09-23 23:30:05 +0300
commitfdd41a4382a4990c2ee03caf988e96c0b33881d6 (patch)
tree441d8bee6cffc33431a59e005588a8d837c7c212 /genmap.py
parentf605e91bf254dee021bbd18fe40cf9270d735950 (diff)
minor genmap fix
Diffstat (limited to 'genmap.py')
-rwxr-xr-xgenmap.py11
1 files changed, 5 insertions, 6 deletions
diff --git a/genmap.py b/genmap.py
index 416934ef..4f5e1308 100755
--- a/genmap.py
+++ b/genmap.py
@@ -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