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

Other keys can "pass" a layer lock bound to a superkey #1004

Open
ncbrowns opened this issue Feb 11, 2025 · 3 comments
Open

Other keys can "pass" a layer lock bound to a superkey #1004

ncbrowns opened this issue Feb 11, 2025 · 3 comments
Labels
bug Something isn't working

Comments

@ncbrowns
Copy link

Describe the bug
I have configured a "shift" superkey on my Defy that is designed to support:

  • normal shift operations
  • caps lock
  • a "caps_word" feature that uses layer lock to transition to a layer that automatically applies Shift to all letters and jumps back to the base layer when any key other than letters, numbers, minus/underscore, or backspace is pressed

The superkey is configured as:

tap: LShift
hold: LShift
tap/hold: Caps Lock
2 tap: Layer 10 (lock)
2 tap/hold: have tried no key, Caps Lock, and Layer 10 (lock)

For the caps word feature, I expect to double tap the shift key, start typing the word, and then type a key that ends the word. For example, a sequence like: 2 tap Shift, h, e, l, l, o, space, t, h, e, r, e should produce the output "HELLO there".

If I type this sequence slowly, things work as expected. However, if I type the sequence of keys quickly enough, the output is "hELLO there". I expect that what's happening here is:

  • after the second tap of Shift, the keyboard firmware is waiting to see if there's a third tap (HOLD) before the timeout expires
  • while the firmware is waiting, "h" is typed and is apparently interpreted using the base layer

My expectation is that if you press any other key in the middle of a superkey, all timeouts for the superkey should be cancelled and the superkey should be processed before the new key.

To Reproduce
Steps to reproduce the behavior:

  • see above

Expected behavior

  • see above

Screenshots

  • not necessary

Desktop (please complete the following information):

  • OS: Windows 11
  • Bazecor Version: 1.6.3
  • Firmware: Same problem appears with 1.2.7-beta and v2.0.0-beta.15

Additional context
N/A

@ncbrowns ncbrowns added the bug Something isn't working label Feb 11, 2025
@MiquelDygma
Copy link

Hi!

In the preferences menu, under Typing and Keys, you can configure the Next Tap timeout, which determines how much a Superkey waits for the next tap.

With a low value, you need to be fast pressing the next tap, or the Superkey will output the previous tap.
With a high value, it will take more time for the Superkey to output the second tap.

Could you try adjusting that?

@ncbrowns
Copy link
Author

I did try adjusting the timeouts some, but I didn't find a sweet spot. I am currently working around the issue by devoting one thumb key to the "caps word" feature, where I can use a simple layer lock.

I filed the ticket mostly to request a superkeys behavior similar to "Add Key on Tap" where the documentation on Bazecor says "Pressing another key at the same time triggers the hold function for this key". It feels like the behavior when another key is pressed while a superkey is still waiting for its timeouts should be:

  • If the superkey has been pressed once but not released, perform the single tap action and then process the other key.
  • If the superkey has been pressed once and is still held, perform the hold action and then process the other key.
  • If the superkey has been pressed and released once and is now pressed and hold, perform the tap and hold action and then process the other key.
  • If the superkey has been pressed and released twice and is now released waiting for another press, perform the two tap action and then process the other key.
  • If the superkey has been pressed and released twice and is now being held a third time, perform the two tap and hold action and then process the other key.

I'm not sure if it makes sense for superkeys to have the same sort of overlap threshold that "Add Key on Tap" supports. The overlap threshold is useful for "home row mods" where you add a modifier to keys you type frequently in long runs of letters, but superkeys feel more like something you bind to special keys where typing runs are less frequent.

@MiquelDygma
Copy link

Hi!

Our idea is to have that overlap threshold only work when you have tap and hold configured in the superkeys. That way they will behave like Add key on tap, but with more options for keys on tap (like shortcuts, macros...)

It's not working well at the moment (superkeys are in beta) but it should in the future.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants