Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343248 - Provide API to activate key bindings in RWT
Summary: Provide API to activate key bindings in RWT
Status: RESOLVED FIXED
Alias: None
Product: RAP
Classification: RT
Component: RWT (show other bugs)
Version: 1.4   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: 1.4 M7   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-19 05:16 EDT by Ralf Sternberg CLA
Modified: 2011-04-25 07:34 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Sternberg CLA 2011-04-19 05:16:10 EDT
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", ... } );
Comment 1 Ralf Sternberg CLA 2011-04-25 07:34:44 EDT
Introduced public constant RWT.ACTIVE_KEYS, removed transitional constant from DisplayUtil.
Changes are in CVS HEAD.