summaryrefslogtreecommitdiff
path: root/genmap.py
diff options
context:
space:
mode:
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