From 0bc11e8da44428206ffbc57259145f6899f4f34a Mon Sep 17 00:00:00 2001 From: Armored Dragon Date: Wed, 22 May 2024 20:55:31 -0500 Subject: [PATCH] Fix for #975 sticky keys. Signed-off-by: Armored Dragon --- .../armored-chat/armored_chat_quick_message.qml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/scripts/communityScripts/armored-chat/armored_chat_quick_message.qml b/scripts/communityScripts/armored-chat/armored_chat_quick_message.qml index a3b897083d..ae110db379 100644 --- a/scripts/communityScripts/armored-chat/armored_chat_quick_message.qml +++ b/scripts/communityScripts/armored-chat/armored_chat_quick_message.qml @@ -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 {