I am using auto hotkey to program a left mouse click to a key combination. This key combination is then assigned to a foot pedal attached to my computer by USB cable. The foot pedal is programmed to activate a key combination, which allows me to convert the autohotkey-assigned key combination to a mouse click. the foot switch cannot be programmed to click the mouse itself – only to fire a key combination.
The problem is each key combination that I have tried uses either the control key or the alt key followed by a letter or number. This combination always has some kind of unintended consequence. For example when using Microsoft Outlook and sending a click using control in the number one key leaves each email selected. Using the key combination in Microsoft Excel also leaves cells selected. It's almost as if the addition of control or alt keys is altering the function of each program – not just sending a true click.
Is there a way to assign a click to a key without using the control key or the alt key, but also not hijacking a common function, such as choosing the F9 key which is Artie used in many programs?
Here's the script I have been running:
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
^1::Click
Thank you.
Mouse click without using control or alt key
Re: Mouse click without using control or alt key
Could you make use of the Window (#) key instead?
Code: Select all
#NoEnv ; Recommended for performance and compatibility with future AutoHotkey releases.
; #Warn ; Enable warnings to assist with detecting common errors.
SendMode Input ; Recommended for new scripts due to its superior speed and reliability.
SetWorkingDir %A_ScriptDir% ; Ensures a consistent starting directory.
#1::Click
-
- Posts: 3
- Joined: 11 Apr 2017, 09:21
Re: Mouse click without using control or alt key
Unfortunately no.Windows key was causing some issues so I disabled it.
Re: Mouse click without using control or alt key
Maybe SHIFT+ESC?
+Esc::Click
+Esc::Click
-
- Posts: 3
- Joined: 11 Apr 2017, 09:21
Re: Mouse click without using control or alt key
just tested that – has the same effect of selecting multiple messages in Outlook.
-
- Posts: 3
- Joined: 11 Apr 2017, 09:21
Re: Mouse click without using control or alt key
I just tried picking a single key (] key). That seems to work. And after all, how often do I really need brackets anyway? Thanks for your help.