Rvanlaak
3 Jun 2009, 1:08 AM
I would like to implement multi-key keyboard shortcuts in my application. After searching on the forum, i haven't found anything usefull.
The listeners needs to be implemented on a viewport or on the rootpanel. The code downbelow doesn't work.
new KeyNav( v ) {
@Override
public void onKeyPress(ComponentEvent ce) {
if ( KeyCodes.KEY_CTRL == ce.getKeyCode() )
{
Info.display("Key Press", "CTRL pressed");
}
}
};
What are the best practices for implementing keyboard shortcuts?
The listeners needs to be implemented on a viewport or on the rootpanel. The code downbelow doesn't work.
new KeyNav( v ) {
@Override
public void onKeyPress(ComponentEvent ce) {
if ( KeyCodes.KEY_CTRL == ce.getKeyCode() )
{
Info.display("Key Press", "CTRL pressed");
}
}
};
What are the best practices for implementing keyboard shortcuts?