We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My code has working menu shortcuts on MacOS, but the same shortcuts don't work on Linux (with a different modifier key)
Create a simple menu item with a shortcut
No response
package main import ( "runtime" "fyne.io/fyne/v2" "fyne.io/fyne/v2/app" "fyne.io/fyne/v2/driver/desktop" "fyne.io/fyne/v2/widget" ) func main() { a := app.New() w := a.NewWindow("Menu test") text := widget.NewLabel("Hello") w.SetContent(text) var modKey fyne.KeyModifier = fyne.KeyModifierControl if runtime.GOOS == "darwin" { modKey = fyne.KeyModifierSuper } item := fyne.NewMenuItem("Test", func() { text.SetText("World!") }) item.Shortcut = &desktop.CustomShortcut{KeyName: fyne.KeyT, Modifier: modKey} menu := fyne.NewMenu("Menu", item) w.SetMainMenu(fyne.NewMainMenu(menu)) w.ShowAndRun() }
2.5.3
go version go1.23.4 darwin/arm64 and go version go1.23.4 linux/amd64
macOS Sonoma and Ubuntu 24.04.1 LTS
Works on macOS, not on linux
The text was updated successfully, but these errors were encountered:
Good catch. macOS does this for us, we need to code it in for the other systems I think...
Sorry, something went wrong.
Marking for "F" release as this will be a change due to the way that it will skip canvas shortcuts if the menu activates instead...
Also relates to #2627
No branches or pull requests
Checklist
Describe the bug
My code has working menu shortcuts on MacOS, but the same shortcuts don't work on Linux (with a different modifier key)
How to reproduce
Create a simple menu item with a shortcut
Screenshots
No response
Example code
Fyne version
2.5.3
Go compiler version
go version go1.23.4 darwin/arm64 and go version go1.23.4 linux/amd64
Operating system and version
macOS Sonoma and Ubuntu 24.04.1 LTS
Additional Information
Works on macOS, not on linux
The text was updated successfully, but these errors were encountered: