minor 3.7 fixes

This commit is contained in:
Devaev Maxim
2020-09-05 05:58:33 +03:00
parent e106aaebed
commit 0c85248987
6 changed files with 34 additions and 30 deletions

View File

@@ -130,10 +130,11 @@ def _read_keyboard_layout(path: str) -> Dict[int, At1Key]: # Keysym to evdev (a
ctrl=("ctrl" in rest),
)
x11_code = _resolve_keysym(parts[0].upper())
if "addupper" in rest and x11_code != 0:
layout[x11_code] = At1Key(
code=at1_code,
shift=True,
)
if "addupper" in rest:
x11_code = _resolve_keysym(parts[0].upper())
if x11_code != 0:
layout[x11_code] = At1Key(
code=at1_code,
shift=True,
)
return layout