MCPcopy Create free account
hub / github.com/GarageGames/Torque2D / androidKeyboardEvent

Function androidKeyboardEvent

engine/source/platformAndroid/T2DActivity.cpp:337–352  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

335
336
337void androidKeyboardEvent(int keyval, bool make) {
338
339 S32 keyCode = convertAndroidToWindowsKeyCode(keyval);
340
341 InputEvent event;
342 event.deviceInst = 0;
343 event.deviceType = KeyboardDeviceType;
344 event.objType = SI_KEY;
345 event.objInst = keyCode;
346 event.action = make ? SI_MAKE : SI_BREAK;
347 event.modifier = 0;
348 event.ascii = keyCode;
349 event.fValues[0] = make ? 1.0f : 0.0f;
350
351 Game->postEvent(event);
352}
353
354void displayKeyboard(bool pShow) {
355 // Attaches the current thread to the JVM.

Callers 1

engine_handle_inputFunction · 0.85

Calls 2

postEventMethod · 0.45

Tested by

no test coverage detected