Skip to content

Cross-platform menu issues (for Runebender) #1306

@raphlinus

Description

@raphlinus

I'm doing most my Runebender development on Windows, and have come across some issues related to menus. This is a tracking issue for those.

  • The Runebender source uses platform_menus::mac menus directly, without any kind of configuration check. Those use RawMods::Meta, which bind to Windows, and that doesn't work.

  • The shortcuts ("Ctrl-S") are not displayed in Windows menus. I think that was intended for a while, but I didn't quite get around to implementing them. There was churn around HotKey but I think that's stabilized reasonably well now thanks to the keyboard work.

  • The provided menus are missing alt-key shortcuts. These appear to work, by adding an ampersand in the localized string (&File, E&xit, etc), and are stripped out (at least on mac, haven't tested Linux yet).

The most expedient fix to the first problem is to switch from RawMods to SysMods::Cmd. That would result in reasonable behavior if menus for the wrong platform were used, if not the most platform-appropriate keybindings. A deeper change would be to expand the platform_menus::common choices, and more aggressively enforce the use of actual platform specific menus.

I have local patches with expedient fixes for most of this, and plan to PR them. I'm open to discussion about the right way to proceed, and of course if people want to take on more extensive rework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    discussionneeds feedback and ideasshellconcerns the shell abstraction

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions