cajhin / capsicain

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

Pro Tools modifier remapping not possible #100

Open SchittBull opened 10 months ago

SchittBull commented 10 months ago

The keyboard remapping of modifiers does not work in Avids Pro Tools. This software seems to have control over the modifier on an even deeper level than capsicain. related issue: https://github.com/microsoft/PowerToys/issues/7396

cajhin commented 10 months ago

I cannot verify this because I don't have Avid installed (and I don't want to). Looks indeed like they have a very deep hook to handle the Alt key. IF they use the same method as interception, i.e., they provide their own "keyboard upper filter driver", it MIGHT be possible to change the order in which they process keystrokes (means, put the interception driver before the Avid driver in the filter driver chain).

!Be careful with making changes! I do not fully understand how Windows handles drivers, and a broken keyboard could be mighty inconvenient.

Can you use regedit and look at this entry (which defines the kb filter drivers): Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4d36e96b-e325-11ce-bfc1-08002be10318}

On my machine, the entry "UpperFilters" = "keyboard SynTP kbdclass". This is the interception driver ("keyboard"), an HP/Synaptics driver, and the standard Microsoft driver. The first entry wins (processes key events first, then forwards the result to the 2nd driver in the driver stack). Mayyybe you can simply change the order by editing the UpperFilters string. Or maybe not.

I'm curious if your registry contains another driver from Avid. Could you please post your "UpperFilters" string?

UPDATE: I created a Wiki page for this topic: https://github.com/cajhin/capsicain/wiki/Interception-driver-details

SchittBull commented 10 months ago

Hey thank you for the fast reply. This is what this registry entry looks like on my end: image

I think you are missing a word here because I am not sure what you mean with this sentence.

On my machine, the entry "UpperFilters" = "keyboard SynTP kbdclass".

cajhin commented 10 months ago

so on your system, UpperFilters="keyboard kbdclass", which is Interception and Windows std. You don't have my HP/Synaptics driver, AND you don't have any Avid filter driver installed. Which means that I have no idea how they modify the key events. I can only imagine they provide their own USB drivers, that would be lower (come earlier) than the upper filter drivers... If you find out what Avid does, please reply to this thread.

SchittBull commented 10 months ago

My workaround right now is remapping through registry using Sharpkeys so it works in Pro Tools and than remapping again with capsicain to be able to switch for everything else.

SchittBull commented 10 months ago

I found those files if this helps: C:\Program Files\Avid\Pro Tools\Video Engine\DFW_KeyHook.dll C:\Program Files\Avid\Pro Tools\DFW_KeyHook.dll C:\Program Files (x86)\Avid\Pro Tools\DFW_KeyHook.dll

cajhin commented 10 months ago

something's confusing with your configuration. Keys get processed by capsicain before Windows evaluates the registry method (what SharpKey edits). I've tried it out: I mapped "TAB to C" in capsicain, and "TAB to S" in SharpKeys. When I press TAB, I get a C.

Can you please describe for one key, what you configured in capsicain/sharpkeys/avid , and what the end result is when you press the key?