3set: delete by letter pieces when assemblying

This commit is contained in:
minjaesong
2021-10-23 16:46:58 +09:00
parent 129061d743
commit 38462e4506
4 changed files with 68 additions and 7 deletions

View File

@@ -12,6 +12,7 @@ data class TerrarumInputMethod(
val name: String,
// (headkey, shiftin, altgrin)
val acceptChar: (Int, Boolean, Boolean) -> Pair<String, String>, // Pair<Display Char, Output Char if any>
val backspace: () -> String,
val endCompose: () -> String,
val reset: () -> Unit,
val composing: () -> Boolean
@@ -109,6 +110,8 @@ object IME {
return TerrarumInputMethod(name, { headkey, shifted, alted ->
val a = jsval.invokeMember("accept", headkey, shifted, alted)
a.getArrayElement(0).asString() to a.getArrayElement(1).asString()
}, {
jsval.invokeMember("backspace").asString()
}, {
jsval.invokeMember("end").asString()
}, {