altgr for string input

This commit is contained in:
minjaesong
2021-11-09 20:58:30 +09:00
parent d5bf27aa93
commit dc0de876d5
6 changed files with 129 additions and 108 deletions

View File

@@ -57,14 +57,21 @@ object InputStrober {
repeatCount += 1
val shiftin = keys.contains(Input.Keys.SHIFT_LEFT) || keys.contains(Input.Keys.SHIFT_RIGHT)
val altgrin = keys.contains(Input.Keys.ALT_RIGHT)
val keysym0 = keysToStr(keymap, keys)
val newKeysym0 = keysToStr(keymap, keyDiff)
val keysym = if (keysym0 == null) null
else if (shiftin && keysym0[1]?.isNotBlank() == true) keysym0[1]
else keysym0[0]
val newKeysym = if (newKeysym0 == null) null
else if (shiftin && newKeysym0[1]?.isNotBlank() == true) newKeysym0[1]
else newKeysym0[0]
val keysym =
if (keysym0 == null) null
else if (shiftin && altgrin && keysym0[3]?.isNotBlank() == true) keysym0[3]
else if (altgrin && keysym0[2]?.isNotBlank() == true) keysym0[2]
else if (shiftin && keysym0[1]?.isNotBlank() == true) keysym0[1]
else keysym0[0]
val newKeysym =
if (newKeysym0 == null) null
else if (shiftin && altgrin && newKeysym0[3]?.isNotBlank() == true) newKeysym0[3]
else if (altgrin && newKeysym0[2]?.isNotBlank() == true) newKeysym0[2]
else if (shiftin && newKeysym0[1]?.isNotBlank() == true) newKeysym0[1]
else newKeysym0[0]
val headKeyCode = if (keyDiff.size < 1) keys[0] else keyDiff[0]