-
Notifications
You must be signed in to change notification settings - Fork 186
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
[Question] Overload + Double Tap? = Capslock = esc on tap, control on hold, capslock toggle on doubletap within X ms? #879
Comments
I would think along the following lines first:
... but this doesn't do exactly what you want because the Another attempt:
... but this would mean you lose the timeout on the double tap. This, in turn, would be addressed by the feature request in #671. Either approach is also rather verbose. There are a couple of feature requests that would address this, so hopefully this sort of thing will be easier in later versions (ie. #681, #705). Sorry to reference all these open feature requests, but I guess it's good to keep track :P |
Thanks for compiling all of this and confirming what I suspected; there appears to be no clean functional way to perform this at this time. As you mentioned hopefully this will be solved at some point as it seems to be a somewhat common scenario once you go down the hole of optimizing your keystrokes and trying to leverage ability to stay on home row as much as possible without removing functionality at the same time. |
While I can't do exactly what you're saying, I can come quite close with existing functionality:
I am using 800ms, for the CapsLock hold time, but you can adjust it of course. The nice thing is that once you strike another key in combination with CapsLock, then the timer is cancelled and there is no danger of engaging CapsLock. |
This patch expands the semantics of timeout() to cover the case in which it is used as a tap target. This facilitates a number of novel use cases, like discriminating between single/double tap or implementing per-key oneshot timeouts. Specifically timeout() is now defined in terms of arbitrary key events rather than the behaviour of the key to which it is bound (if any). The new definition executes the second action if no key events occur before the timeout expires. The implication of this is that when timeout() is executed as the result of a tap action, action2 will be executed after the timeout expires unless another key is struck in the interval. Note that this is backward compatible with the old definition, since a key up event (i.e a tap) will result in a resolution to the first action if timeout() is directly bound to a key. For Example: tab = overload(control, timeout(a, 100, b)) will presently produce no effect when 'tab' is tapped. Under the expanded definition, tapping tab will produce 'b' if 100 milliseconds elapse without an interceding key event.
I believe the latest update to
A bit of a faff, but it should do the trick. This works because |
* man: Add note about config file exclusivity * readme: Add explicit mention of wayland (rvaiya#559) * man: Add note about maximum layer name length * config: Allow 64 character layer names (rvaiya#558) * Long overdue release * docs: Fix changelog typos * readme: Update arch package location This has been imported into Arch's [extra] repository. * make: Move service generation into install target (rvaiya#801) * config: Increase the nested descriptor limit * Enable GNOME extension for v47 * overloadi: Account for shifted symbols (rvaiya#875) * Update README.md since it says "Install AND start" adding `--now` might make more sense! * keyd-application-mapper: Add support for the pop-os cosmic desktop * keyd-application-mapper: Fix wlroots support for new windows * readme: Combine systemctl `enable` and `start` commands by using `--now` * readme: Fix broken QMK link * ipc: Explicitly account for failure in the early stages of the connection (eliminates annoying compiler warning) * evdev: Add support for AL_* family of keys found on some laptops * listen: Eagerly terminate on pipe closure to accommodate more scripting use cases * config: Make main a proper layout * doc: Add Half-QWERTY layout to examples This layout has been very useful to me for typing only with the right hand. I did not test it for left-handed typing. * doc: Add chromebook-linux.conf to examples * keyd-application-mapper: Fix string escape bug causing issues on some platforms (rvaiya#649) * layouts: Fix 0 in the FR layout * core: Add special case for volume key devices in capabilities check * doc: Add examples for common patterns. * doc: Add additional key mappings to the chromeos example * config: Increase macro size * core: Improve support for thinkpad keyboards (rvaiya#905) * layouts: Add graphite-angle-kp keyboard layout * layouts: Add graphite keyboard layout * core: Improve support for exotic mice * core: Fix compilation on older systems * Add support for scroll remapping * doc: Add macos example to the readme * Tweak readme example * Improve mouse button support * Add missing entries ` for the letter ḏal Shift + ` for the shaddah Shift + 0 for left parenthesis * Add eastern Arabic zero * core: Avoid interpreting remapped keys as part of a panic sequence (rvaiya#929) * layout: Update graphite-angle-kp Corrected a key, it was just a typo I guess. ref : https://github.com/rdavison/graphite-layout * doc: Update the application mapper man page Clarifies that the verbose flag is needed to see window events in the output. * keyd-application-mapper: Process SIGUSR1 on wayland (rvaiya#935) * macro2: Fix timeout bug for nested macros * doc: Update README * keyd-application-mapper: Refactor wayland code Clean up Wayland() and allow binding to multiple protocol objects simultaneously * timeout: Add new behaviour when used as a tap target (rvaiya#879, rvaiya#738, rvaiya#944) This patch expands the semantics of timeout() to cover the case in which it is used as a tap target. This facilitates a number of novel use cases, like discriminating between single/double tap or implementing per-key oneshot timeouts. Specifically timeout() is now defined in terms of arbitrary key events rather than the behaviour of the key to which it is bound (if any). The new definition executes the second action if no key events occur before the timeout expires. The implication of this is that when timeout() is executed as the result of a tap action, action2 will be executed after the timeout expires unless another key is struck in the interval. Note that this is backward compatible with the old definition, since a key up event (i.e a tap) will result in a resolution to the first action if timeout() is directly bound to a key. For Example: tab = overload(control, timeout(a, 100, b)) will presently produce no effect when 'tab' is tapped. Under the expanded definition, tapping tab will produce 'b' if 100 milliseconds elapse without an interceding key event. * macro: Eagerly restore modifiers post execution (fixes rvaiya#947) * macro: Ensure modifier state is properly tracked during macro execution --------- Co-authored-by: Raheman Vaiya <[email protected]> Co-authored-by: ainola <[email protected]> Co-authored-by: birdbird <[email protected]> Co-authored-by: Chris Schepman <[email protected]> Co-authored-by: Pavel Slepushkin <[email protected]> Co-authored-by: blankie <[email protected]> Co-authored-by: Rajas Paranjpe <[email protected]> Co-authored-by: diegorodriguezv <[email protected]> Co-authored-by: Egor Pasko <[email protected]> Co-authored-by: Merith <[email protected]> Co-authored-by: Ridwan Mulyadi <[email protected]> Co-authored-by: Fleefie <> Co-authored-by: Garbaz <[email protected]> Co-authored-by: Leandro M. Peralta <[email protected]> Co-authored-by: Dick Marinus <[email protected]> Co-authored-by: aljustiet <[email protected]> Co-authored-by: Justin <[email protected]> Co-authored-by: Awelaa <[email protected]> Co-authored-by: Cédric <[email protected]> Co-authored-by: Robert Benson <[email protected]>
I'm loving the functionality from keyd as it's allowing me to mimic a lot of the configurations I have within QMK for my mech keyboards on my laptop keyboards; however, I'm being challenged to get the following to work. Is this possible?
Capslock Single tap = ESC
Capslock Hold = CTRL
Double Tap Capslock (within X ms) = Toggle Capslock
The text was updated successfully, but these errors were encountered: