From 7b54e65057cf317aa845f620d3a88fb326203746 Mon Sep 17 00:00:00 2001 From: Fabian Vogt Date: Sat, 16 Sep 2023 14:05:38 +0200 Subject: [PATCH] Ignore key autorepeat for cursor keys as well --- qtkeypadbridge.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/qtkeypadbridge.cpp b/qtkeypadbridge.cpp index 76b811d6..091a0808 100644 --- a/qtkeypadbridge.cpp +++ b/qtkeypadbridge.cpp @@ -156,10 +156,6 @@ void keyToKeypad(QKeyEvent *event) ,{Qt::Key_Return, keymap::enter} }; - // Ignore autorepeat, calc os must handle it on it's own - if (event->isAutoRepeat()) - return; - // Determine virtual key that correspond to the key we got auto vkey = event->nativeVirtualKey(); @@ -209,6 +205,10 @@ void keyToKeypad(QKeyEvent *event) void QtKeypadBridge::keyPressEvent(QKeyEvent *event) { + // Ignore autorepeat, calc os must handle it on its own + if(event->isAutoRepeat()) + return; + Qt::Key key = static_cast(event->key()); switch(key) @@ -244,6 +244,10 @@ void QtKeypadBridge::keyPressEvent(QKeyEvent *event) void QtKeypadBridge::keyReleaseEvent(QKeyEvent *event) { + // Ignore autorepeat, calc os must handle it on its own + if(event->isAutoRepeat()) + return; + Qt::Key key = static_cast(event->key()); switch(key)