Open rbreaves opened 3 years ago
Edit: I saw you posting in some issues in the powertoys repo that showed you probably already knew all of this. leaving it here anyways.
I started work on a PowerToys-only based "kinto" for windows as I am getting occasional key sticking with AHK. I haven't done enough to warrant a separate repo yet, but I wanted to post some info/snippets here since it may be useful to you.
Loading Profiles via Code -- I found JSON files in:
C:\Users\jchun\AppData\Local\Microsoft\PowerToys\Keyboard Manager
As far as I can tell, it currently only has default.json out of the box, but I think it may be easy to switch to using a non-default json (haven't actually tried yet)
Unlike AHK, PowerToys doesn't support groups of applications and requires you to add custom keybinds for each individual application as follows:
I think the only way around this would be to generate the PowerToys config files via code. I thought that it would be nice to be able to use an API that you would already be familiar with (xkeysnail's). However, I realized that the key code values provided by xkeysnail are wrong because the keycodes used by windows and x are different.
I wrote a small helper keysnail_helper.py that subclasses/monkey-patches the Key, Modifier, and Combo classes from xkeysnail.
Usage is as follows:
from keysnail_helper import K
my_key = K("LC-C")
for modifier in my_key.modifiers:
print(modifier.get_key().value)
print(my_key.key.value)
The values I get correspond with what's listed on MSDN Obviously I haven't built out any of the actual logic yet, but this is a start to being able to have shared keymaps from xkeysnail get generated as powertoys configs.
Port AHK remap over to Powertoys and offer 3 different install options to Windows users.