Fix for #975 sticky keys.

Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
Armored Dragon 2024-05-22 20:55:31 -05:00
parent 86f8e29096
commit 0bc11e8da4
No known key found for this signature in database
GPG key ID: C7207ACC3382AD8B

View file

@ -33,6 +33,19 @@ Rectangle {
Keys.onReturnPressed: { _onEnterPressed(); }
Keys.onEnterPressed: { _onEnterPressed(); }
Keys.onLeftPressed: { moveLeft(); }
Keys.onRightPressed: { moveRight(); }
function moveLeft(){
if (cursorPosition > 0){
cursorPosition--
}
}
function moveRight(){
if (cursorPosition < text.length){
cursorPosition++
}
}
}
Text {