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

Config is only applied sometimes. #22

Closed
rpbranco opened this issue Aug 29, 2021 · 6 comments
Closed

Config is only applied sometimes. #22

rpbranco opened this issue Aug 29, 2021 · 6 comments

Comments

@rpbranco
Copy link

Hello, I am running version 1.1.2 and my config is:

capslock = overload(arrows, esc)

[arrows:main]
h = left
j = down
k = up
l = right

But this config seems to only be applied sometimes.
The config is stored in '/etc/keyd/AT Translated Set 2 keyboard.cfg' and the device name is AT Translated Set 2 keyboard.

When the config is applied properly the logs are:

-- Boot 9322d9a7267e4abfacc26c60cd9beb1f --
ago 29 16:36:21 amos systemd[1]: Started key remapping daemon.
ago 29 16:36:21 amos keyd[366]: Starting keyd v1.1.2 (8df75b749b9131faeb551c84efebca9762047649).
ago 29 16:36:22 amos keyd[366]: Managing AT Translated Set 2 keyboard

Otherwise they are:

-- Boot a83ee4fbd1ad4e1d8866ad2c8c2dedd7 --
ago 29 16:38:45 amos systemd[1]: Started key remapping daemon.
ago 29 16:38:45 amos keyd[365]: Starting keyd v1.1.2 (8df75b749b9131faeb551c84efebca9762047649).

Restarting the daemon fixes part of the problem.
While the capslock is pressed the arrows layer is available, but when it is tapped, it does not work like escape.

The logs are:

-- Boot a83ee4fbd1ad4e1d8866ad2c8c2dedd7 --
ago 29 16:38:45 amos systemd[1]: Started key remapping daemon.
ago 29 16:38:45 amos keyd[365]: Starting keyd v1.1.2 (8df75b749b9131faeb551c84efebca9762047649).
ago 29 16:45:08 amos keyd[365]: SIGTERM received, cleaning up and terminating...
ago 29 16:45:08 amos systemd[1]: Stopping key remapping daemon...
ago 29 16:45:09 amos systemd[1]: keyd.service: Deactivated successfully.
ago 29 16:45:09 amos systemd[1]: Stopped key remapping daemon.
ago 29 16:45:09 amos systemd[1]: Started key remapping daemon.
ago 29 16:45:09 amos keyd[3378]: Starting keyd v1.1.2 (8df75b749b9131faeb551c84efebca9762047649).
ago 29 16:45:09 amos keyd[3378]: Managing AT Translated Set 2 keyboard

Do you know how to fix this issue?

Thank you for your amazing work.

@rvaiya
Copy link
Owner

rvaiya commented Aug 29, 2021

While the capslock is pressed the arrows layer is available, but when it is tapped, it does not work like escape.

Your config looks fine, and works as expected on my machine. Can you provide the output of keyd -m after pressing capslock+j and then simply tapping capslock? Do this while keyd is both running and not running.

But this config seems to only be applied sometimes. The config is stored in '/etc/keyd/AT Translated Set 2 keyboard.cfg' and the device name is AT Translated Set 2 keyboard.

Can you create a separate issue for this? In it please specify when this occurs (on startup, when manually starting keyd, when unplugging/plugging in your keyboard, etc) as well as the model of your keyboard.

Thanks

@rvaiya rvaiya closed this as completed Aug 29, 2021
@rvaiya rvaiya reopened this Aug 29, 2021
@rpbranco
Copy link
Author

Your config looks fine, and works as expected on my machine. Can you provide the output of keyd -m after pressing capslock+j and then simply tapping capslock? Do this while keyd is both running and not running.

The output of keyd -m:

  • Without keyd running:
AT Translated Set 2 keyboard: enter up
AT Translated Set 2 keyboard: capslock down
AT Translated Set 2 keyboard: j down
JAT Translated Set 2 keyboard: j up
AT Translated Set 2 keyboard: capslock up
AT Translated Set 2 keyboard: capslock down
AT Translated Set 2 keyboard: capslock up
  • With keyd running (but capslock not working as escape):
keyd virtual keyboard: enter up
keyd virtual keyboard: down down
^[[Bkeyd virtual keyboard: down up
keyd virtual keyboard: esc down
keyd virtual keyboard: esc up
  • With keyd running:
keyd virtual keyboard: enter up
keyd virtual keyboard: down down
^[[Bkeyd virtual keyboard: down up
keyd virtual keyboard: esc down
keyd virtual keyboard: esc up
^[

Can you create a separate issue for this? In it please specify when this occurs (on startup, when manually starting keyd, when unplugging/plugging in your keyboard, etc) as well as the model of your keyboard.

Sure, no problem.

Thanks!

@rvaiya
Copy link
Owner

rvaiya commented Aug 31, 2021

It's not clear what the difference between the last two logs is. Do you mean it works some of the time? According to both logs it looks like the appropriate sequences are being generated.

Please try the same combinations with:

xev|perl -ne '$t="down" if /KeyPress/;if(/keysym.*?, *(.*?)\)/) { print "$1 $t\n";$t="up"; }'

It will help verify that they are getting propagated up the input stack. Make sure you focus on the xev window when pressing the keys. Do you have any other remapping software running?

@rvaiya
Copy link
Owner

rvaiya commented Sep 6, 2021

Any update?

@rpbranco
Copy link
Author

rpbranco commented Sep 7, 2021

The problem was that I was swapping escape and capslock in /etc/X11/xorg.conf.d/00-keyboard.conf using Option "XkbOptions" "caps:swapescape".

Sorry for wasting your time. I do not know how I forgot to check this in the first place.

@rvaiya
Copy link
Owner

rvaiya commented Sep 7, 2021

No worries. I suspected that might be the case given the output you send. Thanks for the confirmation.

@rvaiya rvaiya closed this as completed Sep 7, 2021
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

2 participants