mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 13:30:15 -07:00
Disable enhanced soft input if hardware keyboard is present
This commit is contained in:
parent
65a64402eb
commit
d340b1d6a8
3 changed files with 18 additions and 8 deletions
|
|
@ -1066,7 +1066,7 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
public static void sendKeyPress(int keyCode, int modifiers, boolean status) {
|
||||
sendKeyPress(keyCode, 0, modifiers, status);
|
||||
}
|
||||
|
||||
|
||||
public static void sendKeyPress(int keyCode, int scancode, int modifiers, boolean status) {
|
||||
sendKeyPress(keyCode, '\u0000', scancode, modifiers, status);
|
||||
}
|
||||
|
|
@ -1078,9 +1078,9 @@ public class BaseMainActivity extends LoggableActivity {
|
|||
public void sendKeyPress(char keyChar) {
|
||||
try {
|
||||
int keyCode = KeyEvent.class.getField("KEYCODE_" + Character.toUpperCase(keyChar)).getInt(null);
|
||||
sendKeyPress(keyCode, keyChar, 0, CallbackBridge.getCurrentMods(), true);
|
||||
sendKeyPress(keyCode, keyChar, 0, CallbackBridge.getCurrentMods(), false);
|
||||
}catch(Exception e) {
|
||||
sendKeyPress(AndroidLWJGLKeycode.androidToLwjglMap.get(keyCode), keyChar, 0, CallbackBridge.getCurrentMods(), true);
|
||||
sendKeyPress(AndroidLWJGLKeycode.androidToLwjglMap.get(keyCode), keyChar, 0, CallbackBridge.getCurrentMods(), false);
|
||||
} catch (IllegalAccessException | NoSuchFieldException e) {
|
||||
sendKeyPress(0, keyChar, 0, CallbackBridge.getCurrentMods(), true);
|
||||
sendKeyPress(0, keyChar, 0, CallbackBridge.getCurrentMods(), false);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue