Browse Source

maintain key down event, add extra cases to handle shift and control modifiers

pull/7440/head
Emmanuel Hansen 5 years ago
parent
commit
280eef2d23
  1. 6
      src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml.cs

6
src/Avalonia.Diagnostics/Diagnostics/Views/MainWindow.xaml.cs

@ -27,7 +27,7 @@ namespace Avalonia.Diagnostics.Views
_keySubscription = InputManager.Instance?.Process _keySubscription = InputManager.Instance?.Process
.OfType<RawKeyEventArgs>() .OfType<RawKeyEventArgs>()
.Where(x => x.Type == RawKeyEventType.KeyUp) .Where(x => x.Type == RawKeyEventType.KeyDown)
.Subscribe(RawKeyDown); .Subscribe(RawKeyDown);
_frozenPopupStates = new Dictionary<Popup, IDisposable>(); _frozenPopupStates = new Dictionary<Popup, IDisposable>();
@ -169,7 +169,9 @@ namespace Avalonia.Diagnostics.Views
switch (e.Modifiers) switch (e.Modifiers)
{ {
case RawInputModifiers.Control | RawInputModifiers.Shift: case RawInputModifiers.Control when (e.Key == Key.LeftShift || e.Key == Key.RightShift):
case RawInputModifiers.Shift when (e.Key == Key.LeftCtrl || e.Key == Key.RightCtrl):
case RawInputModifiers.Shift | RawInputModifiers.Control:
{ {
IControl? control = null; IControl? control = null;

Loading…
Cancel
Save