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
Doesnt work with steam games #268
Comments
If you specify the name that appears as Does the same buttons/keys work for those games if you don't specify I'd also like to see the logs when you start xremap with an environment variable |
logs:
config:
Keys typed in each app were 1 2 3 4 5 6
Deadcells is running natively on wayland, Hades is running on xwayland but has the same behavior as deadcells from what i can tell. Xremap version is 0.8.2 , installed on NixOS using this module https://github.com/xremap/nix-flake |
Your config is: keymap:
- application:
only: deadcells
name: game
remap:
KEY_1: a
KEY_2: b
- application:
only: librewolf
name: browser
remap:
KEY_3: c
KEY_4: d
- name: all
remap:
KEY_5: e
KEY_6: f and looking at:
On deadcells, you typed |
If every key remapped by xremap is simply not recognized by applications on Wayland, here's a theory: events not remapped by xremap are sent as is, so they have an internal field that represents a timestamp, but events remapped by xremap are newly created using a library that doesn't set the field, so they don't. X11/XWayland handles that fine, but Wayland/Hyprland doesn't like how those events are built. If you agree that my assumptions are in sync with what you observe, I can try to create a version whose events work more like the original events. Do you think it's worth trying? |
Like you said the config and the logs show that those keys should be emitted, but in practice they were not. ab and ef were not received by deadcells, they literally did nothing, not even what they usually do when xremap is not running. Xremap just creates dead keys in steam games for me, but works fine on other apps. And like i said i tested one game on Xwayland and one on native Wayland and same story. Maybe im an outlier since i guess im the first one to report this, so i wont ask you to change the code, i just thought there would be some simple solution, something i missed. |
I see. This seems like a new problem to me, so I don't know of any quick solution. Can you build xremap from https://github.com/k0kubun/xremap/tree/event-log and share the logs again? It looks like xremap already embeds a timestamp on generated events, but I want to double-check the timestamps are ordered correctly. I'd like you to also separately test https://github.com/k0kubun/xremap/tree/release-delay as well with |
Hey the release-delay branch works! The event-log branch still does not work, even though i used it with the keypress_delay_ms option. Here are the logs if interested, F13 is mapped to q, F21 is mapped to e, key delay is 1000ms.
There is also something i feel like i should mention. While testing the release-delay tree i temporarily increased the keypress_delay_ms option to 1000 and noticed some weird behavior. When pressing the key, the mapped key was held for 1000ms as expected, however afterwards i was unable to press anything for an additional 1000ms, totaling 2000ms where i was unable to take any action in the game with the keypress_delay_ms option set to 1000. This is something i would not notice with 20ms delay. PS: is it possible to have this keypress_delay_ms option on a per application basis instead of it being top level? So i would only enable it in apps where it is needed. Thanks. |
Also now finding out that holding the remapped key just queues up the 'hold for x then release' actions instead of properly holding. For example if i wanted to remap my W key it would be impossible, xremap would just stutter step my forwards movement in the game. |
Nice 🙂
Did you need to increase it from 20ms to 1000ms to make it work? It's supposed to be made as small as possible.
Yeah, this is a known problem. I can't find the issue for it, but at least #189 seems relevant.
At this point, I feel like |
Tried with game Dead cells (appname: deadcells) and Hades (appname: steam_app_1145360). Works with firefox and librewolf though so my configs are valid. I also tried a bunch of other application names and none work, but anyway it should work with the appname that xremap itself reports on journalctl and it doesnt. Im on NixOS, Hyprland. Help much appreciated.
The text was updated successfully, but these errors were encountered: