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 280238 Details for
Bug 552041
[mac] KeyDown event has wrong keyCode for non-english layouts
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Test class
file_552041.txt (text/plain), 1.17 KB, created by
Hugo Almeida
on 2019-10-11 10:57:32 EDT
(
hide
)
Description:
Test class
Filename:
MIME Type:
Creator:
Hugo Almeida
Created:
2019-10-11 10:57:32 EDT
Size:
1.17 KB
patch
obsolete
>import org.eclipse.swt.SWT; >import org.eclipse.swt.events.KeyAdapter; >import org.eclipse.swt.events.KeyEvent; >import org.eclipse.swt.layout.GridLayout; >import org.eclipse.swt.widgets.Display; >import org.eclipse.swt.widgets.Shell; >import org.eclipse.swt.widgets.Text; > >public class SWTKeyEvent { > public static void main(String[] args) { > Display display = new Display(); > Shell shell = new Shell(display); > shell.setText("KeyListener Example"); > > shell.setLayout(new GridLayout()); > > Text text = new Text(shell, SWT.CENTER); > > text.setText("Type here"); > > text.addKeyListener(new KeyAdapter() { > public void keyPressed(KeyEvent e) { > System.out.println("------------------------"); > System.out.println("character: " + e.character); > System.out.println("keyCode: " + e.keyCode); > System.out.println("stateMask: " + e.stateMask); > } > }); > > shell.open(); > > while (!shell.isDisposed()) { > if (!display.readAndDispatch()) > display.sleep(); > } > display.dispose(); > } > >}
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 552041
: 280238