Create Multi-keybinds hotkeys; X-keys and AHK

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Seamndel
Posts: 8
Joined: 25 Jul 2021, 03:46

Create Multi-keybinds hotkeys; X-keys and AHK

Post by Seamndel » 03 Feb 2022, 19:19

Let's say I have this code that auto-runs psnprofiles.com once I press WIN+t

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.
#SingleInstance,Force 
#t::Run https://psnprofiles.com
Now. I got an X-keys device (an external separate-buttons device) where I've assigned a single button as a "WIN+t".
I'd like to make a small change and completely eliminate any chance of me actually pressing the WIN+t on my regular keyboard.

So. I've thought of replacing "#t" with something like "#gotopsnprofiles" (in both the AutoHotKeys script and in the X-key's software). Obviously that will make it next to impossible to accidently run the script. Also obvious is the fact that "#gotopsnprofiles" is an invalid hotkey.

How do I circumvent this ?
User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Create Multi-keybinds hotkeys; X-keys and AHK

Post by mikeyww » 03 Feb 2022, 19:34

Code: Select all

F3::Run, https://psnprofiles.com/
Seamndel
Posts: 8
Joined: 25 Jul 2021, 03:46

Re: Create Multi-keybinds hotkeys; X-keys and AHK

Post by Seamndel » 03 Feb 2022, 20:17

mikeyww wrote:

Code: Select all

F3::Run, https://psnprofiles.com/
I don't understand how F3 helps me in particular? What i want to do is to create an impossible hot key, like #gotopsnprofiles" and then assign it to single button on the X-keys.
User avatar
mikeyww
Posts: 27372
Joined: 09 Sep 2014, 18:38

Re: Create Multi-keybinds hotkeys; X-keys and AHK

Post by mikeyww » 03 Feb 2022, 21:27

I think the options would be to pick a (valid) hotkey that you would never use (e.g., combine multiple modifiers), see whether you can use a unique scan code, or try one of the forum scripts that handles multiple input devices. Others may know of additional ways. The first option seems especially easy to try.
Lepes
Posts: 141
Joined: 06 May 2021, 07:32
Location: Spain

Re: Create Multi-keybinds hotkeys; X-keys and AHK

Post by Lepes » 04 Feb 2022, 04:55

can you assign F13 to F24 keys to your external keyboard?
Post Reply

Return to “Ask for Help (v1)”