mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:57:59 +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.onReturnPressed: { _onEnterPressed(); }
|
||||||
Keys.onEnterPressed: { _onEnterPressed(); }
|
Keys.onEnterPressed: { _onEnterPressed(); }
|
||||||
|
Keys.onLeftPressed: { moveLeft(); }
|
||||||
|
Keys.onRightPressed: { moveRight(); }
|
||||||
|
|
||||||
|
function moveLeft(){
|
||||||
|
if (cursorPosition > 0){
|
||||||
|
cursorPosition--
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function moveRight(){
|
||||||
|
if (cursorPosition < text.length){
|
||||||
|
cursorPosition++
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Text {
|
Text {
|
||||||
|
|
Loading…
Reference in a new issue