Disable Enter key while holding rightshift

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
Kainie
Posts: 2
Joined: 03 Dec 2022, 11:27

Disable Enter key while holding rightshift

Post by Kainie » 03 Dec 2022, 11:29

Hello all,

I'm trying to write a script that disables the Enter key when I am holding down the right shift key.
This is what =i've tried so far.

Code: Select all

$Enter::
Shift := GetKeyState("Shift", "p")
If (Shift >= 1)
{
Send {Enter}
}
Return
But sadly this doesn't work

Rohwedder
Posts: 7555
Joined: 04 Jun 2014, 08:33
Location: Germany

Re: Disable Enter key while holding rightshift

Post by Rohwedder » 03 Dec 2022, 11:46

Hallo,
try:

Code: Select all

>+Enter::Return
Hotkey Modifier Symbols

Kainie
Posts: 2
Joined: 03 Dec 2022, 11:27

Re: Disable Enter key while holding rightshift

Post by Kainie » 03 Dec 2022, 12:04

Perfect, big thanks

Post Reply

Return to “Ask for Help (v1)”