mirror of
https://github.com/Ryujinx/SDL.git
synced 2025-03-24 02:25:15 +00:00
Commit KEYCODE_SPACE as text input on Android
This commit is contained in:
parent
b7e45f8a1a
commit
8f17b20388
|
@ -1439,7 +1439,7 @@ class DummyEdit extends View implements View.OnKeyListener {
|
||||||
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
public boolean onKey(View v, int keyCode, KeyEvent event) {
|
||||||
|
|
||||||
// This handles the hardware keyboard input
|
// This handles the hardware keyboard input
|
||||||
if (event.isPrintingKey()) {
|
if (event.isPrintingKey() || keyCode == KeyEvent.KEYCODE_SPACE) {
|
||||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||||
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
ic.commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||||
}
|
}
|
||||||
|
@ -1502,7 +1502,7 @@ class SDLInputConnection extends BaseInputConnection {
|
||||||
*/
|
*/
|
||||||
int keyCode = event.getKeyCode();
|
int keyCode = event.getKeyCode();
|
||||||
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
if (event.getAction() == KeyEvent.ACTION_DOWN) {
|
||||||
if (event.isPrintingKey()) {
|
if (event.isPrintingKey() || keyCode == KeyEvent.KEYCODE_SPACE) {
|
||||||
commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
commitText(String.valueOf((char) event.getUnicodeChar()), 1);
|
||||||
}
|
}
|
||||||
SDLActivity.onNativeKeyDown(keyCode);
|
SDLActivity.onNativeKeyDown(keyCode);
|
||||||
|
|
Loading…
Reference in a new issue