Skip to content

Shortcuts in Menus#11106

Merged
LeonMatthes merged 2 commits intoslint-ui:masterfrom
LeonMatthes:lm/102-menu-shortcuts
Apr 2, 2026
Merged

Shortcuts in Menus#11106
LeonMatthes merged 2 commits intoslint-ui:masterfrom
LeonMatthes:lm/102-menu-shortcuts

Conversation

@LeonMatthes
Copy link
Copy Markdown
Member

@LeonMatthes LeonMatthes commented Mar 24, 2026

This pull request adds shortcut support in menu items that are part of the menu bar.
It does not add this yet for the context menu area, as this needs more access by the ContextMenu to handle the shortcuts.

ChangeLog: Supports shortcuts in MenuItems that are part of the MenuBar

  • If the change modifies a visible behavior, it changes the documentation accordingly
  • If possible, the change is auto-tested
  • If the changes fixes or close an existing issue, the commit message reference the issue with Fixes #xxx or Closes #xxx
  • If the change is noteworthy, the commit message should contain ChangeLog: ...

@LeonMatthes LeonMatthes force-pushed the lm/102-menu-shortcuts branch 2 times, most recently from 47cedb7 to e72fce1 Compare March 27, 2026 10:30
@LeonMatthes LeonMatthes force-pushed the lm/102-menu-shortcuts branch 4 times, most recently from a8257b0 to 8c7d4dc Compare April 1, 2026 13:49
@LeonMatthes LeonMatthes marked this pull request as ready for review April 1, 2026 14:26
@LeonMatthes LeonMatthes requested review from ogoffart and tronical April 1, 2026 14:29
Comment thread docs/astro/src/content/docs/reference/window/contextmenuarea.mdx Outdated
Comment thread docs/astro/src/content/docs/reference/window/contextmenuarea.mdx Outdated
Comment thread docs/astro/src/content/docs/reference/window/contextmenuarea.mdx Outdated
@LeonMatthes LeonMatthes force-pushed the lm/102-menu-shortcuts branch 2 times, most recently from 3f49006 to 84d1d15 Compare April 1, 2026 16:16
@LeonMatthes LeonMatthes requested a review from tronical April 1, 2026 16:16
@LeonMatthes LeonMatthes mentioned this pull request Apr 2, 2026
5 tasks
@LeonMatthes LeonMatthes force-pushed the lm/102-menu-shortcuts branch from 84d1d15 to 2154e98 Compare April 2, 2026 08:56
@LeonMatthes LeonMatthes enabled auto-merge (rebase) April 2, 2026 08:56
Comment thread examples/gallery/gallery.slint Outdated
Comment thread internal/backends/winit/Cargo.toml Outdated
Comment thread internal/core/input.rs Outdated
Comment thread internal/core/input.rs Outdated
Comment thread internal/core/window.rs
Comment thread docs/astro/src/content/docs/reference/window/contextmenuarea.mdx
Currently this is only supported on MenuItems that are placed
in a MenuBar, not in ContextMenuArea.
From prior testing we have found that e.g. this shortcut:

```slint
@keys(Control + Equals)
```

Would be translated by macOS to: 󰘳* on a German keyboard layout, which
doesn't make sense based on the definition in Slint.

We want to keep consistency between platforms. Slint-native shortcut localization is
on our roadmap anyhow.
@LeonMatthes LeonMatthes force-pushed the lm/102-menu-shortcuts branch from 2154e98 to 90229ec Compare April 2, 2026 12:33
@LeonMatthes LeonMatthes merged commit aecb57d into slint-ui:master Apr 2, 2026
46 checks passed
@tronical
Copy link
Copy Markdown
Member

tronical commented Apr 2, 2026

This PR relates to #102

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants