Correct way to create hotkeys [message #871219] |
Fri, 11 May 2012 09:27  |
Patrick Bänziger Messages: 19 Registered: September 2011 |
Junior Member |
|
|
Hello everyone.
I stumbled across this problem:
In a form that uses templates, I have a date field that I wish to be able to change with hotkeys - similar to the Up/Down keys already present when the field has focus.
But: It should work also when the component is not selected.
So I tried to add this:
@Order(15.0)
public class CTRL_H_Keystroke extends AbstractKeyStroke {
@Override
protected String getConfiguredKeyStroke() {
return "f7";
}
@Override
protected void execAction() throws ProcessingException {
getDateField().setValue(DateUtility.getSysdate());
}
}
I actually wanted to give it the key CTRL-H, but that did not work.
So I used F7 which can't be really misspelled 
I tried to add this to the group box in which the field resides in, I tried to add it into the MainBox of the form, nothing.
Where should this be put to make it work? The wiki does not contain a lot about keystrokes.
TIA, Patrick
[Updated on: Fri, 11 May 2012 09:28] Report message to a moderator
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01873 seconds