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.
See also
- Context menu key functioning
http://sourceforge.net/support/tracker.php?aid=3080963
Is there a "menu" key on Mac keyboards?
Didier
No menu key. But Control/Alt/Command/Caps lock.
http://www.apple.com/keyboard/
http://store.apple.com/us/product/MB110LL/A
http://www.apple.com/jp/keyboard/
http://store.apple.com/jp/product/MB110LL/A
Which one would you recommend to be used as a "menu key"?
Didier
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.
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
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.
View and moderate all "feature-requests Discussion" comments posted by this user
Mark all as spam, and block user from posting to "Feature Requests"
Esc is a good choice, the position of the mouse pointer alone could determine what it does.
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
Shift + F10 could be a good key combo, it's used in many other programs to bring up a context menu
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.
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?
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?
"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
You're right; I don't know why I thought it already worked with the
Context Menukey on Windows.I just committed support for the
Context Menukey 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+Escis limited to Mac).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.
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...
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
Leave this be for the time being.
Didier
Implemented in the released version 3.0.1.
Didier