Skip to content

Commit ba514c8

Browse files
committed
Add keyboard command for quick release
1 parent 4876ee9 commit ba514c8

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

Source/ORTS.Common/Input/UserCommand.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ public enum UserCommand
133133
[GetString("Control Dynamic Brake Increase")] ControlDynamicBrakeIncrease,
134134
[GetString("Control Dynamic Brake Decrease")] ControlDynamicBrakeDecrease,
135135
[GetString("Control Bail Off")] ControlBailOff,
136+
[GetString("Control Brake Quick Release")] ControlBrakeQuickRelease,
136137
[GetString("Control Brake Overcharge")] ControlBrakeOvercharge,
137138
[GetString("Control Initialize Brakes")] ControlInitializeBrakes,
138139
[GetString("Control Handbrake Full")] ControlHandbrakeFull,

Source/ORTS.Settings/InputSettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ static void InitializeCommands(UserCommandInput[] Commands)
344344
Commands[(int)UserCommand.ControlAlerter] = new UserCommandKeyInput(0x2C);
345345
Commands[(int)UserCommand.ControlBackwards] = new UserCommandKeyInput(0x1F);
346346
Commands[(int)UserCommand.ControlBailOff] = new UserCommandKeyInput(0x35);
347-
Commands[(int)UserCommand.ControlBrakeOvercharge] = new UserCommandKeyInput(0x35, KeyModifiers.Control);
347+
Commands[(int)UserCommand.ControlBrakeQuickRelease] = new UserCommandKeyInput(0x35, KeyModifiers.Control);
348+
Commands[(int)UserCommand.ControlBrakeOvercharge] = new UserCommandKeyInput(0x35, KeyModifiers.Control | KeyModifiers.Shift);
348349
Commands[(int)UserCommand.ControlBatterySwitchClose] = new UserCommandKeyInput(0x52);
349350
Commands[(int)UserCommand.ControlBatterySwitchOpen] = new UserCommandKeyInput(0x52, KeyModifiers.Control);
350351
Commands[(int)UserCommand.ControlBell] = new UserCommandKeyInput(0x30);

Source/RunActivity/Viewer3D/RollingStock/MSTSLocomotiveViewer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ public override void InitializeUserInputCommands()
162162
UserInputCommands.Add(UserCommand.ControlSteamHeatIncrease, new Action[] { () => Locomotive.StopSteamHeatIncrease(), () => Locomotive.StartSteamHeatIncrease(null) });
163163
UserInputCommands.Add(UserCommand.ControlSteamHeatDecrease, new Action[] { () => Locomotive.StopSteamHeatDecrease(), () => Locomotive.StartSteamHeatDecrease(null) });
164164
UserInputCommands.Add(UserCommand.ControlBailOff, new Action[] { () => new BailOffCommand(Viewer.Log, false), () => new BailOffCommand(Viewer.Log, true) });
165+
UserInputCommands.Add(UserCommand.ControlBrakeQuickRelease, new Action[] { () => new QuickReleaseCommand(Viewer.Log, false), () => new QuickReleaseCommand(Viewer.Log, true) });
165166
UserInputCommands.Add(UserCommand.ControlBrakeOvercharge, new Action[] { () => new BrakeOverchargeCommand(Viewer.Log, false), () => new BrakeOverchargeCommand(Viewer.Log, true) });
166167
UserInputCommands.Add(UserCommand.ControlInitializeBrakes, new Action[] { Noop, () => new InitializeBrakesCommand(Viewer.Log) });
167168
UserInputCommands.Add(UserCommand.ControlHandbrakeNone, new Action[] { Noop, () => new HandbrakeCommand(Viewer.Log, false) });

0 commit comments

Comments
 (0)