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

Doesnt work with steam games #268

Open
Doosty opened this issue Mar 27, 2023 · 9 comments
Open

Doesnt work with steam games #268

Doosty opened this issue Mar 27, 2023 · 9 comments

Comments

@Doosty
Copy link

Doosty commented Mar 27, 2023

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.

@k0kubun
Copy link
Contributor

k0kubun commented Mar 27, 2023

it should work with the appname that xremap itself reports on journalctl

If you specify the name that appears as application: xxx in the xremap logs, then yeah, I agree it should work.

Does the same buttons/keys work for those games if you don't specify application filter in your config? If not, it might be nice to try the same thing with v0.8.1 as well.

I'd also like to see the logs when you start xremap with an environment variable RUST_LOG like RUST_LOG=debug xremap.

@Doosty
Copy link
Author

Doosty commented Mar 27, 2023

logs:

RUST_LOG=debug xremap xremap-config.yml
Selecting devices from the following list:
------------------------------------------------------------------------------
/dev/input/event0 : Power Button
/dev/input/event1 : Power Button
/dev/input/event10: HDA ATI HDMI HDMI/DP,pcm=10
/dev/input/event11: Razer Razer Naga V2 Pro
/dev/input/event12: HDA Intel PCH Front Mic
/dev/input/event13: HDA Intel PCH Rear Mic
/dev/input/event14: HDA Intel PCH Line
/dev/input/event15: HDA Intel PCH Line Out Front
/dev/input/event16: HDA Intel PCH Line Out Surround
/dev/input/event17: HDA Intel PCH Line Out CLFE
/dev/input/event18: HDA Intel PCH Front Headphone
/dev/input/event19: Wooting WootingTwoHE
/dev/input/event2 : Razer Razer Naga V2 Pro
/dev/input/event20: Wooting WootingTwoHE System Control
/dev/input/event21: Wooting WootingTwoHE Consumer Control
/dev/input/event22: Wooting WootingTwoHE Mouse
/dev/input/event23: Wooting Two HE
/dev/input/event3 : Razer Razer Naga V2 Pro Keyboard
/dev/input/event4 : HDA ATI HDMI HDMI/DP,pcm=3
/dev/input/event5 : Razer Razer Naga V2 Pro Mouse
/dev/input/event6 : HDA ATI HDMI HDMI/DP,pcm=7
/dev/input/event7 : Razer Razer Naga V2 Pro
/dev/input/event8 : HDA ATI HDMI HDMI/DP,pcm=8
/dev/input/event9 : HDA ATI HDMI HDMI/DP,pcm=9
------------------------------------------------------------------------------
Selected keyboards automatically since --device options weren't specified:
------------------------------------------------------------------------------
/dev/input/event11: Razer Razer Naga V2 Pro
/dev/input/event19: Wooting WootingTwoHE
/dev/input/event3 : Razer Razer Naga V2 Pro Keyboard
------------------------------------------------------------------------------
[2023-03-27T19:17:17Z DEBUG xremap::event_handler] => 0: KEY_ENTER
[2023-03-27T19:17:17Z DEBUG xremap::action_dispatcher] 0: KEY_ENTER
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 1: KEY_1
application-client: Hypr (supported: true)
application: deadcells
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 1: KEY_A
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_A
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 0: KEY_1
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_1
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 1: KEY_2
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 1: KEY_B
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_B
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 0: KEY_2
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_2
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 1: KEY_3
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 1: KEY_3
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 0: KEY_3
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_3
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 1: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 1: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 0: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 1: KEY_5
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 1: KEY_E
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_E
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 0: KEY_5
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_5
[2023-03-27T19:17:22Z DEBUG xremap::event_handler] => 1: KEY_6
[2023-03-27T19:17:22Z DEBUG xremap::action_dispatcher] 1: KEY_F
[2023-03-27T19:17:22Z DEBUG xremap::action_dispatcher] 0: KEY_F
[2023-03-27T19:17:22Z DEBUG xremap::event_handler] => 0: KEY_6
[2023-03-27T19:17:22Z DEBUG xremap::action_dispatcher] 0: KEY_6
[2023-03-27T19:17:27Z DEBUG xremap::event_handler] => 1: KEY_1
application: librewolf
[2023-03-27T19:17:27Z DEBUG xremap::action_dispatcher] 1: KEY_1
[2023-03-27T19:17:27Z DEBUG xremap::event_handler] => 0: KEY_1
[2023-03-27T19:17:27Z DEBUG xremap::action_dispatcher] 0: KEY_1
[2023-03-27T19:17:27Z DEBUG xremap::event_handler] => 1: KEY_2
[2023-03-27T19:17:27Z DEBUG xremap::action_dispatcher] 1: KEY_2
[2023-03-27T19:17:27Z DEBUG xremap::event_handler] => 0: KEY_2
[2023-03-27T19:17:27Z DEBUG xremap::action_dispatcher] 0: KEY_2
[2023-03-27T19:17:28Z DEBUG xremap::event_handler] => 1: KEY_3
[2023-03-27T19:17:28Z DEBUG xremap::action_dispatcher] 1: KEY_C
[2023-03-27T19:17:28Z DEBUG xremap::action_dispatcher] 0: KEY_C
[2023-03-27T19:17:28Z DEBUG xremap::event_handler] => 0: KEY_3
[2023-03-27T19:17:28Z DEBUG xremap::action_dispatcher] 0: KEY_3
[2023-03-27T19:17:28Z DEBUG xremap::event_handler] => 1: KEY_4
[2023-03-27T19:17:28Z DEBUG xremap::action_dispatcher] 1: KEY_D
[2023-03-27T19:17:28Z DEBUG xremap::action_dispatcher] 0: KEY_D
[2023-03-27T19:17:28Z DEBUG xremap::event_handler] => 0: KEY_4
[2023-03-27T19:17:28Z DEBUG xremap::action_dispatcher] 0: KEY_4
[2023-03-27T19:17:29Z DEBUG xremap::event_handler] => 1: KEY_5
[2023-03-27T19:17:29Z DEBUG xremap::action_dispatcher] 1: KEY_E
[2023-03-27T19:17:29Z DEBUG xremap::action_dispatcher] 0: KEY_E
[2023-03-27T19:17:29Z DEBUG xremap::event_handler] => 0: KEY_5
[2023-03-27T19:17:29Z DEBUG xremap::action_dispatcher] 0: KEY_5
[2023-03-27T19:17:29Z DEBUG xremap::event_handler] => 1: KEY_6
[2023-03-27T19:17:29Z DEBUG xremap::action_dispatcher] 1: KEY_F
[2023-03-27T19:17:29Z DEBUG xremap::action_dispatcher] 0: KEY_F
[2023-03-27T19:17:29Z DEBUG xremap::event_handler] => 0: KEY_6
[2023-03-27T19:17:29Z DEBUG xremap::action_dispatcher] 0: KEY_6
[2023-03-27T19:17:32Z DEBUG xremap::event_handler] => 1: KEY_1
application: Steam
[2023-03-27T19:17:32Z DEBUG xremap::action_dispatcher] 1: KEY_1
[2023-03-27T19:17:32Z DEBUG xremap::event_handler] => 0: KEY_1
[2023-03-27T19:17:32Z DEBUG xremap::action_dispatcher] 0: KEY_1
[2023-03-27T19:17:33Z DEBUG xremap::event_handler] => 1: KEY_2
[2023-03-27T19:17:33Z DEBUG xremap::action_dispatcher] 1: KEY_2
[2023-03-27T19:17:33Z DEBUG xremap::event_handler] => 0: KEY_2
[2023-03-27T19:17:33Z DEBUG xremap::action_dispatcher] 0: KEY_2
[2023-03-27T19:17:33Z DEBUG xremap::event_handler] => 1: KEY_3
[2023-03-27T19:17:33Z DEBUG xremap::action_dispatcher] 1: KEY_3
[2023-03-27T19:17:33Z DEBUG xremap::event_handler] => 0: KEY_3
[2023-03-27T19:17:33Z DEBUG xremap::action_dispatcher] 0: KEY_3
[2023-03-27T19:17:34Z DEBUG xremap::event_handler] => 1: KEY_4
[2023-03-27T19:17:34Z DEBUG xremap::action_dispatcher] 1: KEY_4
[2023-03-27T19:17:34Z DEBUG xremap::event_handler] => 0: KEY_4
[2023-03-27T19:17:34Z DEBUG xremap::action_dispatcher] 0: KEY_4
[2023-03-27T19:17:34Z DEBUG xremap::event_handler] => 1: KEY_5
[2023-03-27T19:17:34Z DEBUG xremap::action_dispatcher] 1: KEY_E
[2023-03-27T19:17:34Z DEBUG xremap::action_dispatcher] 0: KEY_E
[2023-03-27T19:17:34Z DEBUG xremap::event_handler] => 0: KEY_5
[2023-03-27T19:17:34Z DEBUG xremap::action_dispatcher] 0: KEY_5
[2023-03-27T19:17:35Z DEBUG xremap::event_handler] => 1: KEY_6
[2023-03-27T19:17:35Z DEBUG xremap::action_dispatcher] 1: KEY_F
[2023-03-27T19:17:35Z DEBUG xremap::action_dispatcher] 0: KEY_F
[2023-03-27T19:17:35Z DEBUG xremap::event_handler] => 0: KEY_6
[2023-03-27T19:17:35Z DEBUG xremap::action_dispatcher] 0: KEY_6
[2023-03-27T19:17:38Z DEBUG xremap::event_handler] => 1: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::action_dispatcher] 1: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::event_handler] => 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::action_dispatcher] 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::event_handler] => 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::action_dispatcher] 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::event_handler] => 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::action_dispatcher] 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::event_handler] => 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::action_dispatcher] 2: KEY_LEFTCTRL
[2023-03-27T19:17:38Z DEBUG xremap::event_handler] => 1: KEY_C
[2023-03-27T19:17:38Z DEBUG xremap::action_dispatcher] 1: KEY_C
^C

