mirror of
https://github.com/processing/processing4.git
synced 2026-02-04 06:09:17 +01:00
Emulate keyTyped for OpenGL sketches
This commit is contained in:
@@ -927,6 +927,19 @@ public class PSurfaceJOGL implements PSurface {
|
||||
keyCode);
|
||||
|
||||
sketch.postEvent(ke);
|
||||
|
||||
if (!isPCodedKey(code) && !isHackyKey(code)) {
|
||||
if (peAction == KeyEvent.PRESS) {
|
||||
// Create key typed event
|
||||
// TODO: combine dead keys with the following key
|
||||
KeyEvent tke = new KeyEvent(nativeEvent, nativeEvent.getWhen(),
|
||||
KeyEvent.TYPE, peModifiers,
|
||||
keyChar,
|
||||
0);
|
||||
|
||||
sketch.postEvent(tke);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static boolean isPCodedKey(short code) {
|
||||
|
||||
Reference in New Issue
Block a user