KeyCap
KeyCap copied to clipboard
Mod-Tap, implementation
https://zmk.dev/docs/behaviors/mod-tap https://github.com/davebrny/long-press.git
This page has an example of the behavior I want to achieve, for example: When i click "a" it outputs "a" I hold for a determined time the key "a", let's say 100ms, it outputs "A"
I don't need the repeating "aaaaaa", I want to use the hold a key instead of the shift key.
I can achieve this behavior with this app?
Unfortunately this is not supported in the current version.
That's an interesting use case. I'll leave this open as an item for consideration in future versions.
I put together a prototype version of the long press on inputs and will further develop it: https://github.com/nhmkdev/KeyCap/releases/tag/v.2.0.0.5
One major issue is that the timing for the long press is currently 1 second (way more than 100ms as you mentioned). I hope to make the value customizable in a future version.
1s is really a long time in this kind of functionality. 200ms is a time i'll use in my custom keyboard. A customizable delay is really inportant, because people are different.
🖖
I saw that you implemented! And with independent custom timing! I'm testing it, and really loved the work.
Many thanks!
Edit, I found that it interferes with the keyboard shortcuts eg: Ctrl+C. Maybe if Ctrl or Shift is pressed, ignore the custom delay.
It should be ignoring shift/alt/control for long press. It definitely could be a bug though. Here's an example of what I tried out:

Is that the same general setup you are trying? Also, what do you have the Keyboard control panel repeat delay set to?
I am using notepad and was able to use c and v to produce the uppercase characters. Holding ctrl+c and ctrl+v seemed to work as expected (copying/pasting).
I was able to produce an odd case that might be the issue (doesn't always happen):
- Pressed
ctrland thenc(both held) - Released
ctrland thenc(almost immediately after) - The timing appears to be just enough for KeyCap to think that
cwas pressed (technically it was down for a moment withoutctrl)
I'll see if there's something that can be done. It might be a tough one.
For me ctrl+c copies the value, but replaces the selection with an c ctrl+a selects all then replaces all with an a
Edit: Now I see that I have a bad habit! I let go ctrl then let go c I think I have to redo the shorcut habit that I have.
If I let go c then ctrl everything is fine. But, if you can achieve the nirvana and ignore the c after release of ctrl it will be so much more reliable and will make you have so much less pain.
There's a new version that may make this slightly better:
https://github.com/nhmkdev/KeyCap/releases/tag/v.2.1.0.1
I compared this and the prior version and there's definitely more tolerance after releasing the ctrl key between the two versions. If you keep c held down just a bit too long you'll definitely run into trouble!