cajhin / capsicain

Powerful low-level keyboard remapping tool for Windows
334 stars 18 forks source link

Held down keys repeating #83

Open Maickeli opened 1 year ago

Maickeli commented 1 year ago

Hello, I have remapped my "arrow keys" with config like this:

REWIRE CAPS MOD9 CAPS

COMBO  A   [^^^& .... ....] > key(LEFT)
COMBO  D   [^^^& .... ....] > key(RIGHT)
COMBO  W   [^^^& .... ....] > key(UP)
COMBO  S   [^^^& .... ....] > key(DOWN)

My issue is that when I hold down an "arrow key" in this case let's say I hold down CAPS and A, the press gets repeated like holding down a character key while typing. This doesn't matter when I use arrow keys for navigating in text editors but in games and other programs where arrow keys are used for something "smooth" such as moving/rotating stuff, it makes it pretty jittery and almost unusable.

With plain REWIRE:ing the keys it works without this problem, but when using combo the problem comes.

I tried to play around with OPTION DelayForKeySequenceMS but, it doesn't help for this issue.

Any ideas is there some fix or why it behaves like this?

Thanks for this amazing tool!

cajhin commented 1 year ago

I guess the issue is that, with standard auto-repeat, the app receives down,down,down,down,down,up. When you map that with a COMBO, each 'down' is translated to "down,up", and the final up is ignored. So the app sees "down,up,down,up,down,up", like when you tap a key really fast. You can't change that, unless you use REWIRE instead.

What's the point, though? You don't really want to play games and keep pressing Caps non-stop?

Admittedly, DOOM online works fine on the mac with Karabiner, but not on Windows with capsicain :( https://playclassic.games/games/first-person-shooter-dos-games-online/play-doom-online/play/

Maickeli commented 1 year ago

Okay thanks for explaining and fast answer!

My point is that I am using a 60% keyboard (no arrow keys) and work on stuff like Unity, where I mostly code and this combo thing works like charm on text editors while coding. But occasionally I need to work on 3d views where I use arrow keys for moving and navigating. What this means is that I don't need arrow keys for long periods at a time but I need them quite often.

I tried also to make a config that switches when a key is held down but I guess that's not possible right now?

cajhin commented 1 year ago

No, there is no QMK-style layer switching. The easiest approach is probably to have 2 configs, coding and 3d, and switch them with ESC+1/2 (or a custom combo with > configSwitch(1) ) The 3d config needs to map all translation/rotation keys with REWIRE.

If Unity is anything like Blender, you want a SpaceMouse, though.

...and btw the cursor keys have to be caps+IJKL, not caps+WASD!!! The horror... (unless you're a smoker, or a mouse user, then you need a free hand of course :)

Maickeli commented 1 year ago

I'm using setup like that right now I think it's going to be good when I get used to it.

I think you could say it's like blender but I don't use it that much that I would need SpaceMouse, I mostly code but need to do something else once in a while.

Actually I have caps+WASD and caps+IJKL, I just cropped it out to make post shorter, double the horror :)