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

Keyboard layouts with umlauts #805

Open
flenzen opened this issue Aug 3, 2024 · 0 comments
Open

Keyboard layouts with umlauts #805

flenzen opened this issue Aug 3, 2024 · 0 comments

Comments

@flenzen
Copy link

flenzen commented Aug 3, 2024

This seems to be related to #470, but I cannot tell if this is the same problem. Feel free to close/merge if it is.

I want to be able to alter between us and de layout. For that, I copied de from /usr/share/keyd/layouts/ to /usr/share/keyd/ and produced the following config file:

# Note: layouts and layout switching is currently handled by setxkbmap (in i3 config), because I cannot get it to work here.
[ids]
*

include de

[main]
# Assign new layer (named capslock, see below) to capslock when held, and escape when pressed. Capslock functionality on both shifts.
capslock = overload(capslock, escape)

# Make both shifts toggle capslock
[shift]
leftshift = capslock
rightshift = capslock

# Capslock behaves as Shift-Alt-Ctrl-Win, except for hjkl (vim-style navigation)
[capslock]
d = setlayout(de)

Switching layout works, but umlauts produce strange number sequences. keyd monitor -t reports those as

+111 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	cancel down
+0 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	cancel up
+0 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	0 down
+0 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	0 up
+0 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	2 down
+0 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	2 up
+0 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	n down
+0 ms	keyd virtual keyboard	0fac:0ade:efba1ddf	n up

xev reports the same. Apparently, these are supposed to be handled as compose sequences, which does not work. My ~/.XCompose is

<Multi_key> + <Z> + <Z> : "ℤ" # Blackboard bold Z (set of integers)
include "/usr/share/keyd/keyd.compose"

The first line is there to make sure that the file is actually parsed. Multi_key is set to menu using setxkbmap after starting keyd. Indeed, I can verify that this does not work in applications that otherwise process compose sequences correctly (I tried, e.g., xed).

For now, my workaround is

[capslock]
d = command(setxkbmap -layout "de")
u = command(setxkbmap -layout "us")

which seems to work, as far as I can tell at the moment.

I am running keyd v2.5.0.

In any case, thank you very much for this piece of software!!

P.S.: How do I switch back to no/default/... layout?

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