Skip to content

Commit

Permalink
Fix the menu open key - alt and only alt
Browse files Browse the repository at this point in the history
  • Loading branch information
andydotxyz committed Oct 12, 2021
1 parent 7361f81 commit 0b8f09e
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions internal/driver/glfw/window.go
Original file line number Diff line number Diff line change
Expand Up @@ -1142,7 +1142,7 @@ func (w *window) keyPressed(_ *glfw.Window, key glfw.Key, scancode int, action g
w.menuDeactivationPending = desktop.KeyNone
switch action {
case glfw.Release:
if action == glfw.Release {
if action == glfw.Release && keyName != "" {
switch keyName {
case pendingMenuToggle:
w.canvas.ToggleMenu()
Expand All @@ -1164,9 +1164,7 @@ func (w *window) keyPressed(_ *glfw.Window, key glfw.Key, scancode int, action g
case glfw.Press:
switch keyName {
case desktop.KeyAltLeft, desktop.KeyAltRight:
if (keyName == desktop.KeyAltLeft || keyName == desktop.KeyAltRight) && keyDesktopModifier == desktop.AltModifier {
w.menuTogglePending = keyName
}
w.menuTogglePending = keyName
case fyne.KeyEscape:
w.menuDeactivationPending = keyName
}
Expand Down

0 comments on commit 0b8f09e

Please sign in to comment.