implement dispatchKeyEvent callback

This commit is contained in:
Julian Winkler
2024-11-30 17:46:43 +01:00
committed by Mis012
parent fe7790c4ff
commit 036b5510d3
6 changed files with 77 additions and 1 deletions

View File

@@ -1737,6 +1737,8 @@ public class KeyEvent extends InputEvent {
private long mEventTime;
private String mCharacters;
int unicodeValue; // set from native code using gdk_keyval_to_unicode
public interface Callback {
/**
* Called when a key down event has occurred. If you return true,
@@ -2984,7 +2986,8 @@ public class KeyEvent extends InputEvent {
* @return The associated character or combining accent, or 0 if none.
*/
public int getUnicodeChar(int metaState) {
return getKeyCharacterMap().get(mKeyCode, metaState);
// return getKeyCharacterMap().get(mKeyCode, metaState);
return unicodeValue;
}
/**