PowerToys
PowerToys copied to clipboard
Allow to remap complex keyboard events (macros)
Keyboard Manager should allow mapping complex keyboard events in Key
and Mapped To
parameters
Currently, the keyboard manager allows for remapping of simple keyboard events, such as single key-down, to a different keyboard event, which may include multiple modifiers (Ctrl
, Shift
, Alt
). It would be a benefit to allow input parameters to be complex keyboard events including modifiers (Ctrl
), multiple key events (holding down Shift (Left)
and Shift (Right)
), and key-up events (mapping Ctrl (Left)
to be Ctrl
on key-down and Esc
on key-up).
The specific use-case I want to see is to replicate an AutoHotKey script that modifies the Caps Lock
to Ctrl
when pressed with another key, so Caps Lock - V
would sendCtrl - V
, but to send Esc
on key-up if no other key is pressed. Additionally, the script also maps Shift (Left)
and Shift (Right)
combo to send Caps Lock
.
If you'd like to see this feature implemented, add a 👍 reaction to this post.
The use case is related to #5679 @crutkas @saahmedm is this something we plan to support in the future? I think having complex events on the left column would be problematic (something that works better with stuff like AHK scripts). For complex events in the right column I feel it would be like an "Advanced mode" which allows custom macros where you would be able to "Type" and the sequence of key strokes will be detected and used (rather than just the keys as we do now). This would be sort of similar to the macro feature in the Microsoft Mouse & Keyboard Center, but that can only be done for programmable keys on certain keyboards.
Regarding the specific use case mentioned above I elaborated on it in #5679.
In terms of implementation, the challenges would be figuring out a UI for this. Microsoft Keyboard & Mouse Center has an interesting UI which seems like the best way that it can be presented to the user without requiring actual "scripts". In terms of implementation, we would need to monitor an input sequence of events, and whenever that exact sequence occurs we would send the output events.
Removing the KBM label since this goes far beyond the scope of KBM. KBM should remain a simple straightforward tool to do what is supposed to do. There are several enhancement suggested for the KBM that hopefully we will do in the future, but this particular suggestion is not about remapping existing shortcut, but about providing extended macro functionality similarly to AutoHotKey .
In terms of implementation, the challenges would be figuring out a UI for this. Microsoft Keyboard & Mouse Center has an interesting UI which seems like the best way that it can be presented to the user without requiring actual "scripts". In terms of implementation, we would need to monitor an input sequence of events, and whenever that exact sequence occurs we would send the output events.
It looks nice but also can any key on say, my keyboard(except power button) be remapped/used as macro keys, that would be really awesome as some of the keys on my keyboard have no function at all so it'd be nice to remap them to a shortcut or a macro!
Hello any progress requarding this toppic ?
This feature would make my life considerably easier. Use cases:
- add a non-breaking space anywhere with a shortcut for ALT+0160
- add an endash to documents without having to type ALT+0150
- typing characters such as ñ (ALT+0241) with an US keyboard layout
- add a ™ to a product name without having to memorize ALT+0153
I wouldn't mind copying and pasting the specific character from charmap into PowerToys.
@moatmai Check it out: https://ilyabirman.net/typography-layout/
Noob-workaround for the time beeing:
- place a shortcut for your script (i.e. vbs) on your desktop
- Set a normal Keyboard-shortcut via context-menu -> properties i.e.
[CTRL]+[ALT]+[SHIFT]+[F12]
- in powertoys keyboard manager, remap that combo to something you want
(this will make it possible to run the script on F16-F19 for example)
AutoHotkey could do this without breaking a sweat!
Is this feature ever going to be implemented or not? I'm just saying because this issue has been open for more than 2 years now and its status is still up in the air. I think many would appreciate it if we had a definite answer to this question. Thanks.
@theerfan have you tried MS Mouse & Keyboard app or AutoHotkey yet?
@theerfan have you tried MS Mouse & Keyboard app or AutoHotkey yet?
I am using AutoHotKey, I was just wondering if it was ever going to be implemented here as well. :D
Switch default audio device on windows with keyboard shortcut.
https://www.youtube.com/watch?v=--cHILkVUtw Power Automate in the Microsoft Store So, do we really need to keep this open?
So, do we really need to keep this open?
A number of contributors have suggested to use a different app to solve the issue. IMO that doesn't really address the issue itself: a request to extend PowerToys functionality.
I, for one, am just looking for a way to map special characters, preferrably using Unicode values which you can paste from the Character Map (charmap), in Keyboard Manager.
I agree fully with this comment of moatmai ...
A number of contributors have suggested to use a different app to solve the issue. IMO that doesn't really address the issue itself: a request to extend PowerToys functionality.
Perhaps something that can call/create power automate functions from within powertoys could be handy.
Im all for reducing blat and multiple programs doing the same thing. But it seems like a bit of a hastle to use 40 diferent Gui
s.
Perhaps some sort of gui added to power toys that calls power automate without having to run expensive gui overhead.
And it also seems pointless to have key binds that can't handle combinations. (Note, i’m no longer on Windows )
To add my voice, another use case is to map combination of keys to events: For example, CTRL
+DOWN
to volume down, CTRL
+UP
to volume up (because my keyboard does not have media keys).
I'd like to request this macro functionality as well. Extremely useful.
So is it already possible to make an assignment for Ctrl+A and Ctrl+C so that that keypress simultaneously selects everything and copies it?
So, do we really need to keep this open?
A number of contributors have suggested to use a different app to solve the issue. IMO that doesn't really address the issue itself: a request to extend PowerToys functionality.
I, for one, am just looking for a way to map special characters, preferrably using Unicode values which you can paste from the Character Map (charmap), in Keyboard Manager.
This issue has grown to encapsulate multiple different kinds of requests that honestly should be categorized differently:
Should be implemented
- Missing Characters from Key Remapper due to not being able to map keys the existing keyboard doesn't have including multilingual and media keys
Should be debated
- Character -> String Mapping (Ex:
A
->{shift}this{space}is{space}a{space}sentence{!}{enter}
) - Context Aware Key Remapping (Ex:
A
->Q
in Excel Only) - Sequence of Characters -> Different Sequence of Characters (Ex:
IDK
->I don't know
)
Would best be a plugin
- Character -> Mouse/Other Input
- Character -> Program Execution
- PowerAutomate Integration
- Managing Audio Devices (Excluding Volume Up/Volume Down/Mute for Default Audio Device)
- AutoIt / AHK Integration
I've been tackling the plugin-esque features myself in a side project that registers a URI but I think I'll try creating a plugin tomorrow for some basic stuff by borrowing most of @skttl 's ptguid plugin code.
Linking with PowerAutomate should be easy as it has its own registered URI.
Additionally, I can add in AutoIt (the parent of AHK) and probably AHK functionality.
This shouldn't be anything complex to make into a plugin as I'm just punting the input off to PowerAutomate/AutoIt/AHK.
However, I've never started a C# project from scratch, let alone compiled it (to a dll even!) so this will be a fun learning experience.
I just got myself a MS 3050 keyboard and mouse. As @arjunbalgovind showed earlier, the Mouse and Keyboard Center app allows you to set a huge number of functions to a lot of keys. Both on the mouse and the keyboard. Both "basic" and "app-specific settings". It's really awesome!
Perhaps something that can call/create power automate functions from within powertoys could be handy.
🤔💭Thinking of a PT Run plug-in... wdyt @htcfreek ?
🤔💭Thinking of a PT Run plug-in... wdyt @htcfreek
@rcmaehl nade something like this.
Window 11 has this functionality basically built in:
- Go to C:\Users\«your name»\AppData\Roaming\Microsoft\Internet Explorer\Quick Launch\User Pinned\TaskBar
- Right click, New, Shortcut to get the new shortcut dialog
- Type wt for Windows Terminal and click Next
- If you like, change the name to Terminal and click Finish (Note: the actual shortcut won't be actually shown on your taskbar)
- Open the properties for the shortcut you just created (Alt+Enter)
- On the tab "shortcut"in "shortcut key" press Ctrl+Alt+T
- Click Apply
Test it by pressing Ctrl+Alt+T