This PR fixes some issues with the terminal keyboard introduced by the 2022-08-19 patch.
Problem # 1: Keyboard stops responding ( except for exit button ) after hitting backspace or the arrow keys.
Dummy_InputHandler, responsible for actions triggered by the keyboards such as InputAction.TerminalDel and InputAction.TerminalUp assumed that getDown() would be called before getState() or getUp(), or at least called at some point.
As of the patch, only getState() and getUp() are queried for these InputActions, resulting in the key being stuck in a down state, breaking the rest of the keyboard.
This was fixed by moving the figure-out-what-the-states-should-be logic to a single shared DummyAction.Evaluate() that is run regardless of whether getDown(), getUp(), or getState() is called.
Problem # 2: The Backspace button doesn't actually do anything anymore.
After fixing the above problem the keyboard no longer breaks, and the arrow keys that also rely on InputActions work correctly, but, despite being queried, the Backspace key does not actually do anything.
Most likely they moved some logic around and this is now a text input instead of an InputAction, though I haven't decompiled it to confirm.
Solved by having the Backspace button input a \u0008 Backspace character instead of triggering InputAction.TerminalDel
Other changes
In addition to these changes, Dummy_InputHandler now defaults to holding the key down for 5 frames before releasing it, instead of a single frame, and Backspace, ESC, and all the Arrow keys now also trigger their corresponding KeyCode.
This may or may not fix a very rare issue where Exit button on the keyboard will not exit the terminal, and you have to use reload/dismiss instead.
What & How
This PR fixes some issues with the terminal keyboard introduced by the 2022-08-19 patch.
Problem # 1: Keyboard stops responding ( except for exit button ) after hitting
backspace
or thearrow
keys.Dummy_InputHandler
, responsible for actions triggered by the keyboards such asInputAction.TerminalDel
andInputAction.TerminalUp
assumed thatgetDown()
would be called beforegetState()
orgetUp()
, or at least called at some point.As of the patch, only
getState()
andgetUp()
are queried for theseInputAction
s, resulting in the key being stuck in a down state, breaking the rest of the keyboard.This was fixed by moving the figure-out-what-the-states-should-be logic to a single shared
DummyAction.Evaluate()
that is run regardless of whethergetDown()
,getUp()
, orgetState()
is called.Problem # 2: The Backspace button doesn't actually do anything anymore.
After fixing the above problem the keyboard no longer breaks, and the arrow keys that also rely on
InputAction
s work correctly, but, despite being queried, the Backspace key does not actually do anything.Most likely they moved some logic around and this is now a text input instead of an
InputAction
, though I haven't decompiled it to confirm.Solved by having the Backspace button input a
\u0008
Backspace character instead of triggeringInputAction.TerminalDel
Other changes In addition to these changes,
Dummy_InputHandler
now defaults to holding the key down for 5 frames before releasing it, instead of a single frame, andBackspace
,ESC
, and all theArrow
keys now also trigger their correspondingKeyCode
.This may or may not fix a very rare issue where
Exit
button on the keyboard will not exit the terminal, and you have to usereload/dismiss
instead.