Fixes commands with [brackets] such a OVERRIDE_LOCKDOWN_ALPHA[CLASS_V] in R7D1 delimiting on the [ ] brackets and therefore not being selectable as a single chunk of text
Adds a ctrl button so you can perform ctrl+c to cancel terminal pings repeating with -T
Adds [ and ] keys to the keyboard so that they can be input manually if desired.
How
[ Brackets ]
We only delimit on [ ] because they sometimes surround words of interest with them. Fix is to not delimit on them initially, and then trim them if both the first and last characters of the selection is a [ bracket ]
CTRL
When pressed, PhysicalButtons with a Modifier KeyType set an internal IsToggled state that is represented in their color state.
When pressedTerminalKeyboardInterface adds or removes the modifier to a HashSet<KeyCode, which is queried and cleared in TerminalKeyboardInterface.LateUpdate() if and only if a string or keycode input was presented that frame.
These modifiers are presented alongside other KeyCode input in TerminalKeyboardInterface.GetKeycodeDown().
Modifier keys such as ctrl and shift are queried by UnityEngine.Input.GetKey instead of the existing UnityEngine.Input.GetKeyDown patch, so an additional patch was added for this.
If an input is received that corresponds to neither a KeyCode nor a String input (e.g. arrow keys, backspace, exit etc), we just clear the modifier HashSet immediately.
Likewise, the button will clear its own IsToggled state if any other button is pressed.
What
This PR
[brackets]
such aOVERRIDE_LOCKDOWN_ALPHA[CLASS_V]
in R7D1 delimiting on the[ ]
brackets and therefore not being selectable as a single chunk of textctrl
button so you can performctrl+c
to cancel terminal pings repeating with-T
Adds
[
and]
keys to the keyboard so that they can be input manually if desired.How
[ Brackets ]
We only delimit on
[ ]
because they sometimes surround words of interest with them. Fix is to not delimit on them initially, and then trim them if both the first and last characters of the selection is a[ bracket ]
CTRL
When pressed,
PhysicalButton
s with aModifier KeyType
set an internalIsToggled
state that is represented in their color state. When pressedTerminalKeyboardInterface
adds or removes the modifier to aHashSet<KeyCode
, which is queried and cleared inTerminalKeyboardInterface.LateUpdate()
if and only if a string or keycode input was presented that frame. These modifiers are presented alongside otherKeyCode
input inTerminalKeyboardInterface.GetKeycodeDown()
. Modifier keys such asctrl
andshift
are queried byUnityEngine.Input.GetKey
instead of the existingUnityEngine.Input.GetKeyDown
patch, so an additional patch was added for this.If an input is received that corresponds to neither a
KeyCode
nor aString input
(e.g. arrow keys, backspace, exit etc), we just clear the modifierHashSet
immediately. Likewise, the button will clear its ownIsToggled
state if any other button is pressed.