PowerToys
PowerToys copied to clipboard
Profiles in Keyboard Manager
Have both predefined profiles (e.g. mac/linux/etc) available to user, and also allow the user to create custom profiles. Provide a quick way to switch between profiles.
What's the status of this feature?
This would be a big improvement. I'm curious if you've considered a simple text file import/export feature as a first iteration, as mentioned in microsoft/PowerToys#4452. This would be less effort to implement and provide a lot of the benefits.
It also provides benefits that the profile feature doesn't
- Makes sharing settings across systems and with others easy
- Creating/editing a large number of mappings (more than 5) as text is easier than using the UI
- PowerToys already targets power users, which want and expect this kind of control
- Extending this across PowerToys would probably be straightforward as well
Even better would be have profiles tied to keyboard ID (I am hoping app could query usb/bluetooth properties of keyboards).
@freshone I did a little bit of digging in the source because I found it hard to believe it wasn't already already set up that way. It will take a little bit of digging, but as far as I can tell, if you navigate to
C:\Users\jchun\AppData\Local\Microsoft\PowerToys\Keyboard Manager
you should see json files and editing/switching them should be fairly straightforward
For example, this would be amazing for temporarilty turning these keys into a numpad on TKL keyboards.

@jonchun Thanks for pointing to the location where the settings file is stored. This should be added in the documentation, as it is also a partial solution to #4452
You can prepare your json profiles, for example mac.json and win.json in the C:\Users<your user>\AppData\Local\Microsoft\PowerToys\Keyboard Manager
Then make a powershell script, for example to switch to the win profile:
$ErrorActionPreference = 'SilentlyContinue'
cd $HOME
cd '.\AppData\Local\Microsoft\PowerToys\Keyboard Manager'
cp win.json default.json
taskkill /F /IM PowerToys.KeyboardManagerEngine.exe
& 'C:\Program Files\PowerToys\modules\KeyboardManager\KeyboardManagerEngine\PowerToys.KeyboardManagerEngine.exe'
You can prepare your json profiles, for example mac.json and win.json in the C:\Users
\AppData\Local\Microsoft\PowerToys\Keyboard Manager Then make a powershell script, for example to switch to the win profile:
$ErrorActionPreference = 'SilentlyContinue' cd $HOME cd '.\AppData\Local\Microsoft\PowerToys\Keyboard Manager' cp win.json default.json taskkill /F /IM PowerToys.KeyboardManagerEngine.exe & 'C:\Program Files\PowerToys\modules\KeyboardManager\KeyboardManagerEngine\PowerToys.KeyboardManagerEngine.exe'
Thank you so much for this. I agree with https://github.com/microsoft/PowerToys/issues/1881#issuecomment-995321972 this should be added to the docs, just like it already is documented for FancyZones
Thank you @AndriyTemplafy for your comment's explicit instructions that will allow a user to change keyboard mappings through a shortcut (that points to a copy of the PowerShell script you provided).
Agree with @AJolly that it should be added to the docs.
A digression: Kudos to the folks that worked on the Keyboard-Manager Wiki page. It exemplifies great documentation, especially at a requirements/analysis/design/tech level that seems appropriate for a repository wiki page.
So what's the status of this? Use the workaround provided above and be grateful, or is it coming anytime soon?
After reading the above comments, I took a shot at making a simple powershell GUI selector for profiles based on this list box code: https://learn.microsoft.com/en-us/powershell/scripting/samples/selecting-items-from-a-list-box?view=powershell-7.3 and plopping the below code block toward the end. Hopefully this is useful to anyone else wanting to select different profiles easily, and as you can see it's based off previous work, so here's my incremental addition while we wait for an integrated solution
#get all json files other than settings and default from keyboard manager folder
$ErrorActionPreference = 'SilentlyContinue'
cd $HOME
cd '.\AppData\Local\Microsoft\PowerToys\Keyboard Manager'
$profiles = dir *.json | select Name |Where-Object {$_.name -ne "settings.json" -and $_.name -ne "default.json"}
#Create backup of default.json first run
$bak = '.\default.json.bak'
if (!(test-path $bak)){
echo "making backup $bak"
cp default.json $bak
}
#build list box
foreach ($profile in $profiles)
{
[void] $listBox.Items.Add($profile.name)
}
$form.Controls.Add($listBox)
$form.Topmost = $true
$result = $form.ShowDialog()
#act on result copy selected json file over default.json and restart keyboard manager
if ($result -eq [System.Windows.Forms.DialogResult]::OK)
{
$x = $listBox.SelectedItem
$x
cp $x default.json
taskkill /F /IM PowerToys.KeyboardManagerEngine.exe
& 'C:\Program Files\PowerToys\modules\KeyboardManager\KeyboardManagerEngine\PowerToys.KeyboardManagerEngine.exe'
}
Exporting the mappings to a file so that they can be imported (merged!) into another system's mappings is a must-have if you ask me. Especially for painful-to-configure mappings that use keys that are not easy to find in the drop-down listboxes.
I'd really like to see this feature in the near future. Or yesterday.
Have both predefined profiles (e.g. mac/linux/etc) available to user, and also allow the user to create custom profiles. Provide a quick way to switch between profiles.
I hope to see this one VERY SOON! Pretty please!
The feature already exists in Karabiner-Elements for macOS. https://karabiner-elements.pqrs.org/docs/manual/operation/profiles/ https://github.com/pqrs-org/Karabiner-Elements It seems we can take something from them.
What is the status of this feature?
Pinging on this as well. Big pain