cajhin / capsicain

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

Capsicain and Barrier #76

Closed flamingjupiter closed 9 months ago

flamingjupiter commented 1 year ago

Is there a way to make capsicain work with Barrier on client PCs? I can't pass its keystrokes to another PC using Barrier. Also, is it something that's not gonna work with any keyboard and mouse sharing software or it'll be a case by case scenario?

Just to point it out, AHK works fine with Barrier.

cajhin commented 1 year ago

I don't know Barrier. With a minimal config like "REWIRE X Y", does Barrier forward Y when you press X?

If the problem is related to combos (where 1 key in produces n keys out), it might be a timing issue, where the keys are sent too fast. RDP in fullscreen has a similar issue. Try Esc+D for debug, then ESC+. to slow down the key event creation.

What's NOT going to work is, on a Windows client, altering the key events that are generated by software (Barrier).
capsicain "reads the hardware" (low-level), it doesn't see any events that, for example, are created by Autohotkey.

flamingjupiter commented 1 year ago

It was a minor problem with the Barrier software, now I've made it work. With work I mean for them to coexist without conflicts, as capsicain only sees hardware input, just like you said.

On another note, going through Capsicain documentation I couldn't find instructions on how to use it with modifiers other than MODs 1 to 8 (left and right Shifts, Controls, WinKeys, Alts) and whatever keys I assign to MODs 9 to 15. Can't I use it with other keys without assigning them to MODs 9 to 15? Even though not interacting with any stuff happening on Windows has the benefit of not activating random undesirable things, it prevents you from activating desired things, like AHK functions and scripts.

cajhin commented 1 year ago

Not sure I understand the question. If (example) you want to use X as a modifier, so that you can define a combo like X+E => €, then you must first rewire X to a MOD.

If you want to change the behavior of the basic key, like X => Y or X => €, then you don't need a mod. Basically, capsicain does not remember the current up/down state of keys, unless they are modifiers.

You have a choice when you deal with real modifier keys, like RAlt. You can use RAlt directly, then Windows will know its state, or you can rewire RAlt to MOD9 first, then Windows will never see an RAlt event.

flamingjupiter commented 1 year ago

Basically, capsicain does not remember the current up/down state of keys, unless they are modifiers.

Oh, I see, then it's not possible to do what I wanted. I wanted to use a "normal" key as modifier but without assigning it to MOD9~15, so it'd still be available for customization within AHK. Is this a feature that could be implemented in future versions?

cajhin commented 1 year ago

I don't understand what exactly you're trying to configure. If you want to use a key as a modifier, while having the original key function when you press it without other keys involved, check REWIRE For an example, check the TAB key in the default ini. REWIRE TAB MOD10 TAB If you tap the key you get a tab, as usual, but while you hold it, it can be used for MOD10 combos. In my config, holding tab puts a number pad under your right hand. If you need something different, please explain