diff options
author | Sven Gothel <[email protected]> | 2012-04-16 21:09:16 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2012-04-16 21:09:16 +0200 |
commit | 2f0583aad39f93a934629c21beac66a758373249 (patch) | |
tree | b23dab93bd3a01ebf298d94624de3247a8b114f5 /make/stub_includes | |
parent | c4597b3a80f9fcbf89640bb007bc9004c361b6c7 (diff) |
NEWT/Android: Add (soft) keyboard input. Complete the Android -> NEWT key translation. Minor fixes for mouse as well.
- AndroidNewtEventFactory
- Android -> NEWT KeyCodes, leave out control keys like HOME, BACK, .. TBD ..
- We don't consume the key event, in case we cannot map it,
so the Android OS has a chance to handle the control keys.
- Key-Release generates a Key Typed event.
- Key/Mouse translate Android time-base (upTime) to Unix.
- AndroidWindow
- set our onKeyListener, using above tranlator
- setFocusable(true) and setFocusableInTouchMode(true) on our SurfaceView,
otherwise no key event will be delivered.
Note: 'requestFocus()' must also be called on the view for key input!
- Test: NEWTGearsES2Activity, which launches the soft key via:
InputMethodManager mgr = (InputMethodManager) win.getAndroidView().getContext().getSystemService(Context.INPUT_METHOD_SERVICE);
mgr.toggleSoftInput(InputMethodManager.SHOW_FORCED, 0); // shows keyboard ..
and requests the focus of the view for input.
Diffstat (limited to 'make/stub_includes')
0 files changed, 0 insertions, 0 deletions