Mouse click without using control or alt key

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
JohnBarnes

Mouse click without using control or alt key

11 Apr 2017, 09:33

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.
User avatar
aztec3
Posts: 177
Joined: 07 Apr 2014, 12:05

Re: Mouse click without using control or alt key

11 Apr 2017, 12:11

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
barnesjohn
Posts: 3
Joined: 11 Apr 2017, 09:21

Re: Mouse click without using control or alt key

11 Apr 2017, 13:57

Unfortunately no.Windows key was causing some issues so I disabled it.
barnesjohn
Posts: 3
Joined: 11 Apr 2017, 09:21

Re: Mouse click without using control or alt key

11 Apr 2017, 14:28

just tested that – has the same effect of selecting multiple messages in Outlook.
barnesjohn
Posts: 3
Joined: 11 Apr 2017, 09:21

Re: Mouse click without using control or alt key

11 Apr 2017, 14:34

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.

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: AlFlo, Chunjee, Google [Bot], peter_ahk and 119 guests