mirror of
https://github.com/SimpleMobileTools/Simple-Keyboard.git
synced 2025-06-05 21:49:26 +02:00
differentiate between permanent and 1 time caps lock
This commit is contained in:
@ -67,7 +67,7 @@ class MyKeyboard {
|
||||
protected var mDefaultVerticalGap = 0
|
||||
|
||||
/** Is the keyboard in the shifted state */
|
||||
var isShifted = false
|
||||
var shiftState = SHIFT_OFF
|
||||
|
||||
/** Key instance for the shift key, if present */
|
||||
private val mShiftKeys = arrayOf<Key?>(null, null)
|
||||
@ -562,13 +562,13 @@ class MyKeyboard {
|
||||
// also recalculate the vertical sizes/positions when we get this resize call.
|
||||
}
|
||||
|
||||
fun setShifted(shiftState: Boolean): Boolean {
|
||||
fun setShifted(shiftState: Int): Boolean {
|
||||
for (shiftKey in mShiftKeys) {
|
||||
shiftKey?.on = shiftState
|
||||
shiftKey?.on = shiftState > SHIFT_OFF
|
||||
}
|
||||
|
||||
if (isShifted != shiftState) {
|
||||
isShifted = shiftState
|
||||
if (this.shiftState != shiftState) {
|
||||
this.shiftState = shiftState
|
||||
return true
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user