mirror of
https://github.com/Helium314/HeliBoard.git
synced 2025-04-19 13:49:13 +00:00
add a softwareDeadKeyEvent
to preserve coordinates, which can be useful in edge cases
This commit is contained in:
parent
b11e6604b7
commit
007f386066
1 changed files with 8 additions and 2 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Reference in a new issue