Keyboard Accelerators / Shortcuts in Context Menu

Issue #1757 resolved
created an issue

It is highly desirable that TortoiseHg context menu has keyboard accelerator / shortcuts defined for each of its commands.

Below is my take on what is desired, why, and what would be required (not much?) to add this:

Background: On Windows, accelerator keys can be defined for any text command. This shows up as an underlined letter It is automatically added by the OS by prefixing the letter with an & (this is the mechanism in Visual Studio GUI builder / Resource file listings) Example: Instead of Hg Commit, might have Hg &Commit, which would create Hg Commit, where the capital C has an underline.
* Example Result: Right click > C selects the commit option using keyboard only and does not require a mouse.

Value of Keyboard Accelerators / Shortcuts

  • The value is that one can navigate commands entirely using the keyboard without having to resort to the mouse.
  • While this may not be to everyone's taste, many developers become very familiar with keyboard accelerators / shortcuts.
  • This becomes a significant speed up on their productivity (mouse moves are much slower than keyboard presses).

Required / Desired Every context menu command should have an accelerator associated. It is OK if the accelerator conflicts with existing windows context menu accelerators -- repeated pressing of the accelerator key cycles the cursor through the commands that share the same accelerator

Implementation This is something that should (potentially) be very easy: ... wherever you have a menu command name, you simply prefix the desired accelerator key in the name with &

(Note: Just did a search -- this may elaborate on Issue 1566 submitted by Anonymous.)

Comments (8)

  1. Anonymous

    And not only in the context menus: also in the workbench would it be very useful, e.g. underline the c in the commit button. (The main menu and the file menu have keyboard accelerators defined by the way.)


  2. Aaron Rhoads

    I'm running 2.8.2 and am not seeing the menu item access keys. Eg. right-click or context-key on a repository folder in explorer. The menu item "TortoiseHg" does not have an access key (it isn't "&TortoiseHg" as expected). In contrast, "&TortoiseGit" and "&TortoiseSVN" in other projects, respectively, have access keys.

  3. Aaron Rhoads

    I'll grant that a good experience in VisualStudio is more important that in Explorer, but you have all the other keyboard support in the submenu so well done (compared to the other projects) yet accessing the root menu item requires multiple arrow clicks. Surely it wouldn't be hard to add & to a single menu item.

  4. Log in to comment