Skip to content

Instantly share code, notes, and snippets.

@nelsam
Created July 18, 2024 20:12
Show Gist options
  • Save nelsam/c91ecf4b03d65cf1a847b80018c42d59 to your computer and use it in GitHub Desktop.
Save nelsam/c91ecf4b03d65cf1a847b80018c42d59 to your computer and use it in GitHub Desktop.
My Elden Ring input-remapper Scripts
# These bind pouch items to a single key press
KEY_F + key_1
# These bind pouch items to a single key press
KEY_F + key_2
# These bind pouch items to a single key press
KEY_F + key_3
# These bind pouch items to a single key press
KEY_F + key_4
# I have a button on my wrist rest that changes the keys on my keyboard,
# so these don't make as much sense on other keyboards. But the sentiment
# is that these are the keys I use to switch weapons/items.
KEY_1
# I have a button on my wrist rest that changes the keys on my keyboard,
# so these don't make as much sense on other keyboards. But the sentiment
# is that these are the keys I use to switch weapons/items.
KEY_2
# I have a button on my wrist rest that changes the keys on my keyboard,
# so these don't make as much sense on other keyboards. But the sentiment
# is that these are the keys I use to switch weapons/items.
KEY_3
# I have a button on my wrist rest that changes the keys on my keyboard,
# so these don't make as much sense on other keyboards. But the sentiment
# is that these are the keys I use to switch weapons/items.
KEY_4
# Elden Ring doesn't seem to consistently detect
# the key press if we delay much less than 35ms.
# Even key(KEY_LEFTSHIFT) is sometimes dropped.
#
# So throughout this, we use key_down().wait(35).
# key_up() to ensure that Elden Ring actually
# detects the press.
if_eq($sprinting, 1,
# LEFTSHIFT is already being held, so release,
# then tap, then hold again.
key_up(KEY_LEFTSHIFT).
wait(35).
key_down(KEY_LEFTSHIFT).
wait(35).
key_up(KEY_LEFTSHIFT).
wait(35).
key_down(KEY_LEFTSHIFT),
key_down(KEY_LEFTSHIFT).
wait(35).
key_up(KEY_LEFTSHIFT)
)
key_down(KEY_LEFTSHIFT).
set(sprinting, 1).
wait(450).
hold().
key_up(KEY_LEFTSHIFT).
set(sprinting, 0)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment