How to require pressing Shift+Enter in order to result in a press of Enter
Started by
terrisus
, Sep 30 2015 09:44 PM
Best Answer Exaskryz , 01 October 2015 - 02:16 AM
2 replies to this topic
Hey all. I've done a whole bunch of stuff with AutoHotKey, and this seems like something I should be able to figure out myself, but nothing's springing to mind at the moment, so I figured I would ask.
Is there any way to change the behavior of the Enter key so that pressing the Enter key by itself does not register and Enter press, but that you need to hold Shift and press Enter in order to register an Enter press?
Basically, the goal of this is to eliminate accidental Enter presses (in particular, when typing in a field where pressing Enter results in submitting the field).
Thanks for any help, it's much appreciated.
#1
-
Posted 30 September 2015 - 09:44 PM
✓ Best Answer
$enter::return +enter::Send {enter}
The $ modifier is to make sure that when AHK performs Send {enter}
that it doesn't trigger the enter hotkey itself. There are other ways to ensure that wouldn't happen, but this is a simple method for it.
#2
-
Posted 01 October 2015 - 02:16 AM
$enter::return +enter::Send {enter}The $ modifier is to make sure that when AHK performs
Send {enter}
that it doesn't trigger the enter hotkey itself. There are other ways to ensure that wouldn't happen, but this is a simple method for it.
Yup, that did it.
Thanks a bunch, much appreciated
#3
-
Posted 01 October 2015 - 02:27 AM