Easily one of the most annoying things about the game's UI: it takes no less than 7 keystrokes/button presses just to quit the game to the Start menu.
MUCH more satisfying to do that with a hotkey.
I'm just an AutoHotkey novice, but this is a very simple standalone script for sending the keystrokes to exit to Start screen when pressing: Win + F11. Please note:
- This hotkey only triggers when Elden Ring is the active window.
- This will not work if you are in any menus. Exit any menus before using script.
- This does *not* exit the game completely, but only takes you to the Start Screen.
- Only *after* you see the Start Screen can you safely hit "Alt+F4" to exit the game.
- If you're having problems, try using longer wait "Sleep" times. This can vary from PC to PC.
- This script has to be running BEFORE you press the hotkey (This might not be obvious to new AHK users)
- It does NOT work if you just send the keys directly (e.g. Send, {Esc} does NOT work). You have to record the "down" and "up" states of all the buttons separately (as I've done in this script).
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.
SetTitleMatchMode, 2
#IfWinActive, ELDEN RING™
#F11::
Send, {Escape Down}
Sleep 50
Send, {Escape Up}
Sleep 200
Send, {Up Down}
Sleep 50
Send, {Up Up}
Sleep, 500
Send, {e down}
Sleep 50
Send, {e up}
Sleep, 100
Send, {z down}
Sleep 50
Send, {z up}
Sleep, 100
Send, {e down}
Sleep 50
Send, {e up}
Sleep, 100
Send, {Left Down}
Sleep 50
Send, {Left Up}
Sleep, 500
Send, {e down}
Sleep 50
Send, {e up}
Sleep, 100
return
#IfWinActive
====================
**Update 05-13-22**
I'm using a revised version of the script now that is a lot faster, and utilizes Subs and expression variables. I like this approach a lot better because it sets you up to be able to use the same subroutines for other keystroke sequences. It's a lot easier to just type "GoSub, PressZ" than it is to send the "Down" and "Up" states with Sleep/Wait periods in between.
You can edit the values of the Delay times at the top. These are the values that are working for me right now.
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.
; ======== DELAY/SLEEP SETTINGS ===========
KeyStateDelay := 25 ; Minimum delay between Key States (down or up)
MenuDelay := 50 ; Min. Delay for switching between menus
MinDelay := 25 ; Minimum delay between keystrokes
; ======== Exit to Main Menu ===========
#IfWinActive, ELDEN RING™
#F11::
GoSub, PressEsc
Sleep MenuDelay
GoSub, PressUp
GoSub, PressE
Sleep MenuDelay
GoSub, PressZ
Sleep MenuDelay
GoSub, PressE
GoSub, PressLeft
GoSub, PressE
Return
#IfWinActive
; ========= SUBS ===========
PressEsc:
Send, {Escape Down}
Sleep KeyStateDelay
Send, {Escape Up}
Sleep MinDelay
Return
PressE:
Send, {e Down}
Sleep KeyStateDelay
Send, {e Up}
Sleep MinDelay
Return
PressZ:
Send, {z Down}
Sleep KeyStateDelay
Send, {z Up}
Sleep MinDelay
Return
PressUp:
Send, {Up Down}
Sleep KeyStateDelay
Send, {Up Up}
Sleep MinDelay
Return
PressDown:
Send, {Down Down}
Sleep KeyStateDelay
Send, {Down Up}
Sleep MinDelay
Return
PressRight:
Send, {Right Down}
Sleep KeyStateDelay
Send, {Right Up}
Sleep MinDelay
Return
PressLeft:
Send, {Left Down}
Sleep KeyStateDelay
Send, {Left Up}
Sleep MinDelay
Return