PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[KBM] Remap Key to Mouse Click

Open vinnyjames opened this issue 4 years ago • 50 comments

Be nice if keyboard keys could be re-assigned to mouse keys. E.g. I like to use F1 to send a mouse left mouse click.

vinnyjames avatar May 20 '20 20:05 vinnyjames

If we make this, we should look that is also works in the opposite direction.

https://github.com/microsoft/PowerToys/issues/11578#issuecomment-853149117 by @Jay-o-Way

Aaron-Junker avatar Jun 02 '21 16:06 Aaron-Junker

Please, yes! That would be very useful in combination with eye tracking software.

Kesanov avatar Jun 12 '21 17:06 Kesanov

So in PowerToys present state (or version 0.45.0) one cannot use a modifier key combined with left click? I agree this would be great to have. Would this be difficult to develop? I have someone that might be willing to pay someone to do this.

PGSystemTester avatar Sep 22 '21 22:09 PGSystemTester

need this function, thank you very much

eezTool avatar Oct 10 '21 09:10 eezTool

... Would this be difficult to develop? I have someone that might be willing to pay someone to do this.

CC @crutkas might be interested.

Jay-o-Way avatar Oct 10 '21 10:10 Jay-o-Way

plz

Thespikedballofdoom avatar Nov 09 '21 18:11 Thespikedballofdoom

I still don't understand what the use case is. You still need a mouse to move the cursor, so why not click it? Or use Windows mouse keys?

Jay-o-Way avatar Nov 09 '21 18:11 Jay-o-Way

Accessibility comes to mind.

crutkas avatar Nov 09 '21 19:11 crutkas

My use case was to have a modifier key to allow the mouse buttons to do more than simply left/right click.

PGSystemTester avatar Nov 09 '21 19:11 PGSystemTester

There are input devices that don't have buttons, and I was actually just now looking for utilities that would let me do clicks using the keyboard.

Sunspark-007 avatar Nov 15 '21 05:11 Sunspark-007

In theory it should have worked.. left click is supposedly VK 01, but trying that key remap does nothing at the current time.

Sunspark-007 avatar Nov 15 '21 05:11 Sunspark-007

In theory it should have worked.. left click is supposedly VK 01, but trying that key remap does nothing at the current time.

Yeah, googled and found this list http://www.kbdedit.com/manual/low_level_vk_list.html which has the following note:

**) "mouse button" quasi VK codes are generated by Windows when user clicks left/middle/right/X1/X2 mouse buttons. KbdEdit allows these codes to be assigned to physical keys, but such mappings make no sense: pressing a key with VK_LBUTTON assigned to it will NOT make Windows act as if physical mouse button was pressed.

The page https://docs.microsoft.com/en-us/windows/win32/inputdev/virtual-key-codes does not have any similar notes.

Jay-o-Way avatar Nov 15 '21 11:11 Jay-o-Way

Indeed, this would be extremely useful in combination with eye tracking - especially in AR etc. Any progress on this please?

cybairfly avatar Dec 16 '21 14:12 cybairfly

Not something currently on our roadmap

crutkas avatar Dec 17 '21 00:12 crutkas

Yes, please to this, and the reverse (mapping mouse to keyboard). I'd love to be able to map Ctrl+MouseWheelUp/Down to VolumeUp/Down. etc.

tonys1110 avatar Dec 28 '21 15:12 tonys1110

well lets put it on your roadmap

Thespikedballofdoom avatar Dec 29 '21 21:12 Thespikedballofdoom

Is this on your roadmap now? The laptop people without a mouse could really benefit from not breaking their touchpads.

Hood-Legend avatar Feb 02 '22 05:02 Hood-Legend

@Hood-Legend Not yet, but community pull requests are welcome. :D

franky920920 avatar Feb 02 '22 05:02 franky920920

I've been trying to enable this capability for a while, and got pretty close with a simple "rebind.ahk" script + program, but it just wasn't robust enough. The main goal is to abolish the mouse and emulate a "vi" style custom workflow for any application of your choosing. We are all spending way too much time in front of computers these days, and the strain on wrist is a serious health risk -- I have 5 different ergonomic mice that I constantly switch between -- then again, I run a global CAD navigation team in the semiconductor industry. Long story short, NEED THIS , WANT THIS, PLEASE ENABLE ASAP (with Linux support as well). Please.

cadnav avatar Mar 04 '22 04:03 cadnav

plz so i can speed run pvz

gocs avatar Apr 15 '22 10:04 gocs

https://docs.microsoft.com/en-us/answers/questions/255509/send-mouse-wheel-click-properly-sendinput-mouseeve.html This is how to send it, for anyone looking to implement.

jtroo avatar Apr 26 '22 06:04 jtroo

please make this a thing. I use a program where i have to use the middle mouse button and there isn't one on a laptop, if i can rebind a key to that button i dont need to bring a mouse with me.

evilsnailofdestruktion avatar May 19 '22 17:05 evilsnailofdestruktion

FYI this functionality is implemented in my project. It's a more advanced version of Keyboard Manager. No fancy GUI though; it uses text based configuration. It's also cross-platform (Windows+Linux, not MacOS) :)

jtroo avatar May 19 '22 18:05 jtroo

Maybe late than ever, i tryd powertoys to help me turn ctrl-c into a numpad5 click, numpad5 is easy to turn into a mouseclick with windows itself. But apperently powertoys turns ctr-c into a normal 5! instead of a real numpad5 press which is a mouse click if you enable mousekeys on in windows.

keypad manager1 mousekeys

tomtippelaar avatar Jun 26 '22 19:06 tomtippelaar

I'm looking to remap ALT (right) and/or CTRL (right) to mouse click left, tried remapping to VK1 but this doesn't work.

My use case: I'm using a laptop with the trackpad and the left mouse button on the trackpad has always been difficult to press, and has gotten worse over time, it's a poorly made/designed trackpad (the buttons at least). Remapping to said keys would allow me to use the trackpad with index finger or thumb, and left click with middle finger, ring finger, or pinky finger.

Like the user above I would use mouse keys but the numpad 5 key is too far away to use the trackpad and tap the numpad 5 key at the same time. I would use this feature constantly if it were available. Seeing that the VK keys are options in the drop-down I was hopeful this would work.

jakethomas1 avatar Dec 14 '22 06:12 jakethomas1

Have y'all tried AutoHotkey yet?

The fact that the VK for left-click doesn't work is mentioned earlier.

Jay-o-Way avatar Dec 15 '22 10:12 Jay-o-Way

Have y'all tried AutoHotkey yet?

The fact that the VK for left-click doesn't work is mentioned earlier.

Ya I read that too, I was just adding in my use case.

I'd prefer not to use autohotkey. I have tried it, thanks.

jakethomas1 avatar Dec 15 '22 19:12 jakethomas1

/dup https://github.com/microsoft/PowerToys/issues/1475

Aaron-Junker avatar Mar 02 '23 16:03 Aaron-Junker

Hi! We've identified this issue as a duplicate of another one that already exists on this Issue Tracker. This specific instance is being closed in favor of tracking the concern over on the referenced thread. Thanks for your report!

These are different

crutkas avatar Mar 02 '23 17:03 crutkas