dual-key-remap icon indicating copy to clipboard operation
dual-key-remap copied to clipboard

Timeout for a key event

Open jeremies opened this issue 4 years ago • 9 comments

It would be very great to implement this feature:

If you hold a key longer than a timeout specified at the config file or with a default value (e.g. 500 ms), dual-key-remap will not generate a key event.

See for example:

https://github.com/alols/xcape#-t-timeout-ms

jeremies avatar Sep 28 '20 11:09 jeremies

This is a great suggestion! I'll give this is a shot with the next set of features I'm going to implement.

ililim avatar Oct 01 '20 00:10 ililim

this would be great!

kriipke avatar Mar 29 '22 10:03 kriipke

this would be great!

I just tried dual-key-remap and find it really useful but I would need this feature.

I come from lydell/dual and use this feature.

  • dual.settings := {delay: 70, timeout: 300, doublePress: -1, specificDelays: false}

dsmitran avatar Aug 03 '23 11:08 dsmitran

Maybe you can check my fork: https://github.com/ulixxe/BigCtrl (check config.sample.txt).

ulixxe avatar Aug 03 '23 15:08 ulixxe

@ulixxe Hey, thanks for the fork! Would it be possible to rebase it on top of the latest dual-key-remap commits? I've got an issue with BigCtrl that it doesn't seem to correctly handle situations like "press K, press caps, release K, press S" which results in S pass-through instead of Ctrl-S, while dual-key-remap seems to handle this correctly.

igor-akhmetov avatar Apr 13 '24 19:04 igor-akhmetov

Hi Igor, it is better if you open a new issue under BigCtrl. Anyway, what is your config.txt? When do you press S in above sequence?

ulixxe avatar Apr 13 '24 20:04 ulixxe

@ulixxe Issues seem to be disabled in BigCtrl, or am I misunderstanding something? About the sequence - sorry, I meant it to end with "press S". The config I tried is

remap_key=CAPSLOCK
when_alone=ESCAPE
with_other=CTRL
hold_delay=0
tap_timeout=500
doublepress_timeout=0

The debug output from BigCtrl is:

(input) KEY_K DOWN [scan:0x25 virt:0x4b flags:0x0 dwExtraInfo:0x0]
(input) CAPSLOCK DOWN [scan:0x3a virt:0x14 flags:0x0 dwExtraInfo:0x0]
(event) event_remapped_key_down
(input) KEY_K UP   [scan:0x25 virt:0x4b flags:0x80 dwExtraInfo:0x0]
(send) ESCAPE DOWN
(input) KEY_S DOWN [scan:0x1f virt:0x53 flags:0x0 dwExtraInfo:0x0]
(input) CAPSLOCK UP   [scan:0x3a virt:0x14 flags:0x80 dwExtraInfo:0x0]
(event) event_remapped_key_up
(input) KEY_S UP   [scan:0x1f virt:0x53 flags:0x80 dwExtraInfo:0x0]

Compared to the debug output from dual-key-remap:

(input) KEY_K DOWN [scan:0x25 virt:0x4b]
(input) CAPSLOCK DOWN [scan:0x3a virt:0x14]
(event) event_remapped_key_down
(input) KEY_K UP   [scan:0x25 virt:0x4b]
(send) CTRL DOWN
(input) KEY_S DOWN [scan:0x1f virt:0x53]
(input) CAPSLOCK UP   [scan:0x3a virt:0x14]
(event) event_remapped_key_up
(send) CTRL UP
(input) KEY_S UP   [scan:0x1f virt:0x53]

Thanks!

igor-akhmetov avatar Apr 13 '24 21:04 igor-akhmetov

Hi Igor, the issue tab was not enabled on my fork. I enabled it and push the "wip" branch that maybe fix your issue. Pleas let me know it if fixes your issue.

ulixxe avatar Apr 14 '24 15:04 ulixxe

@ulixxe Seems like the issue is fixed, thanks a lot!

igor-akhmetov avatar Apr 14 '24 17:04 igor-akhmetov