(long window, int key, int scancode, int action, int mods)
| 246 | @Override |
| 247 | public void key(long window, int key, int scancode, int action, int mods) { |
| 248 | |
| 249 | // we occasionally get a spurious 'a' (scancode 0) on command-tabbing to our application. If it's just a plain 'a' let's assume that the character callback will handle it |
| 250 | //if (scancode == 0 && mods == 0) return; |
| 251 | |
| 252 | Runnable r = () -> { |
| 253 | checkClassLoader(); |
| 254 | GlfwCallback a = adaptors.get(window); |
| 255 | if (a != null) |
| 256 | a.key(window, key, scancode, action, mods); |
| 257 | }; |
| 258 | |
| 259 | if (checkThread()) r.run(); |
| 260 | else { |
| 261 | events.addLast(r); |
| 262 | RunLoop.main.shouldSleep.add(Windows.this); |
| 263 | RunLoop.main.interrupt(); |
| 264 | } |
| 265 | } |
| 266 | |
| 267 | @Override |
| 268 | public void character(long window, int character) { |
| 269 | // System.out.println("::Char "+character); |
| 270 | Runnable r = () -> { |
| 271 | checkClassLoader(); |
| 272 | GlfwCallback a = adaptors.get(window); |
| 273 | if (a != null) |
| 274 | a.character(window, character); |
| 275 | }; |
nothing calls this directly
no test coverage detected