cajhin / capsicain

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

config for 2 device ids with the same keys #102

Open tonik31 opened 6 months ago

tonik31 commented 6 months ago

Any way to combine this configs? Devices both have keys NP1 NP3 NP6, that need to be remapped to different keys according to device ids.

GLOBAL IniVersion wow
GLOBAL ActiveConfigOnStartup 1
GLOBAL StartInTraybar

[CONFIG_1]
OPTION configName = fang
OPTION Debug
OPTION IncludeDeviceID 1038

ALPHA_FROM  F7 F5 M V RET LEFT  DEL NP6 F9 / NP1 NP3
ALPHA_TO    -  T  G C Y   SPACE `   F5  M  Z 1   3
ALPHA_END

COMBO    E0LSHF     [.... .... ....] > key (=)
REWIRE PRINT NOP # no operation

REWIRE C LALT
REWIRE LALT F4

#IncludeDeviceID:258a ALPHA_FROM  NP1 NP2 NP3 NP4 NP5 NP6 NP7 NP8 NP9 NP0 NP+ NP-
#IncludeDeviceID:258a ALPHA_TO    F1  F2  F3  F4  F5  F6  F7  F8  F9  F10 F11 F12
#IncludeDeviceID:258a ALPHA_END

[CONFIG_2]
OPTION configName = liong
OPTION Debug
OPTION IncludeDeviceID 258a

ALPHA_FROM  NP1 NP2 NP3 NP4 NP5 NP6 NP7 NP8 NP9 NP0 NP+ NP-
ALPHA_TO    F1  F2  F3  F4  F5  F6  F7  F8  F9  F10 F11 F12
ALPHA_END
cajhin commented 6 months ago

No that's not possible. I might implement a new option to automatically switch configs when the device ID changes. Like:

[CONFIG_1]
OPTION SwitchOnDeviceID 1038
...config for 1038...

When id 258a is active, then you press a key on 1038, capsicain will automatically switch to the first layer that contains OPTION SwitchOnDeviceID 1038 (if there is at least one).

That way, you basically can assign config1 to a keyboard1 and config2 to keyboard2.

Would that solve your problem?

tonik31 commented 6 months ago

Yes, I think, it would be a good option for this problem. Thank You.