Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion OpenDreamClient/Interface/DreamInterfaceManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,17 @@ public void LoadInterfaceFromSource(string source) {
LoadInterface(interfaceDescriptor);
}

public void Initialize() {
private void SetupBaseDreamBinds() {
// Set up the middle-mouse button keybind
_inputManager.Contexts.GetContext("common").AddFunction(OpenDreamKeyFunctions.MouseMiddle);
_inputManager.RegisterBinding(new KeyBindingRegistration() {
Function = OpenDreamKeyFunctions.MouseMiddle,
BaseKey = Keyboard.Key.MouseMiddle
});
}

public void Initialize() {
SetupBaseDreamBinds();

Cursors = new(_clyde);

Expand Down Expand Up @@ -936,6 +940,7 @@ private void Reset() {
MacroSets.Clear();

_inputManager.ResetAllBindings();
SetupBaseDreamBinds();
}

private void LoadInterface(InterfaceDescriptor descriptor) {
Expand Down
1 change: 1 addition & 0 deletions Resources/keybinds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ binds: # These are all the current engine keybinds.
type: State
key: BackSpace
canRepeat: true
priority: 1 # ensures that it hooks before a macro binding can interfere
- function: TextSubmit
type: State
key: Return
Expand Down
Loading