Skip to content

Jedi Knight: a gamepad jump is as high as a keyboard one; face buttons do one thing each - #41

Merged
finger563 merged 1 commit into
mainfrom
fix/jk-gamepad-face-buttons
Nov 25, 2026
Merged

finger563 merged 1 commit into
mainfrom
fix/jk-gamepad-face-buttons

Conversation

@finger563

Copy link
Copy Markdown
Contributor

Engine side: esp-cpp/OpenJKDF2#6. This PR bumps components/jk/OpenJKDF2 to that branch (fc4edad3) and adds jk_esp_input_t.joy_buttons.

Summary

  • Jumping with the gamepad's B goes as high as jumping with the keyboard.
    • The USB gamepad's face buttons reached JK twice: as the keys of the gamepad layout and as joystick buttons, which JK's default joystick binds act on too.
    • B (jump) also crouched, and the engine launches a crouched jump at 0.7× the speed.
  • Each face button now does one thing in play: A activates, B jumps, X crouches, Y uses the item. Before, A also fired, X also activated and Y also jumped.
  • JK's menus still get every button, so B is still Back.
  • jk_esp_read_input fills the new joy_buttons (touch pad buttons, plus the USB gamepad's without a/b/x/y), and the engine uses it in play.

Testing (Tab5)

Press (held 300 ms, level 1) Before After
Keyboard X rise 0.1149 0.1149
USB pad B 0.095, crouched 0.1149
USB pad Y jumped use item only
START, then B in-game menu opens, B closes it

🤖 Generated with Claude Code

https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY

…s do one thing each

The USB gamepad's face buttons reached JK twice: as the keys of the gamepad
layout (A activate, B jump, X crouch, Y use item) and as joystick buttons,
which JK's default joystick binds map to fire, crouch, activate and jump. So B
jumped crouched, which the engine launches at 0.7x the speed (measured: rise
0.095 against 0.1149 for the keyboard's X). A also fired, X also activated
and Y also jumped. jk_esp_read_input now also gives the engine joy_buttons,
the buttons without the USB gamepad's a/b/x/y, and the engine uses it in play
(esp-cpp/OpenJKDF2 esp32/gamepad-face-buttons). JK's menus still get every
button, so B is still Back there.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SFCMzomCZ5wRHJN4sxwkvY
@finger563
finger563 merged commit a569849 into main Nov 25, 2026
1 check passed
@finger563
finger563 deleted the fix/jk-gamepad-face-buttons branch November 25, 2026 02:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant