You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Argument name specifies the keymap name. This is an optional argument.
However this code:
from xkeysnail.transform import Key, define_keymap
define_keymap(None, {
Key.CAPSLOCK: Key.LEFT_META,
Key.LEFT_META: Key.ESC,
Key.ESC : Key.CAPSLOCK,
}, None) # <-- Name is None here
Results in this error:
File "/usr/local/lib/python3.10/dist-packages/xkeysnail/transform.py", line 457, in transform_key
print("WM_CLASS '{}' | active keymaps = [{}]".format(wm_class, ", ".join(keymap_names)))
TypeError: sequence item 0: expected str instance, NoneType found
However adding a name makes it work fine:
from xkeysnail.transform import Key, define_keymap
define_keymap(None, {
Key.CAPSLOCK: Key.LEFT_META,
Key.LEFT_META: Key.ESC,
Key.ESC : Key.CAPSLOCK,
}, "Michael") # <-- Name is set here
The text was updated successfully, but these errors were encountered:
Great project, have tried for 4 days solid trying to remap keys in linux, this has been the only reliable solution for me, well done!
The documentation says:
However this code:
Results in this error:
However adding a name makes it work fine:
The text was updated successfully, but these errors were encountered: