mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-15 07:39:00 -04:00
- Fix keyboard not working in mc 1.13+
- Fix bad handling of KEY_MULTIPLE cases.
This commit is contained in:
parent
a89b77c138
commit
292571c00e
@ -50,7 +50,9 @@ public class TouchCharInput extends androidx.appcompat.widget.AppCompatEditText
|
|||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
for(int i=lengthBefore, index=lengthBefore+start; i < lengthAfter; ++i){
|
for(int i=lengthBefore, index=lengthBefore+start; i < lengthAfter; ++i){
|
||||||
CallbackBridge.sendChar(text.charAt(index));
|
//I didn't know F25 existed before that. I just need a full fat keycode for mc 1.13+
|
||||||
|
CallbackBridge.sendKeycode(LWJGLGLFWKeycode.GLFW_KEY_F25, text.charAt(index), 0, 0, true);
|
||||||
|
index ++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -80,15 +80,6 @@ public class CallbackBridge {
|
|||||||
// sendData(JRE_TYPE_KEYCODE_CONTROL, keycode, Character.toString(keychar), Boolean.toString(isDown), modifiers);
|
// sendData(JRE_TYPE_KEYCODE_CONTROL, keycode, Character.toString(keychar), Boolean.toString(isDown), modifiers);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Send only the char to the input bridge
|
|
||||||
* Intended for chat functions, or anything that only requires writing text
|
|
||||||
* @param keychar the char to send
|
|
||||||
*/
|
|
||||||
public static void sendChar(char keychar){
|
|
||||||
nativeSendChar(keychar);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void sendMouseKeycode(int button, int modifiers, boolean isDown) {
|
public static void sendMouseKeycode(int button, int modifiers, boolean isDown) {
|
||||||
DEBUG_STRING.append("MouseKey=").append(button).append(", down=").append(isDown).append("\n");
|
DEBUG_STRING.append("MouseKey=").append(button).append(", down=").append(isDown).append("\n");
|
||||||
// if (isGrabbing()) DEBUG_STRING.append("MouseGrabStrace: " + android.util.Log.getStackTraceString(new Throwable()) + "\n");
|
// if (isGrabbing()) DEBUG_STRING.append("MouseGrabStrace: " + android.util.Log.getStackTraceString(new Throwable()) + "\n");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user