mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 07:12:51 +02:00
Fix for #975 sticky keys.
Signed-off-by: Armored Dragon <publicmail@armoreddragon.com>
This commit is contained in:
parent
86f8e29096
commit
0bc11e8da4
1 changed files with 13 additions and 0 deletions
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue