Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Are Umlauts supported (e.g. ü)? If yes, how to use them? #176

Open
lprc opened this issue Nov 15, 2023 · 0 comments
Open

Are Umlauts supported (e.g. ü)? If yes, how to use them? #176

lprc opened this issue Nov 15, 2023 · 0 comments

Comments

@lprc
Copy link

lprc commented Nov 15, 2023

I couldn't find an entry in key.py. I tried using the following config:

from xkeysnail.transform import *

define_keymap(re.compile("code"), {
    K("ü"): K("{"),
    K("Ü"): K("}"),
})

but which yields the following error.

Traceback (most recent call last):
  File "/root/.local/pipx/venvs/xkeysnail/bin/xkeysnail", line 6, in <module>
    cli_main()
  File "/root/.local/pipx/venvs/xkeysnail/lib/python3.11/site-packages/xkeysnail/__init__.py", line 62, in cli_main
    eval_file(args.config)
  File "/root/.local/pipx/venvs/xkeysnail/lib/python3.11/site-packages/xkeysnail/__init__.py", line 6, in eval_file
    exec(compile(file.read(), path, 'exec'), globals())
  File "/home/simon/sciebo/bin/xkeysnail_config.py", line 5, in <module>
    K("ü"): K("{"),
    ^^^^^^
  File "/root/.local/pipx/venvs/xkeysnail/lib/python3.11/site-packages/xkeysnail/transform.py", line 144, in K
    key = getattr(Key, key_str)
          ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/enum.py", line 789, in __getattr__
    raise AttributeError(name) from None
AttributeError: Ü

I also tried replacing ü with udiaresis, which is the name that works with xmodmap.

FWIW this is what I used with xmodmap in the past:

xmodmap -e "keycode 34 = braceleft braceright" # remap ö
xmodmap -e "keycode 47 = parenleft parenright" # remap ä
xmodmap -e "keycode 48 = bracketleft bracketright" # remap ü

Which string can I use instead of e.g. ü in my config?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant