Default bindings: pad-mandatory axes, full keyboard button field
Rework the shipped default profile around a required Xbox controller, refined from live-game testing: - All five axes are pad-only now (left stick / triggers / right stick); the key-axis bindings (arrows/WASD-style deflect and rate) are gone from the defaults, though the grammar remains supported. - Keyboard becomes the button field, geometry mirroring the panel: number row + QWERTY row = upper MFD bank, home + bottom rows = lower MFD bank as two 4-key blocks with an unbound gap key (G / B) standing in for the panel keypad gap, F1-F6 / F7-F12 = the Secondary / Screen columns top-to-bottom (0x16/0x17, 0x1E/0x1F deliberately unmapped), numpad = the full internal keypad with the hex keys on the operators (/ * - + . Enter = A-F). - Hat rides the arrow keys, Main stays on Space; Pinky / Middle / Upper / Panic are pad-only so no panic key sits inside the MFD field. - Pad B and LeftShoulder swap to Middle / Panic. - Rest of the throttle column and the external keypad stay unmapped. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,9 +29,14 @@ controls:
|
|||||||
bindings* applies edits live). Keys and pad buttons press any RIO address;
|
bindings* applies edits live). Keys and pad buttons press any RIO address;
|
||||||
pad sticks/triggers and keys drive the axes in each axis' realistic travel
|
pad sticks/triggers and keys drive the axes in each axis' realistic travel
|
||||||
window, with deflect (spring-back), rate (throttle-style, position holds),
|
window, with deflect (spring-back), rate (throttle-style, position holds),
|
||||||
deadzone, and invert options. Defaults: arrows = stick, W/S = throttle,
|
deadzone, and invert options. The default profile makes the controller
|
||||||
Q/E = pedals, numpad = internal keypad, IJKL/Space = hat + main, left
|
mandatory: all five axes live on the pad (left stick / triggers / right
|
||||||
stick / triggers / right stick = stick / pedals / throttle on the pad.
|
stick = stick / pedals / throttle) and the keyboard covers the button
|
||||||
|
field — number row + QWERTY row = the upper MFD bank, home + bottom
|
||||||
|
rows = the lower MFD bank (4-key blocks split by an unbound gap key),
|
||||||
|
F1–F6 / F7–F12 = the Secondary / Screen columns, numpad = internal
|
||||||
|
keypad (hex keys on the operators), arrows + Space = hat + main, with
|
||||||
|
ABXY / dpad / shoulders on the pad's named buttons.
|
||||||
|
|
||||||
## Wire behavior
|
## Wire behavior
|
||||||
|
|
||||||
|
|||||||
@@ -181,8 +181,9 @@ public static class BindingProfileFormat
|
|||||||
# <addr> RIO input address: lamp buttons 0x00-0x47, internal keypad
|
# <addr> RIO input address: lamp buttons 0x00-0x47, internal keypad
|
||||||
# 0x50-0x5F, external keypad 0x60-0x6F (hex or decimal).
|
# 0x50-0x5F, external keypad 0x60-0x6F (hex or decimal).
|
||||||
# <axis> Throttle | LeftPedal | RightPedal | JoystickY | JoystickX
|
# <axis> Throttle | LeftPedal | RightPedal | JoystickY | JoystickX
|
||||||
# <name> .NET Keys name: A-Z, D0-D9 (digit row), NumPad0-NumPad9,
|
# <name> .NET Keys name: A-Z, D0-D9 (digit row), F1-F12,
|
||||||
# Up, Down, Left, Right, Space, Enter, OemMinus, Oemplus, ...
|
# NumPad0-NumPad9, Up, Down, Left, Right, Space, Enter,
|
||||||
|
# OemMinus, Oemplus, Oemcomma, OemPeriod, ...
|
||||||
# <button> A B X Y DPadUp DPadDown DPadLeft DPadRight Start Back
|
# <button> A B X Y DPadUp DPadDown DPadLeft DPadRight Start Back
|
||||||
# LeftShoulder RightShoulder LeftThumb RightThumb
|
# LeftShoulder RightShoulder LeftThumb RightThumb
|
||||||
# <src> LeftStickX LeftStickY RightStickX RightStickY
|
# <src> LeftStickX LeftStickY RightStickX RightStickY
|
||||||
@@ -194,34 +195,86 @@ public static class BindingProfileFormat
|
|||||||
# is down and springs back on release; 'rate' walks the axis by <n>
|
# is down and springs back on release; 'rate' walks the axis by <n>
|
||||||
# per second and the position sticks (use it for the throttle).
|
# per second and the position sticks (use it for the throttle).
|
||||||
# NOTE: raw stick X runs NEGATIVE to the right (that is what RIOJoy
|
# NOTE: raw stick X runs NEGATIVE to the right (that is what RIOJoy
|
||||||
# expects), so 'right' is deflect -1 and pad X is inverted below.
|
# expects), so pad LeftStickX is inverted below.
|
||||||
|
|
||||||
# ---- Joystick: arrows deflect, spring back on release -------------
|
# ---- Axes: controller only ----------------------------------------
|
||||||
key Up axis JoystickY deflect 1
|
# This profile drives all five axes from the Xbox controller - a pad
|
||||||
key Down axis JoystickY deflect -1
|
# is required. Keyboard axis bindings ('key <name> axis ...' with
|
||||||
key Right axis JoystickX deflect -1
|
# deflect or rate, per the grammar above) are still supported if you
|
||||||
key Left axis JoystickX deflect 1
|
# want them back.
|
||||||
|
|
||||||
# ---- Throttle: W advances, S backs off, position holds ------------
|
# ---- Upper MFD bank: the number row is the top MFD row and the
|
||||||
key W axis Throttle rate 0.75
|
# ---- QWERTY row is the row under it, left to right across the
|
||||||
key S axis Throttle rate -0.75
|
# ---- Left / Middle / Right MFDs.
|
||||||
|
key D1 button 0x2F
|
||||||
|
key D2 button 0x2E
|
||||||
|
key D3 button 0x2D
|
||||||
|
key D4 button 0x2C
|
||||||
|
key D5 button 0x27
|
||||||
|
key D6 button 0x26
|
||||||
|
key D7 button 0x25
|
||||||
|
key D8 button 0x24
|
||||||
|
key D9 button 0x37
|
||||||
|
key D0 button 0x36
|
||||||
|
key OemMinus button 0x35
|
||||||
|
key Oemplus button 0x34
|
||||||
|
key Q button 0x2B
|
||||||
|
key W button 0x2A
|
||||||
|
key E button 0x29
|
||||||
|
key R button 0x28
|
||||||
|
key T button 0x23
|
||||||
|
key Y button 0x22
|
||||||
|
key U button 0x21
|
||||||
|
key I button 0x20
|
||||||
|
key O button 0x33
|
||||||
|
key P button 0x32
|
||||||
|
key OemOpenBrackets button 0x31
|
||||||
|
key OemCloseBrackets button 0x30
|
||||||
|
|
||||||
# ---- Pedals: hold to press, spring back ---------------------------
|
# ---- Lower MFD bank: home row and the row below it, two 4-key
|
||||||
key Q axis LeftPedal deflect 1
|
# ---- blocks split by an unbound gap key (G / B), mirroring the
|
||||||
key E axis RightPedal deflect 1
|
# ---- keypad gap between the Lower Left and Lower Right MFDs.
|
||||||
|
key A button 0x0F
|
||||||
|
key S button 0x0E
|
||||||
|
key D button 0x0D
|
||||||
|
key F button 0x0C
|
||||||
|
key H button 0x07
|
||||||
|
key J button 0x06
|
||||||
|
key K button 0x05
|
||||||
|
key L button 0x04
|
||||||
|
key Z button 0x0B
|
||||||
|
key X button 0x0A
|
||||||
|
key C button 0x09
|
||||||
|
key V button 0x08
|
||||||
|
key N button 0x03
|
||||||
|
key M button 0x02
|
||||||
|
key Oemcomma button 0x01
|
||||||
|
key OemPeriod button 0x00
|
||||||
|
|
||||||
# ---- Joystick / throttle column buttons ---------------------------
|
# ---- Secondary / Screen columns on the function keys, top to
|
||||||
|
# ---- bottom (0x16/0x17 and 0x1E/0x1F intentionally unmapped).
|
||||||
|
key F1 button 0x10
|
||||||
|
key F2 button 0x11
|
||||||
|
key F3 button 0x12
|
||||||
|
key F4 button 0x13
|
||||||
|
key F5 button 0x14
|
||||||
|
key F6 button 0x15
|
||||||
|
key F7 button 0x18
|
||||||
|
key F8 button 0x19
|
||||||
|
key F9 button 0x1A
|
||||||
|
key F10 button 0x1B
|
||||||
|
key F11 button 0x1C
|
||||||
|
key F12 button 0x1D
|
||||||
|
|
||||||
|
# ---- Joystick column: hat on the arrows, Main on Space. Pinky /
|
||||||
|
# ---- Middle / Upper / Panic are pad-only (X / B / Y / LeftShoulder).
|
||||||
key Space button 0x40 # Main
|
key Space button 0x40 # Main
|
||||||
key I button 0x42 # Hat Up
|
key Up button 0x42 # Hat Up
|
||||||
key K button 0x41 # Hat Back
|
key Down button 0x41 # Hat Back
|
||||||
key J button 0x44 # Hat Left
|
key Left button 0x44 # Hat Left
|
||||||
key L button 0x43 # Hat Right
|
key Right button 0x43 # Hat Right
|
||||||
key P button 0x45 # Pinky
|
|
||||||
key M button 0x46 # Middle
|
|
||||||
key U button 0x47 # Upper
|
|
||||||
key B button 0x3D # Panic
|
|
||||||
|
|
||||||
# ---- Internal keypad on the numpad --------------------------------
|
# ---- Internal keypad on the numpad (hex keys on the operators) ----
|
||||||
key NumPad0 button 0x50
|
key NumPad0 button 0x50
|
||||||
key NumPad1 button 0x51
|
key NumPad1 button 0x51
|
||||||
key NumPad2 button 0x52
|
key NumPad2 button 0x52
|
||||||
@@ -232,6 +285,12 @@ key NumPad6 button 0x56
|
|||||||
key NumPad7 button 0x57
|
key NumPad7 button 0x57
|
||||||
key NumPad8 button 0x58
|
key NumPad8 button 0x58
|
||||||
key NumPad9 button 0x59
|
key NumPad9 button 0x59
|
||||||
|
key Divide button 0x5A # keypad A (/)
|
||||||
|
key Multiply button 0x5B # keypad B (*)
|
||||||
|
key Subtract button 0x5C # keypad C (-)
|
||||||
|
key Add button 0x5D # keypad D (+)
|
||||||
|
key Decimal button 0x5E # keypad E (.)
|
||||||
|
key Return button 0x5F # keypad F (Enter - the main Enter key too)
|
||||||
|
|
||||||
# ---- Xbox controller: axes ----------------------------------------
|
# ---- Xbox controller: axes ----------------------------------------
|
||||||
padaxis LeftStickX axis JoystickX invert deadzone 0.2
|
padaxis LeftStickX axis JoystickX invert deadzone 0.2
|
||||||
@@ -242,14 +301,14 @@ padaxis RightTrigger axis RightPedal deadzone 0.12
|
|||||||
|
|
||||||
# ---- Xbox controller: buttons -------------------------------------
|
# ---- Xbox controller: buttons -------------------------------------
|
||||||
pad A button 0x40 # Main
|
pad A button 0x40 # Main
|
||||||
pad B button 0x3D # Panic
|
pad B button 0x46 # Middle
|
||||||
pad X button 0x45 # Pinky
|
pad X button 0x45 # Pinky
|
||||||
pad Y button 0x47 # Upper
|
pad Y button 0x47 # Upper
|
||||||
pad DPadUp button 0x42 # Hat Up
|
pad DPadUp button 0x42 # Hat Up
|
||||||
pad DPadDown button 0x41 # Hat Back
|
pad DPadDown button 0x41 # Hat Back
|
||||||
pad DPadLeft button 0x44 # Hat Left
|
pad DPadLeft button 0x44 # Hat Left
|
||||||
pad DPadRight button 0x43 # Hat Right
|
pad DPadRight button 0x43 # Hat Right
|
||||||
pad LeftShoulder button 0x46 # Middle
|
pad LeftShoulder button 0x3D # Panic
|
||||||
pad RightShoulder button 0x3F # Throttle button
|
pad RightShoulder button 0x3F # Throttle button
|
||||||
";
|
";
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,8 +13,8 @@ public class BindingProfileFormatTests
|
|||||||
BindingProfile profile = BindingProfileFormat.Parse(BindingProfileFormat.DefaultText, out var errors);
|
BindingProfile profile = BindingProfileFormat.Parse(BindingProfileFormat.DefaultText, out var errors);
|
||||||
|
|
||||||
Assert.Empty(errors);
|
Assert.Empty(errors);
|
||||||
Assert.True(profile.KeyButtons.Count >= 19); // named buttons + numpad digits
|
Assert.Equal(73, profile.KeyButtons.Count); // 40 MFD + 12 columns + 16 keypad + Space + 4 hat
|
||||||
Assert.Equal(8, profile.KeyAxes.Count); // arrows + W/S + Q/E
|
Assert.Empty(profile.KeyAxes); // axes are pad-only in the default profile
|
||||||
Assert.Equal(10, profile.PadButtons.Count);
|
Assert.Equal(10, profile.PadButtons.Count);
|
||||||
Assert.Equal(5, profile.PadAxes.Count);
|
Assert.Equal(5, profile.PadAxes.Count);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user