Wednesday, October 23, 2019

keyboard - Emulate left mouse button with CapsLock key


I want CapsLock key on my keyboard to act like the left mouse button. I want to be able to perform clicks, double clicks, send mouse down and mouse up events etc.


Now I am using AutoHotkey and the following script


Capslock::LButton
Return

The script works but not in every app and not every time. For example, it doesn't work in Task Manager, it usually doesn't work in installer UIs and some other places.


The script / AutoHotkey also doesn't work in windows of apps under some load. For example, if the app is performing heavy IO then the script might or might not work.


This is annoying to have intermittent issues with the approach.


So, please provide some advice on how to improve the script or maybe recommend some better alternatives than AutoHotkey.


Answer



Ok, it turns out there is a hack that enables AutoHotkey to work in Task Manager etc.


Enable interaction with administrative programs


Tried that. It worked. So far so good.


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...