-
Notifications
You must be signed in to change notification settings - Fork 6.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[KBM] Add a hotkey key to turn it on/off #4879
Comments
Another option could be a right click context menu on the taskbar icon? Here just because I use the powertoy to switch L-WIN and L-ALT for a Mac keyboard. |
I guess that would be fine for anyone who is not using an exclusive fullscreen app such as games. |
@crutkas, this wouldn't be very difficult to implement, but it might require us to always keep the KBM hook active (rather than unhooking on disable). We can't use a separate hook as we need to make sure the "Toggle shortcut/key" is unaffected by remaps. |
This look like a great solution for remapping keys in a game, but there HAS to be a fast way to toggle it on or of in case you need to just type some text, like chatting with a team mate. |
Please add this, It should be a shortcut keys of your choice to enable and disable the Keyboard Manager. There has been quite a few updates but this hasn't been added |
Since there's now a "PowerToys" plugin in PowerToys Run, perhaps adding a toggle Keyboard Manager On/Off integration into that plugin would be useful and make a lot of people here happy. For example, Win+Space to open PowerToys Run, type "@" to filter PowerToys options and select "Keyboard Manager" to toggle it on/off. This is quicker than opening PowerToys UI itself and going through the menus to toggle KBM. I imagine that works around the issue of "keeping the kbm hook active" for a global hotkey. |
I did something like this as powershell script to toggle if the process is running or not, then just made a powershell icon on the desktop. Then you can probably keybind something to run that with autohotkeys: `$km = Get-Process PowerToys.KeyboardManagerEngine if ($km) { |
Hi there, seems like this is the solution I have been waiting for, even tho I am not a developer I know basic coding, how can I run this script with power toys? |
I did not intend to learn so much about powershell today, but boy what an adventure. Here's my little script to toggle KBM + trigger notification to show whether its now on or off. At the bottom of this post I include instructions for using the script with a keyboard hotkey (no autohotkey). thanks to @mattpang for getting me started here: Did this on Windows 11, make sure your execution policy will allow you to run local scripts without signing. You can do that through the settings app here: Next, install BurntToast , which simplifies notifications from Powershell. # Install BurntToast for notifications
Install-Module -Name BurntToast The script$kbm = Get-Process PowerToys.KeyboardManagerEngine -ErrorAction SilentlyContinue
if ($kbm){
Stop-Process -Name PowerToys.KeyboardManagerEngine
New-BurntToastNotification -Text 'Powertoys Keyboard Manager DISABLED'
} else {
Start-Process -FilePath 'C:\Program Files\PowerToys\KeyboardManagerEngine\PowerToys.KeyboardManagerEngine.exe'
New-BurntToastNotification -Text 'Powertoys Keyboard Manager ENABLED'
} Using with a keyboard shortcut:Create a shortcut on your desktop (ugh...) Set a shortcut key to whatever you want (I'm using Ctrl + Alt + K). Then set the shortcut to "Run:"in Minimized window. This should stop a terminal window from opening up when you use the shortcut. Using this confuses the Power Toys dashboard, it seems to lose track of whether or not KeyboardManager is running, but that hasn't been an issue so far. |
I appreciate the guide! Thanks a lot |
这个方法是可行的,但是有一点需要注意。Windows默认下是无法运行powershell脚本的,需要手动设置才行。按下win键,输入powershell,右键点击,以管理员身份运行powershell。输入set-executionpolicy remotesigned,接着输入y,然后就可以运行powershell脚本了。 |
To workaround around this bootstrapping issue, you could link the proposed feature to the enabling and disabling of remappings instead of the entire Keyboard Manager module. This would achieve the desired result of restoring default mappings via a keyboard shortcut. Provide a user option to enable this feature and assign a meta shortcut (e.g. RCtrl+PgDn) that is not mappable when this feature is enabled via a configuration option. |
Quoting @halcyon101...
Set objShell = CreateObject("WScript.Shell")
' Check if Keyboard Manager is running
Set objWMIService = GetObject("winmgmts:\.\root\cimv2")
Set colProcessList = objWMIService.ExecQuery("Select * from Win32_Process Where Name = 'PowerToys.KeyboardManagerEngine.exe'")
If colProcessList.Count > 0 Then
' If running, stop the process
For Each objProcess in colProcessList
objProcess.Terminate()
Next
Else
' If not running, start the process
objShell.Run """C:\Program Files\PowerToys\KeyboardManagerEngine\PowerToys.KeyboardManagerEngine.exe""", 0
End If |
Forgive me but I just wandered in and this seems very complicated and time consuming. |
@JustGitn As far as I know, the current quick/easy way is to left-click once on the PowerToys tray icon, click "More..." in the upper-right of the popup, and then toggle the desired module. But frankly they still should add a shortcut to make it easier. |
I support this feature to be implemented because we all need to toggle it easily |
A way in which to easily toggle on and off the keyboard manager feature without having to leave fullscreen apps, specifically games.
A shortcut keybind that is resignable that would allow for the keyboard manager to be toggled on and off without the need to alt+tab out of games.
A resign-able shortcut key to toggle keyboard manager. This is for those of us out there who game, having an easy to access way to toggle the keyboard from alt setups to default qwerty for WASD would be great. At the moment I need to alt+tab and manually click the feature off and on and it is very cumbersome. I had a previous setup with a custom keyboard and portable keyboard layout, but there was always the odd app that would choose the wrong keyboard, so powertoys is better, but the toggle would be a huge help.
The text was updated successfully, but these errors were encountered: