-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
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
keyd
only remaps laptop keyboard
#226346
Comments
Hi @kylechui, I'm the developer of this service. Tbh, it's really experimental :) When I was writing and testing it also worked with external keyboards if I remember correctly. But now I plugged in a USB keyboard and it doesn't work. I will try to investigate this issue and report back. I also noticed some strange behavior that I haven't resolved yet but want to note: sometimes if you do |
Mini update. I found that everything works fine if I plug in the keyboard before turning on the laptop. But if you connect after that, it will not work.
Although it says that |
I remembered. At first it worked because I did not use the @pennae you don't know what it could be related to? |
@ybnesm could be that this is another problem with |
No, it doesn't work without |
running as root is very not great, but if it's the only way to get this working then send it. don't have the time to try and debug this, until someone does a broken service doesn't help anyone |
@ybnesm No worries about the stability, I'm just glad that you took the time to even create this service at all :) Based on what you've shared here, I assume something like |
No, if you plug in the keyboard before turning on the laptop, it should work fine (in my case it works). But if you turn on the laptop and then plug in the keyboard you may restart the service as a workaround. |
Tangentially related, but Edit: I tried restarting the service and it works great now! |
I'll try to add it as an extra option "libinputQuirks = true" or something like that. Sometimes I also suffer without |
@woojiq Not sure if this is the right place to ask, but as the author of the service module, would you be able to confirm whether the application specific config works for keyd on NixOS? |
I've never used this configuration in keyd so Idk. As far as I know this should work, but if not, it's the same problem with |
@woojiq For me it didn't work, but then again, I am relatively new to NixOS, so I am not sure whether it was due to my unstable keyd package, as I am stable Nix with everything else. So to the best of my abilities, I think the application-specific config didn't work. However, I ended solving my problem by rebinding the keys within the application, which was possible in this case. But I'd say, definitely look into this before the package/service gets moved to stable. Will look forward to using the service in the future though, for other applications, as it is just a handy tool to have in ones toolbelt. |
@waot Check it out https://github.com/rvaiya/keyd#application-specific-remapping-experimental. As you can see, you need to write these settings in the As a "temporary" workaround, if you use P.S. If you have any more questions, it's best to create a new issue as I expect this issue to be closed tomorrow 😃 |
@kylechui, the bug is fixed. Update unstable packages to the latest ones. Can you confirm that everything is working properly? And if it works, you can close this issue. I tried adding features to enable the "Disable while typing" feature but it didn't work 😞 I've looked through the keyd issue/discussion and commit history a few times, it looks like it won't be easy to do. The author himself recently removed the quirks from repo, because many cornerstones derive from this. |
I'm still a bit new to Nix, and couldn't find out how to update the packages repository. Since I'm using Home-manager with a flake, I thought that rebuilding might do the trick but it doesn't seem to be the case, nor did |
Before rebuilding you need to update your flake.lock file. Footnotes |
Thanks for the help; things are looking good from my end! |
I dug into this a little bit, and it seems the permissions that are given to the process by systemd only affect devices that were already there by the time the service starts, hence, plugging in a keyboard after it's started will not work. I tried to fix this using the following
This restarts the service when a keyboard is added (if the service was already started… else |
Describe the bug
I'm using the experimental
services.keyd
to try and remap some keys. It remaps the keys properly on my laptop's built-in keyboard, but not an external keyboard that I plugged in.Steps To Reproduce
Steps to reproduce the behavior:
nixpkgs
configuration.nix
Expected behavior
Since
ids
is set to[ "*" ]
, all keyboards should have their bindings remapped, regardless of whether they are internal or not.Screenshots
N/A
Additional context
I am running NixOS 22.11 and am relatively new to Nix, so please let me know if there's anything I'm doing incorrectly.
Notify maintainers
Metadata
Please run
nix-shell -p nix-info --run "nix-info -m"
and paste the result.The text was updated successfully, but these errors were encountered: