| Summary: | Need SWT to provide an API to allow F10 to be overridden | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Raji Akella <raji> | ||||||
| Component: | SWT | Assignee: | Silenio Quarti <Silenio_Quarti> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | enhancement | ||||||||
| Priority: | P3 | CC: | eclipse.felipe, Mike_Wilson, mukund, pwebster, remy.suen, Silenio_Quarti, sujithjob | ||||||
| Version: | 4.0 | ||||||||
| Target Milestone: | 3.7 M2 | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| See Also: | https://bugs.eclipse.org/bugs/show_bug.cgi?id=309286 | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
|
Description
Raji Akella
Please see https://bugs.eclipse.org/bugs/show_bug.cgi?id=309286#c8 We believe there is no bug here. I am to bind F10 to content assist in 3.6 for example. Closing bug as INVALID. With items under the File menu, I no longer get *any* key events. PW I added the following to the snippet:
Menu file = new Menu(item);
item.setMenu(file);
new MenuItem(file, SWT.PUSH).setText("One");
new MenuItem(file, SWT.PUSH).setText("Two");
new MenuItem(file, SWT.PUSH).setText("Three");
My tests run on linux.
PW
Okay, I have some code in Linux that allows us to process the event before the OS. But in the Mac I'm afraid the same can't be done. The OS has a default keybinding for F10. The only way (AFAIK) for an application to see a key down is: System-Preferences->Keyboard->Keyboard shortcuts->Expose & Spaces Reassign the keybinding of "Application windows" from F10 to something else. You can do the same on Linux, not sure if there is a nice UI to do so, but you can reassign the shortcut for the menubar using the command line: gconftool-2 --type string --set '/desktop/gnome/interface/menubar_accel' 'F11' (Instead of 'F11' you can pass use an empty string to remove the shortcut) After doing this, the application will start to receive F10 key down events. Created attachment 178142 [details]
patch for Linux
note: i have already released all the required native methods
Created attachment 178199 [details]
patch for gtk
Patch for GTK released. Nothing to do for Cocoa (user has to change the property in the System preferences, otherwise the system consumes the key before it gets to SWT). Works on windows. closing as fixed. |