Skip to content

Commit 6bd2400

Browse files
authored
Merge pull request #3354 from tkohlmeier/keydown
2 parents fecaf3d + fb4391e commit 6bd2400

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

src/UniGetUI/Pages/MainView.xaml.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,14 @@ public MainView()
7373
}
7474

7575
MoreNavButtonMenu.Closed += (_, _) => SelectNavButtonForPage(CurrentPage_t);
76-
KeyUp += (s, e) =>
76+
KeyDown += (s, e) =>
7777
{
78+
if (e.KeyStatus.WasKeyDown)
79+
{
80+
// ignore repeated KeyDown events when pressing and holding a key
81+
return;
82+
}
83+
7884
bool IS_CONTROL_PRESSED = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Control).HasFlag(CoreVirtualKeyStates.Down);
7985
bool IS_SHIFT_PRESSED = InputKeyboardSource.GetKeyStateForCurrentThread(VirtualKey.Shift).HasFlag(CoreVirtualKeyStates.Down);
8086

0 commit comments

Comments
 (0)