mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 03:24:06 +09:00
altgr for string input
This commit is contained in:
@@ -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]
|
||||
|
||||
|
||||
Reference in New Issue
Block a user