diff --git a/app/src/main/java/helium314/keyboard/event/Event.kt b/app/src/main/java/helium314/keyboard/event/Event.kt index c7e532a2..75fda053 100644 --- a/app/src/main/java/helium314/keyboard/event/Event.kt +++ b/app/src/main/java/helium314/keyboard/event/Event.kt @@ -146,13 +146,19 @@ class Event private constructor( } // This creates an input event for a dead character. @see {@link #FLAG_DEAD} - @JvmStatic - fun createDeadEvent(codePoint: Int, keyCode: Int, metaState: Int, next: Event?): Event { // TODO: add an argument or something if we ever create a software layout with dead keys. + fun createDeadEvent(codePoint: Int, keyCode: Int, metaState: Int, next: Event?): Event { return Event(EVENT_TYPE_INPUT_KEYPRESS, null, codePoint, keyCode, metaState, Constants.EXTERNAL_KEYBOARD_COORDINATE, Constants.EXTERNAL_KEYBOARD_COORDINATE, null, FLAG_DEAD, next) } + // This creates an input event for a dead character. @see {@link #FLAG_DEAD} + @JvmStatic + fun createSoftwareDeadEvent(codePoint: Int, keyCode: Int, metaState: Int, x: Int, y: Int, next: Event?): Event { + return Event(EVENT_TYPE_INPUT_KEYPRESS, null, codePoint, keyCode, metaState, x, y, + null, FLAG_DEAD, next) + } + /** * Create an input event with nothing but a code point. This is the most basic possible input * event; it contains no information on many things the IME requires to function correctly,