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

Not working at all on Kernel 6.9.7 #782

Open
Artim96 opened this issue Jul 3, 2024 · 5 comments
Open

Not working at all on Kernel 6.9.7 #782

Artim96 opened this issue Jul 3, 2024 · 5 comments

Comments

@Artim96
Copy link

Artim96 commented Jul 3, 2024

I was able to use keyd on a different device about two years ago or so, but trying to set up keyd on another device with Kernel 6.9.7 (Debian Testing) results in no result. Compiling works, the systemd service does start too. These are the logs of keyd, which look as expected:

Jul 03 12:51:33 pc01 systemd[1]: Started keyd.service - key remapping daemon.
Jul 03 12:51:33 pc01 keyd[735]: CONFIG: parsing /etc/keyd/default.conf
Jul 03 12:51:33 pc01 keyd[735]: Starting keyd v2.4.3 (5e4ef41)
Jul 03 12:51:33 pc01 keyd[735]: DEVICE: match    046d:4023  /etc/keyd/default.conf        (Logitech Wireless Keyboard PID:4023)
Jul 03 12:51:33 pc01 keyd[735]: DEVICE: ignoring 046d:4054  (Logitech Wireless Mouse)
Jul 03 12:51:33 pc01 keyd[735]: DEVICE: ignoring 0fac:1ade  (keyd virtual pointer)

And that's what's in the config:

[ids]

*

[main]
                                                                                                                                                                                 
leftcontrol+leftalt+102nd = @
leftcontrol+leftalt+q = |

I frist tried with having rightalt+102nd and rightalt+q on the right side, yet that also doesn't result in anything. Sadly, keyd also doesn't write anything else to journalctl. What am I missing?

@rvaiya
Copy link
Owner

rvaiya commented Jul 26, 2024

Can you confirm this behaviour on master? The output of keyd monitor after pressing some keys would also be useful.

but trying to set up keyd on another device with Kernel 6.9.7 (Debian Testing) results in no result.

Can you also clarify what you mean by this? Are you saying the keyboard is rendered unusable, or simply that the mappings don't take effect? Have you tried simpler mappings like a=b?

@Artim96
Copy link
Author

Artim96 commented Jul 26, 2024

Can you confirm this behaviour on master?

I'm right now compiling 6.9.11 straight from sources. 6.10.1 didn't work, I wasn't even able to log in for whatever reason.

The output of keyd monitor after pressing some keys would also be useful.

That's working as supposed, no error messages.

Can you also clarify what you mean by this? Are you saying the keyboard is rendered unusable, or simply that the mappings don't take effect? Have you tried simpler mappings like a=b?

Mapping just doesn't have any effect. When I'm trying with the self compiled kernel I'll see to trying that out too.

@Artim96
Copy link
Author

Artim96 commented Jul 26, 2024

Ok, with 6.9.11, two things: It seems I had the lines the wrong way around. At least the replacement y=z remapped the z key to output y. But even changing it to

| = leftcontrol+leftalt+102nd
@ = leftcontrol+leftalt+q

didn't change the effects. So something with more complex layout replacement seems to fail. Also:

/usr/local/bin/keyd
CONFIG: parsing /etc/keyd/default.conf
	ERROR: line 8: invalid key or action
	ERROR: line 9: invalid key or action
Starting keyd v2.4.3 (ce1bab6)
DEVICE: match    0000:0006:bdb72f48  /etc/keyd/default.conf	(Video Bus)
DEVICE: match    046d:4023:61f4c396  /etc/keyd/default.conf	(Logitech Wireless Keyboard PID:4023)
DEVICE: match    046d:4054:949f8c25  /etc/keyd/default.conf	(Logitech Wireless Mouse)
DEVICE: ignoring 0fac:1ade:d2b36ae6  (keyd virtual pointer)

@nsbgn
Copy link

nsbgn commented Jul 26, 2024

No, the placement was correct - if y=z maps z to y, then your particular layout (outside of keyd) swaps what keyd calls z with y. The names that keyd use correspond to the names of keycodes in the en-US layout; use keyd monitor to check what the names are in your layout (yes, this is confusing :P)

As for the problem at hand, my assumption is that what you want to do does not correspond with your config. While leftcontrol+leftalt+102nd = @ is valid syntax, it is a chord (cf #320): it defines what happens when you strike those keys simultaneously. Did you mean to do this?:

[ids]

*

[main]

[control+alt]                                                                                                                                                                                
102nd = @
q = |

If not, can you give an example of what you want to happen + the output of keyd monitor when you try it?

@Artim96
Copy link
Author

Artim96 commented Jul 29, 2024

No, the placement was correct - if y=z maps z to y, then your particular layout (outside of keyd) swaps what keyd calls z with y. The names that keyd use correspond to the names of keycodes in the en-US layout; use keyd monitor to check what the names are in your layout (yes, this is confusing :P)

Indeed a bit confusing

As for the problem at hand, my assumption is that what you want to do does not correspond with your config. While leftcontrol+leftalt+102nd = @ is valid syntax, it is a chord (cf #320): it defines what happens when you strike those keys simultaneously. Did you mean to do this?:

[ids]

*

[main]

[control+alt]                                                                                                                                                                                
102nd = @
q = |

tried that, didn't work either

If not, can you give an example of what you want to happen + the output of keyd monitor when you try it?

What I want to do is compensate for the lacking support of the QWERTZ keyboard layout. With that layout it's common to have @ as a third symbol on the q key and | as the third symbol on the key to the right of the shift key (and some more combinations). These can be accessed either with the right alt key (labeled "Alt Gr") or pressing both left ctrl+left alt - at least on Windows, maybe even on macOS (I know, in the config I wrote I had them backwards). Sadly nobody ever bothered supporting these on Linux, while it's a long-standing issue. Now the easiest way would be to just remap ctrl+alt to "alt gr", but that will break any shortcut like changing tty. So an @ in keyd monitor would look like this:

keyd virtual keyboard	0fac:0ade:51e7301d	leftcontrol down
keyd virtual keyboard	0fac:0ade:51e7301d	leftalt down
keyd virtual keyboard	0fac:0ade:51e7301d	q down

and the pipe accordingly:

keyd virtual keyboard	0fac:0ade:51e7301d	leftcontrol down
keyd virtual keyboard	0fac:0ade:51e7301d	leftalt down
keyd virtual keyboard	0fac:0ade:51e7301d	102nd down

I've now changes the config to

[ids]

*

[main]

[leftcontrol+leftalt]
102nd = |
q = @

But that won't do its job either. With the shortcut for pipe, if I run that e.g. in a terminal, it will jump to the first (oldest) entry of the bash history, while the @ shortcut doesn't seem to do anything (noticeably).

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

3 participants