keybinds: fix repeat and long press keybinds release (#11863)

This commit is contained in:
rfresh2 2025-10-06 12:10:56 -07:00 committed by GitHub
parent 17e77e0407
commit 73f06434a4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 477 additions and 19 deletions

View file

@ -757,7 +757,7 @@ SDispatchResult CKeybindManager::handleKeybinds(const uint32_t modmask, const SP
continue;
}
if (k->longPress) {
if (pressed && k->longPress) {
const auto PACTIVEKEEB = g_pSeatManager->m_keyboard.lock();
m_longPressTimer->updateTimeout(std::chrono::milliseconds(PACTIVEKEEB->m_repeatDelay));
@ -796,7 +796,7 @@ SDispatchResult CKeybindManager::handleKeybinds(const uint32_t modmask, const SP
}
}
if (k->repeat) {
if (pressed && k->repeat) {
const auto KEEB = keyboard ? keyboard : g_pSeatManager->m_keyboard.lock();
m_repeatKeyRate = KEEB->m_repeatRate;