Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 5999 Details for
Bug 42225
Can't assign command to Ctrl+Backspace
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
convertEventToAccelerator.java
convertEventToAccelerator.java (text/plain), 1.28 KB, created by
Chris McLaren
on 2003-09-05 09:05:20 EDT
(
hide
)
Description:
convertEventToAccelerator.java
Filename:
MIME Type:
Creator:
Chris McLaren
Created:
2003-09-05 09:05:20 EDT
Size:
1.28 KB
patch
obsolete
> public static int convertEventToAccelerator(Event event) { > int key = event.character; > > if (key == 0) > key = event.keyCode; > else { > // Lower range characters might mean that the character is an escape > if (0 <= key && key <= 0x1F) { > if ((event.stateMask & SWT.CTRL) != 0 && event.keyCode != event.character) { > /* On Windows XP, "Ctrl+Return" is represented as character > * 0x0A and key code 0x0D. On Linux-GTK, "Ctrl+Return" is > * represented as character 0x0D and key code 0x0D. > */ > if ((key == 0x0A) && (event.keyCode != 0x00)) { > key = event.keyCode; > } else { > /* Shift the Ctrl-escaped character from the lower range > * into the character range. > */ > key += 0x40; > } > } > > } else if ('a' <= key && key <= 'z') { > // Shift lowercase letters to uppercase letters. > key -= 'a' - 'A'; > > } else if (((event.stateMask & SWT.CTRL) != 0) && (key == 0x7F)) { > /* On Windows XP, "Ctrl+Backspace" is represented as character > * 0x7F and key code 0x08. On Linux-GTK, "Ctrl+Backspace" is > * is represented as character 0x08 and key code 0x08. > */ > key = event.keyCode; > > } > } > > int modifiers = event.stateMask & SWT.MODIFIER_MASK; > return modifiers + key; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 42225
:
5996
| 5999 |
6089