Browse Source

Merge pull request #11090 from Gillibald/fixes/buttonAccessKeyAltGr

Fix Button access key handling for AltGr
pull/11111/head
Max Katz 3 years ago
committed by GitHub
parent
commit
2452900976
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/Avalonia.Base/Input/AccessKeyHandler.cs

2
src/Avalonia.Base/Input/AccessKeyHandler.cs

@ -176,7 +176,7 @@ namespace Avalonia.Input
{
bool menuIsOpen = MainMenu?.IsOpen == true;
if (e.KeyModifiers.HasAllFlags(KeyModifiers.Alt) || menuIsOpen)
if (e.KeyModifiers.HasAllFlags(KeyModifiers.Alt) && !e.KeyModifiers.HasAllFlags(KeyModifiers.Control) || menuIsOpen)
{
// If any other key is pressed with the Alt key held down, or the main menu is open,
// find all controls who have registered that access key.

Loading…
Cancel
Save