Skip to content

Current mnemonics in Main.sublime-menu do not seem to work and will trigger warnings #3

@aafulei

Description

@aafulei

Hi Nick!

Your current Main.sublime-menu is

[
    {
        "caption": "File",
        "mnemonic": "f",
        "id": "file",
        "children":
        [
            {
                "caption": "Save Copy As...",
                "mnemonic": "k",
                "command": "save_copy_as"
            }
        ]
    }
]

These mnemonics do not seem to work, and will trigger loads of warnings in the Sublime console (View --> Show Console)

warning: mnemonic f not found in menu caption File
warning: mnemonic k not found in menu caption Save Copy As...

The mechanism for a Sublime Text main menu mnemonic is that (for Windows only) the main menu will take a letter from the caption (case-sensitive) and underscore it and use the letter as a shortcut to be triggered by alt.

That is, you can only choose from letters S a v e C o p y A s as your mnemonic for the command save_copy_as.

And there is no need to assign a mnemonic or even a caption to File. It's already there. You don't want to override it.

I would like to suggest the change below for Main.sublime-menu

[
    {
        "id": "file",
        "children":
        [
            {
                "caption": "Save Copy As...",
                "mnemonic": "p",
                "command": "save_copy_as"
            }
        ]
    }
]

The exact choice of the letter is up to you, of course.

For your reference, my Sublime Text version is the latest Sublime Text 3, or 3.2.2 (build 3211).

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions