Community
Participate
Working Groups
With bug 282449, we have implemented JFace key bindings in RAP and made the workbench extension point available. But there should also be a way to activate key bindings programmatically in plain RWT. In SWT, this can be done by adding a global listener to the display using display.addFilter( SWT.KeyDown, listener ); In RAP, we can support the same approach, but must avoid sending a request for each keystroke. Therefore, we need to inform the client which key sequences it should listen to. To allow applications code to set the list of active key sequences, we need some public API. The simple solution would be to use setData(), e.g: display.setData( RWT.ACTIVE_KEYS, new String[] { "CTRL+1", "CTRL+2", ... } );
Introduced public constant RWT.ACTIVE_KEYS, removed transitional constant from DisplayUtil. Changes are in CVS HEAD.