mirror of
https://github.com/KeatonTheBot/Ryujinx.git
synced 2026-03-29 00:38:43 +00:00
UI: Added the ability to unbind hotkeys via pressing backspace.
Some checks are pending
Release job / Create tag (push) Waiting to run
Release job / Release for linux-arm64 (push) Waiting to run
Release job / Release for linux-x64 (push) Waiting to run
Release job / Release for win-x64 (push) Waiting to run
Release job / Release MacOS universal (push) Waiting to run
Release job / flatpak_release (push) Blocked by required conditions
Some checks are pending
Release job / Create tag (push) Waiting to run
Release job / Release for linux-arm64 (push) Waiting to run
Release job / Release for linux-x64 (push) Waiting to run
Release job / Release for win-x64 (push) Waiting to run
Release job / Release MacOS universal (push) Waiting to run
Release job / flatpak_release (push) Blocked by required conditions
This commit is contained in:
parent
e86801fa12
commit
7960ea643f
2 changed files with 6 additions and 12 deletions
|
|
@ -87,8 +87,13 @@ namespace Ryujinx.Ava.UI.Helpers
|
|||
|
||||
ToggledButton.IsChecked = false;
|
||||
|
||||
ButtonAssigned?.Invoke(this, new ButtonAssignedEventArgs(ToggledButton, pressedButton));
|
||||
if (pressedButton.HasValue && pressedButton.Value.AsHidType<Key>() == Key.BackSpace)
|
||||
{
|
||||
ButtonAssigned?.Invoke(this, new ButtonAssignedEventArgs(ToggledButton, new Button(Key.Unbound)));
|
||||
return;
|
||||
}
|
||||
|
||||
ButtonAssigned?.Invoke(this, new ButtonAssignedEventArgs(ToggledButton, pressedButton));
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -42,15 +42,6 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||
}
|
||||
}
|
||||
|
||||
private void MouseClick(object sender, PointerPressedEventArgs e)
|
||||
{
|
||||
bool shouldUnbind = e.GetCurrentPoint(this).Properties.IsMiddleButtonPressed;
|
||||
|
||||
_currentAssigner?.Cancel(shouldUnbind);
|
||||
|
||||
PointerPressed -= MouseClick;
|
||||
}
|
||||
|
||||
private void Button_IsCheckedChanged(object sender, RoutedEventArgs e)
|
||||
{
|
||||
if (sender is ToggleButton button)
|
||||
|
|
@ -68,8 +59,6 @@ namespace Ryujinx.Ava.UI.Views.Settings
|
|||
|
||||
this.Focus(NavigationMethod.Pointer);
|
||||
|
||||
PointerPressed += MouseClick;
|
||||
|
||||
var keyboard = (IKeyboard)_avaloniaKeyboardDriver.GetGamepad("0");
|
||||
IButtonAssigner assigner = new KeyboardKeyAssigner(keyboard);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue