Better Sprinting

Better Sprinting

1M Downloads

Keybind overhaul

chylex opened this issue ยท 8 comments

commented

Tap to sprint

The Sprint (hold) key should allow vanilla-style tapping to start sprinting, but stopping the sprint after slowing down.

This could be implemented by changing the title to Sprint (hold / tap), where hold and tap are clickable, and the selected option is underlined.

Modifier combo support

When the hold keybinding is set to a modifier key (Ctrl, Shift, Alt), it should be possible to set the toggle keybinding to a modifier combo.

For ex. sneaking could be set to Ctrl hold, Ctrl+Y toggle. Holding Ctrl would start sneaking, then finishing the combo by pressing Y would turn on the toggle. Then:

  • If Ctrl has not been released yet, pressing Y again would cancel the toggle
  • After releasing Ctrl, tapping it once or pressing the whole Ctrl+Y combo would cancel the toggle

Additional toggle modes

Sprinting and sneaking should have additional ways to toggle them. The toggle keybinds should have a drop-down menu with the following options:

  • Separate key binding
  • Tap [Sprint/Sneak] quickly to toggle (#43)
  • Tap [Sprint/Sneak] twice to toggle

Choosing anything other than Separate key binding would disable the keybind element, and internally unset the key. Choosing Separate key binding again would re-enable and immediately focus the keybind element.

commented
commented

Any chance of this still happening?
A sprint toggle is fine in single-player but on servers where the first press might not register immediately, the vanilla behavior is much better IMO.

commented

What do you mean, vanilla-style tap to sprint was implemented 6 months ago.

commented

In vanilla pressing the sprint key again after already sprinting does nothing. This makes it "fine" to spam the key.
When sprinting up mountains this becomes essential as it's pretty annoying to get set back to walking when jumping just that split second too late.

I've not found a way to replicate this behavior using the mod, but still want to use some of the other features it provides.

commented

Nothing mentioned in this issue would solve that problem. I don't understand how spamming sprint key does anything different than holding/toggling the sprint key with the mod installed, the mod locks in the sprint state as soon as the sprinting conditions allow it (i.e. no horizontal collision).

commented

Oh, my bad seems I didn't understand the issue description correctly.
I'll create a separate issue explaining it in more detail.

commented
  • Tap to sprint - 9962a39
  • Modifier combo support - 4d0944b
  • Additional toggle modes - TODO
commented

The modifier combos actually work really well, for release 3.0.0 that'll be enough and I'll test changing the default keybindings to modifier combos.