MCPcopy Create free account
hub / github.com/cogentcore/core / getRune

Method getRune

system/driver/android/GoNativeActivity.java:172–185  ·  view source on GitHub ↗
(int deviceId, int keyCode, int metaState)

Source from the content-addressed store, hash-verified

170 }
171
172 static int getRune(int deviceId, int keyCode, int metaState) {
173 try {
174 int rune = KeyCharacterMap.load(deviceId).get(keyCode, metaState);
175 if (rune == 0) {
176 return -1;
177 }
178 return rune;
179 } catch (KeyCharacterMap.UnavailableException e) {
180 return -1;
181 } catch (Exception e) {
182 Log.e("Go", "exception reading KeyCharacterMap", e);
183 return -1;
184 }
185 }
186
187 private void load() {
188 // Interestingly, NativeActivity uses a different method

Callers

nothing calls this directly

Calls 2

getMethod · 0.80
loadMethod · 0.80

Tested by

no test coverage detected