Skip to content

Commit f0feda7

Browse files
committed
Hide mouse hotkeys
1 parent c912096 commit f0feda7

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

src/Files.App/ViewModels/Settings/ActionsViewModel.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,8 @@ await MainWindow.Instance.DispatcherQueue.EnqueueOrInvokeAsync(() =>
9292

9393
foreach (var hotkey in command.HotKeys)
9494
{
95-
if (!hotkey.IsVisible)
95+
// Don't show mouse hotkeys for now because no editor provided for mouse input as of now
96+
if (!hotkey.IsVisible || hotkey.Key == Keys.Mouse4 || hotkey.Key == Keys.Mouse5)
9697
continue;
9798

9899
ValidKeyboardShortcuts.Add(new()

src/Files.App/Views/Settings/ActionsPage.xaml.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,12 @@ private void EditorTextBox_PreviewKeyDown(object sender, KeyRoutedEventArgs e)
292292
foreach (var modifier in modifierKeys)
293293
{
294294
if (pressedKey == modifier)
295+
{
296+
// Prevent key down event in other UIElements from getting invoked
297+
e.Handled = true;
298+
295299
return;
300+
}
296301
}
297302

298303
var pressedModifiers = HotKeyHelpers.GetCurrentKeyModifiers();

0 commit comments

Comments
 (0)