diff --git a/MUNGA_L4/L4PADBINDINGS.cpp b/MUNGA_L4/L4PADBINDINGS.cpp index 48838d4..fb35377 100644 --- a/MUNGA_L4/L4PADBINDINGS.cpp +++ b/MUNGA_L4/L4PADBINDINGS.cpp @@ -41,7 +41,9 @@ namespace { "PageUp", VK_PRIOR }, { "PageDown", VK_NEXT }, { "Prior", VK_PRIOR }, { "Next", VK_NEXT }, { "Insert", VK_INSERT }, { "Delete", VK_DELETE }, - { "ShiftKey", VK_SHIFT }, { "ControlKey", VK_CONTROL }, + { "ShiftKey", VK_SHIFT }, { "Shift", VK_SHIFT }, + { "ControlKey", VK_CONTROL }, { "Ctrl", VK_CONTROL }, { "Control", VK_CONTROL }, + { "Menu", VK_MENU }, { "Alt", VK_MENU }, { "OemMinus", VK_OEM_MINUS }, { "Oemplus", VK_OEM_PLUS }, { "Oemcomma", VK_OEM_COMMA }, { "OemPeriod", VK_OEM_PERIOD }, { "OemOpenBrackets", VK_OEM_4 }, { "OemCloseBrackets", VK_OEM_6 }, @@ -335,15 +337,19 @@ namespace "# position sticks (the throttle). Every lamp button is also clickable\n" "# on the on-screen cockpit, so unbound addresses are never stranded.\n" "\n" -"# ---- Driving: keyboard --------------------------------------------\n" -"key W axis JoystickY deflect -1\n" -"key S axis JoystickY deflect 1\n" -"key A axis JoystickX deflect 1\n" -"key D axis JoystickX deflect -1\n" -"key Q axis LeftPedal deflect 1\n" -"key E axis RightPedal deflect 1\n" -"key PageUp axis Throttle rate 0.75\n" -"key PageDown axis Throttle rate -0.75\n" +"# ---- Flight: number pad + modifiers -------------------------------\n" +"# The whole letter board stays free for the MFD banks; flight lives\n" +"# on the numpad with throttle and reverse on the modifier keys.\n" +"key NumPad8 axis JoystickY deflect -1 # stick forward\n" +"key NumPad2 axis JoystickY deflect 1 # stick back\n" +"key NumPad4 axis JoystickX deflect 1 # stick left\n" +"key NumPad6 axis JoystickX deflect -1 # stick right\n" +"key NumPad7 axis LeftPedal deflect 1\n" +"key NumPad9 axis RightPedal deflect 1\n" +"key NumPad0 button 0x40 # Main trigger (Space works too)\n" +"key Shift axis Throttle rate 0.75 # throttle up\n" +"key Ctrl axis Throttle rate -0.75 # throttle down\n" +"key Alt button 0x3F # Throttle button (reverse thrust)\n" "\n" "# ---- Driving: Xbox controller (signs match the pod convention) ----\n" "padaxis LeftStickX axis JoystickX invert deadzone 0.24\n" @@ -352,10 +358,8 @@ namespace "padaxis LeftTrigger axis LeftPedal deadzone 0.12\n" "padaxis RightTrigger axis RightPedal deadzone 0.12\n" "\n" -"# ---- Joystick column: hat on the arrows, Main on Space, reverse\n" -"# ---- thrust on B (vRIO's gap key - the pod had it on the throttle)\n" +"# ---- Joystick column: hat on the arrows, Main on Space ------------\n" "key Space button 0x40 # Main trigger\n" -"key B button 0x3F # Throttle button (reverse thrust)\n" "key Up button 0x42 # Hat Up\n" "key Down button 0x41 # Hat Back\n" "key Left button 0x44 # Hat Left\n" @@ -377,8 +381,7 @@ namespace "\n" "# ---- Upper MFD bank: the number row is the top MFD row and the\n" "# ---- QWERTY row is the row under it, left to right across the\n" -"# ---- Left / Middle / Right MFDs. (W/A/S/D/Q/E drive; their bank\n" -"# ---- buttons live on the on-screen cockpit.)\n" +"# ---- Left / Middle / Right MFDs.\n" "key D1 button 0x2F\n" "key D2 button 0x2E\n" "key D3 button 0x2D\n" @@ -391,6 +394,9 @@ namespace "key D0 button 0x36\n" "key OemMinus button 0x35\n" "key Oemplus button 0x34\n" +"key Q button 0x2B\n" +"key W button 0x2A\n" +"key E button 0x29\n" "key R button 0x28\n" "key T button 0x23\n" "key Y button 0x22\n" @@ -402,8 +408,11 @@ namespace "key OemCloseBrackets button 0x30\n" "\n" "# ---- Lower MFD bank: home row and the row below it, two 4-key\n" -"# ---- blocks split by an unbound gap key (G), mirroring the keypad\n" -"# ---- gap between the Lower Left and Lower Right MFDs.\n" +"# ---- blocks split by an unbound gap key (G / B), mirroring the\n" +"# ---- keypad gap between the Lower Left and Lower Right MFDs.\n" +"key A button 0x0F\n" +"key S button 0x0E\n" +"key D button 0x0D\n" "key F button 0x0C\n" "key H button 0x07\n" "key J button 0x06\n" @@ -433,23 +442,9 @@ namespace "key F11 button 0x1C\n" "key F12 button 0x1D\n" "\n" -"# ---- Internal keypad on the numpad (hex keys on the operators) ----\n" -"key NumPad0 button 0x50\n" -"key NumPad1 button 0x51\n" -"key NumPad2 button 0x52\n" -"key NumPad3 button 0x53\n" -"key NumPad4 button 0x54\n" -"key NumPad5 button 0x55\n" -"key NumPad6 button 0x56\n" -"key NumPad7 button 0x57\n" -"key NumPad8 button 0x58\n" -"key NumPad9 button 0x59\n" -"key Divide button 0x5A # keypad A (/)\n" -"key Multiply button 0x5B # keypad B (*)\n" -"key Subtract button 0x5C # keypad C (-)\n" -"key Add button 0x5D # keypad D (+)\n" -"key Decimal button 0x5E # keypad E (.)\n" -"key Return button 0x5F # keypad F (Enter)\n"; +"# The pilot keypad (0x50-0x5F) and external keypad (0x60-0x6F) are\n" +"# unbound - the game never reads them - but remain bindable here\n" +"# (they arrive as arcade RIO key events).\n"; const char kBindingsFileName[] = "bindings.txt"; } diff --git a/MUNGA_L4/L4PADRIO.h b/MUNGA_L4/L4PADRIO.h index 7628275..06ec8b1 100644 --- a/MUNGA_L4/L4PADRIO.h +++ b/MUNGA_L4/L4PADRIO.h @@ -13,12 +13,13 @@ // Every input is REBINDABLE: bindings.txt beside the exe (vRIO's // profile format, written with the full default layout on first run) // maps keys and pad controls to RIO button addresses (0x00-0x47), the -// pilot/external keypads (0x50-0x6F, delivered as arcade KeyEvents), -// and the five axes with deflect/rate semantics. Defaults follow -// vRIO's board-complete layout with the driving keys carved out: -// WASD stick, Q/E pedals, PgUp/PgDn throttle, Space trigger, B -// reverse, arrows hat, letter rows = MFD banks, F-keys = secondary -// columns, numpad = pilot keypad. +// pilot/external keypads (0x50-0x6F, delivered as arcade KeyEvents; +// unbound by default - the game never reads them), and the five axes +// with deflect/rate semantics. Defaults: vRIO's complete board layout +// (number+letter rows = MFD banks, F-keys = secondary columns) with +// flight on the numpad - 8/2/4/6 stick, 7/9 pedals, 0 trigger - and +// the modifiers: Shift/Ctrl throttle up/down, Alt reverse thrust, +// Space trigger, arrows hat. // // Set L4PADFLIP to a string containing 'X' and/or 'Y' to invert the // stick axes on top of whatever the profile produces. diff --git a/RP_L4/RPL4.CPP b/RP_L4/RPL4.CPP index 42150f7..947fb2a 100644 --- a/RP_L4/RPL4.CPP +++ b/RP_L4/RPL4.CPP @@ -115,6 +115,14 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) case WM_DESTROY: PostQuitMessage(0); return 0; + case WM_SYSCOMMAND: + // Alt is a flight control (reverse thrust) - releasing it must + // not pop the window menu and steal keyboard focus + if ((wParam & 0xFFF0) == SC_KEYMENU) + { + return 0; + } + break; } return DefWindowProc(hWnd, uMsg, wParam, lParam); } diff --git a/pack-dist.ps1 b/pack-dist.ps1 index 757f3d6..5233652 100644 --- a/pack-dist.ps1 +++ b/pack-dist.ps1 @@ -103,16 +103,16 @@ Controls (XInput controller and/or keyboard) - EVERY input is rebindable: edit bindings.txt beside the exe (written with the full documented default layout on first run; delete it to restore). - Left stick / WASD joystick - LT / RT or Q / E left / right pedal - Right stick Y, PgUp/PgDn throttle (holds position) - A / Space joystick trigger - RB / B key reverse thrust + Left stick / NumPad 8462 joystick (8=fwd 2=back 4=left 6=right) + LT / RT or NumPad 7,9 left / right pedal + Right stick Y throttle (holds position) + Shift / Ctrl throttle up / down + A / Space / NumPad 0 joystick trigger + RB / Alt reverse thrust DPad / arrow keys joystick hat (look) Start,Back / 9,0 config buttons Number+letter rows MFD bank buttons (as printed on the panel) F1-F12 secondary / screen columns - Numpad pilot keypad (0-9, /*-+. = A-E, Enter = F) Alt+Q abort the mission (score banked) The full pod cockpit comes up in a single window: three green MFDs