|
|
|
Re: Keyboard controlling a scout application [message #1143779 is a reply to message #1064472] |
Fri, 18 October 2013 12:20 |
Matthias Nick Messages: 197 Registered: August 2013 |
Senior Member |
|
|
Hi Urs,
thank you very much for your question, I think this is a very interesting topic and will be useful to many other developers as well. I will try to answer some of your questions, If you think I am not correct or see a better way to solve the problems, please correct me.
Quote:
Menus
It seems that adding an ampersand (&) to the menu texts does not make the following letter act as a shortcut to open the menu together with the alt key (I'm talking windows here
Instead it seems that Alt plus the first letter of the menu text puts the focus on the menu bar, repeatedly pressing the same letter switches between main menu entries with the same letter. Pressing the down arrow opens the menu and then pressing the first letter of a submenu entry either executes that entry (if it is the only one starting with that letter) or again switches between entries with the same starting letter.
While this works, it is counter intuitive to most other applications.
--> What do I need to do in order for scout to (a) user and (b) show keyboard short cuts on menus and submenus? Especially shortcut letters that are not the first letter of a menu?
You are absolutely right here, thank you for the catch! It seems that the mnemonics in SWT are broken. I also tried the mnemonics in Swing, and there they are working. Nevertheless I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=419831. When this bug has been resolved the navigation, as described by you, should work.
Quote:
Navigating between views
I seem to be unable to navigate from one view to another using the keyboard? Is there I default keybinding to do this that I am unaware of? If not, how can I set this up?
Alternatively (or additionally): How do I assign a key binding with which I can set the focus to a certain view?
I think there is no such functionality in Scout. However I can think of Eclipse's shortcut for switching views "Alt+Shift+Q". Would a functionality like this solve your problem?
Quote:
FormField short cuts
Is there a way to define shortcuts to jump to certain form fields? In other applications I've done this using the ampersand (&) in the label name which shows the corresponding letter underlined, pressing ALT plus that letter will set the focus to that field.
Using the ampersand in the name of a field does show the underline (though only after pressing ALT once) but using that letter does not seem to have any effect. How do I change this?
I have tried the mnemonic (&) in SWT with textfields and checkboxes. They work on checkboxes but not on textfields. This should be improved in future version of Scout, thanks for that catch. Alternatively you could define a keystroke in the MainBox and then request the focus of the field:
@Order(10.0)
public class MyKeyStroke extends AbstractKeyStroke {
@Override
protected String getConfiguredKeyStroke() {
return "F3";
}
@Override
protected void execAction() throws ProcessingException {
getXYField().requestFocus();
}
}
Quote:
follow-up question: In the outline tree, when I move to another entry in the tree, the corresponding page is shown, stealing the focus from the outline tree. This makes it impossible to move through the outline tree using the keyboard. Is there any way to fix this?
Again, you are absolutely right, selecting a node in the tree should not steal the focus. I also tried this with our Swing functionality, and there it works as expected. Nevertheless I opened bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=419813 for this. Once the bug has been fixed, keyboard navigation should be possible within the tree.
Quote:
follow-up question: I have one page that contains a form directly in a view. If I place the cursor into a FormField of that form, using ALT+<letter> no longer works to access the main menu. Can this be changed somehow?
I agree again. I think once https://bugs.eclipse.org/bugs/show_bug.cgi?id=419831 has been fixed, this problem will disappear as well.
I hope my answers will help you.
Greetings from Munich,
Matthias
|
|
|
|
Powered by
FUDForum. Page generated in 0.04638 seconds