Skip to content

Commit

Permalink
Commit KEYCODE_SPACE as text input on Android
Browse files Browse the repository at this point in the history
  • Loading branch information
tlgkccampbell committed Jul 4, 2016
1 parent b7e45f8 commit 8f17b20
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions android-project/src/org/libsdl/app/SDLActivity.java
Expand Up @@ -1439,7 +1439,7 @@ public boolean onCheckIsTextEditor() {
public boolean onKey(View v, int keyCode, KeyEvent event) {

// This handles the hardware keyboard input
if (event.isPrintingKey()) {
if (event.isPrintingKey() || keyCode == KeyEvent.KEYCODE_SPACE) {
if (event.getAction() == KeyEvent.ACTION_DOWN) {
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
}
Expand Down Expand Up @@ -1502,7 +1502,7 @@ public boolean sendKeyEvent(KeyEvent event) {
*/
int keyCode = event.getKeyCode();
if (event.getAction() == KeyEvent.ACTION_DOWN) {
if (event.isPrintingKey()) {
if (event.isPrintingKey() || keyCode == KeyEvent.KEYCODE_SPACE) {
commitText(String.valueOf((char) event.getUnicodeChar()), 1);
}
SDLActivity.onNativeKeyDown(keyCode);
Expand Down

0 comments on commit 8f17b20

Please sign in to comment.