Menu

#537 Keyboard access to contextual menu items

3.0
closed-fixed
5
2013-05-13
2009-06-04
No

Contextual menus currently require a mouse right-click to be triggered.

For accessibility purposes (and in cases where mouse navigation is not required) it would be nice to have keyboard access to the triggering.

For ex: spellchecking a word requires a right-click but the cursor could be the pointer and keyboard access could trigger the spellchecking contextual menu for further selection with the keyboard.

Related

Feature Requests: #1059
Feature Requests: #1415

Discussion

  • Didier Briel

    Didier Briel - 2010-10-21

    See also
    - Context menu key functioning
    http://sourceforge.net/support/tracker.php?aid=3080963

    Is there a "menu" key on Mac keyboards?

    Didier

     
  • Didier Briel

    Didier Briel - 2010-10-21
    • summary: keyboard access to contextual menu items --> Keyboard access to contextual menu items
     
  • Didier Briel

    Didier Briel - 2010-10-21

    Which one would you recommend to be used as a "menu key"?

    Didier

     
  • Jean-Christophe Helary

    We currently have two locations where contextual menus are used: the editor and the match window. In both contexts, ESC does not do anything special. So maybe ESC could be used to trigger/dismiss the menus in the Editor and Shift+ESC in the match window ?
    Caps Locks could be an option, but on the little (standard) keyboards it is too close to the Alt/Option key and that could be a problem.
    Right-Command could be an option too.

    Otherwise there is a Fn button that triggers the Functions assigned to the Fn buttons at the top of the keyboard.

     
  • Didier Briel

    Didier Briel - 2010-10-21

    We need the same key in any location where a right click might be used (not only the current situations, but also future ones), not a different key for each case.

    Didier

     
  • Jean-Christophe Helary

    I am just listing the potential candidates.
    Esc
    Caps Locks
    Right-Command
    Fn

    I think Esc is the best but since the key is not supposed to be pressed in combination with any other key, I suppose we can use any one modifier key.

     
  • Anonymous

    Anonymous - 2011-03-19

    Esc is a good choice, the position of the mouse pointer alone could determine what it does.

     
  • Didier Briel

    Didier Briel - 2011-03-20

    Using Esc seems ambiguous to me.

    If you're inside a dialog, how can OmegaT guess whether you want to close the dialog or activate the contextual menu?

    Didier

     
  • Kos Ivantsov

    Kos Ivantsov - 2012-09-13

    Shift + F10 could be a good key combo, it's used in many other programs to bring up a context menu

     
  • Kos Ivantsov

    Kos Ivantsov - 2013-01-02

    I came across this page http://alvinalexander.com/blog/post/jfc-swing/getting-caret-position-in-text-document where the guy tries to do the same thing in his java program. I don't know if it's of any help here, but it seemed relevant to me so I decided to share.
    His bits of code say:

    void edit_PopupMenuMenuItem_actionPerformed(ActionEvent e)
    {
    // i know that "show" is deprecated, but i could not get this to work
    // any other way
    Point point = jEditorPane.getCaret().getMagicCaretPosition();
    jPopupMenu1.show( jEditorPane,
    (int)point.getX(),
    (int)point.getY());
    jPopupMenu1.requestFocus();
    jPopupMenu1.grabFocus();
    }

    If it helps to get the request implemented, then Ho-ray, if not, then well, I did what I could with my limited knowledge.

     
  • Aaron Madlon-Kay

    JC and I discussed this and came up with Shift+Esc for Mac. This will work everywhere (Shift+Esc will not accidentally close dialogs) and follows from the use of Esc to trigger the autocompleter (consistent with OS X-native functionality).

    I've implemented this for the editor window, but not for anywhere else. I assume there is nothing to be done for Windows as there is a dedicated key; does Linux need any special treatment?

     
  • Kos Ivantsov

    Kos Ivantsov - 2013-04-29

    I guess, most Linux computers are Windows-compatible, so usually there is a dedicated Menu key.
    Could one assign a different key to this action, and if so, what's the entry in MainMenuShortcuts.properties?

     
  • Didier Briel

    Didier Briel - 2013-04-29
    • assigned_to: Aaron Madlon-Kay
    • Group: --> 2.6
     
  • Didier Briel

    Didier Briel - 2013-04-29

    "I've implemented this for the editor window, but not for anywhere else. I assume there is nothing to be done for Windows as there is a dedicated key; "

    There is a dedicated key under Windows, but it does not activate the right-click popup (and allow to use it with the keyboard), which is what we are missing in the first place.

    So yes, there is something to implement.

    Didier

     
  • Didier Briel

    Didier Briel - 2013-04-29
    • Group: 2.6 --> 3.0
     
  • Aaron Madlon-Kay

    There is a dedicated key under Windows, but it does not activate the right-click popup

    You're right; I don't know why I thought it already worked with the Context Menu key on Windows.

    I just committed support for the Context Menu key in the editor. It's not limited to a platform, so if you happen to have a Windows keyboard on a Mac it will still work (Shift+Esc is limited to Mac).

     
  • Aaron Madlon-Kay

    How much do people care about this issue outside the editor area? If there's not much interest in e.g. dialog boxes then I will leave this be for the meantime.

     
  • Jean-Christophe Helary

    It seems to me the only function that is available only in a contextual menu outside the editor is the "go to source" in the Match window. But instead of implementing a way to access that through a contextual menu, I'm suggesting that we get access to this function directly from the application menu instead...

     
  • Kos Ivantsov

    Kos Ivantsov - 2013-04-30

    If this one http://sourceforge.net/p/omegat/feature-requests/821/ gets implemented, it would be important to have Menu key working in other areas of the editor pane, not only in the input are

     
  • Didier Briel

    Didier Briel - 2013-04-30

    How much do people care about this issue outside the editor area? If there's not much interest in e.g. dialog boxes then I will leave this be for the meantime.

    Leave this be for the time being.

    Didier

     
  • Didier Briel

    Didier Briel - 2013-04-30
    • status: open --> open-fixed
     
  • Didier Briel

    Didier Briel - 2013-05-13
    • status: open-fixed --> closed-fixed
     
  • Didier Briel

    Didier Briel - 2013-05-13

    Implemented in the released version 3.0.1.

    Didier

     

Log in to post a comment.

MongoDB Logo MongoDB