config:

{"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"}}]}

Keys typed in each app were 1 2 3 4 5 6

  • Deadcells received: _ _ 3 4 _ _ (_ meaning that nothing at all was sent)
  • Librewolf received 1 2 c d e f
  • Steam received 1 2 3 4 e f

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

@k0kubun
Copy link
Contributor

k0kubun commented Mar 27, 2023

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:

[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 1: KEY_1
application-client: Hypr (supported: true)
application: deadcells
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 1: KEY_A
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_A
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 0: KEY_1
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_1
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 1: KEY_2
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 1: KEY_B
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_B
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 0: KEY_2
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 0: KEY_2
[2023-03-27T19:17:20Z DEBUG xremap::event_handler] => 1: KEY_3
[2023-03-27T19:17:20Z DEBUG xremap::action_dispatcher] 1: KEY_3
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 0: KEY_3
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_3
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 1: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 1: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 0: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_4
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 1: KEY_5
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 1: KEY_E
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_E
[2023-03-27T19:17:21Z DEBUG xremap::event_handler] => 0: KEY_5
[2023-03-27T19:17:21Z DEBUG xremap::action_dispatcher] 0: KEY_5
[2023-03-27T19:17:22Z DEBUG xremap::event_handler] => 1: KEY_6
[2023-03-27T19:17:22Z DEBUG xremap::action_dispatcher] 1: KEY_F
[2023-03-27T19:17:22Z DEBUG xremap::action_dispatcher] 0: KEY_F
[2023-03-27T19:17:22Z DEBUG xremap::event_handler] => 0: KEY_6
[2023-03-27T19:17:22Z DEBUG xremap::action_dispatcher] 0: KEY_6

On deadcells, you typed 123456, and xremap emitted ab34ef, which seems to be the behavior expected by the config. It's not "nothing at all was sent". Can you explain what behavior you expect on deadcells?

@k0kubun
Copy link
Contributor

k0kubun commented Mar 27, 2023

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?

@Doosty
Copy link
Author

Doosty commented Mar 27, 2023

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.

@k0kubun
Copy link
Contributor

k0kubun commented Mar 28, 2023

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 keypress_delay_ms: 20 (top-level, no indentation) in your config.

@Doosty
Copy link
Author

Doosty commented Mar 28, 2023

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.

[2023-03-28T16:03:22Z DEBUG xremap::event_handler] => 0: KEY_ENTER
[2023-03-28T16:03:22Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019402, tv_nsec: 616418000 }, kind: Key(KEY_ENTER), value: 0 }
[2023-03-28T16:03:29Z DEBUG xremap::event_handler] => 1: KEY_ESC
[2023-03-28T16:03:29Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019409, tv_nsec: 391294000 }, kind: Key(KEY_ESC), value: 1 }
[2023-03-28T16:03:29Z DEBUG xremap::event_handler] => 0: KEY_ESC
[2023-03-28T16:03:29Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019409, tv_nsec: 485308000 }, kind: Key(KEY_ESC), value: 0 }
[2023-03-28T16:03:33Z DEBUG xremap::event_handler] => 1: KEY_F13
application-client: Hypr (supported: true)
application: deadcells
[2023-03-28T16:03:33Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019413, tv_nsec: 183883000 }, kind: Key(KEY_Q), value: 1 }
[2023-03-28T16:03:33Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019413, tv_nsec: 183910000 }, kind: Key(KEY_Q), value: 0 }
[2023-03-28T16:03:34Z DEBUG xremap::event_handler] => 0: KEY_F13
[2023-03-28T16:03:34Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019414, tv_nsec: 184020000 }, kind: Key(KEY_F13), value: 0 }
[2023-03-28T16:03:35Z DEBUG xremap::event_handler] => 1: KEY_F13
[2023-03-28T16:03:35Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019415, tv_nsec: 862256000 }, kind: Key(KEY_Q), value: 1 }
[2023-03-28T16:03:35Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019415, tv_nsec: 862283000 }, kind: Key(KEY_Q), value: 0 }
[2023-03-28T16:03:36Z DEBUG xremap::event_handler] => 0: KEY_F13
[2023-03-28T16:03:36Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019416, tv_nsec: 862391000 }, kind: Key(KEY_F13), value: 0 }
[2023-03-28T16:03:38Z DEBUG xremap::event_handler] => 1: KEY_F21
[2023-03-28T16:03:38Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019418, tv_nsec: 659607000 }, kind: Key(KEY_E), value: 1 }
[2023-03-28T16:03:38Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019418, tv_nsec: 659636000 }, kind: Key(KEY_E), value: 0 }
[2023-03-28T16:03:39Z DEBUG xremap::event_handler] => 0: KEY_F21
[2023-03-28T16:03:39Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019419, tv_nsec: 659781000 }, kind: Key(KEY_F21), value: 0 }
[2023-03-28T16:03:40Z DEBUG xremap::event_handler] => 1: KEY_F21
[2023-03-28T16:03:40Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019420, tv_nsec: 414850000 }, kind: Key(KEY_E), value: 1 }
[2023-03-28T16:03:40Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019420, tv_nsec: 414877000 }, kind: Key(KEY_E), value: 0 }
[2023-03-28T16:03:41Z DEBUG xremap::event_handler] => 0: KEY_F21
[2023-03-28T16:03:41Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019421, tv_nsec: 414993000 }, kind: Key(KEY_F21), value: 0 }
[2023-03-28T16:03:43Z DEBUG xremap::event_handler] => 1: KEY_ESC
[2023-03-28T16:03:43Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019423, tv_nsec: 614130000 }, kind: Key(KEY_ESC), value: 1 }
[2023-03-28T16:03:43Z DEBUG xremap::event_handler] => 0: KEY_ESC
[2023-03-28T16:03:43Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019423, tv_nsec: 745184000 }, kind: Key(KEY_ESC), value: 0 }
[2023-03-28T16:03:44Z DEBUG xremap::event_handler] => 1: KEY_LEFTCTRL
[2023-03-28T16:03:44Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019424, tv_nsec: 538305000 }, kind: Key(KEY_LEFTCTRL), value: 1 }
[2023-03-28T16:03:44Z DEBUG xremap::event_handler] => 2: KEY_LEFTCTRL
[2023-03-28T16:03:44Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019424, tv_nsec: 791989000 }, kind: Key(KEY_LEFTCTRL), value: 2 }
[2023-03-28T16:03:44Z DEBUG xremap::event_handler] => 2: KEY_LEFTCTRL
[2023-03-28T16:03:44Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019424, tv_nsec: 825979000 }, kind: Key(KEY_LEFTCTRL), value: 2 }
[2023-03-28T16:03:44Z DEBUG xremap::event_handler] => 1: KEY_C
[2023-03-28T16:03:44Z DEBUG xremap::action_dispatcher] InputEvent { time: SystemTime { tv_sec: 1680019424, tv_nsec: 855318000 }, kind: Key(KEY_C), value: 1 }
^C

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.

@Doosty
Copy link
Author

Doosty commented Mar 28, 2023

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.

@k0kubun
Copy link
Contributor

k0kubun commented Mar 29, 2023

Hey the release-delay branch works!

Nice 🙂

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.

Did you need to increase it from 20ms to 1000ms to make it work? It's supposed to be made as small as possible.

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.

Yeah, this is a known problem. I can't find the issue for it, but at least #189 seems relevant.

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.

At this point, I feel like keypress_delay_ms could be obviated once the above repeat problem is addressed. For now, please use the top-level keypress_delay_ms on the release-delay branch.

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