mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-07-27 10:00:11 +08:00
fix: support SDL keyboard auto-repeat
This commit is contained in:
@@ -220,10 +220,8 @@ int GuiApplication::ProcessKeyboardEvent(const SDL_Event &event) {
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (event.type == SDL_EVENT_KEY_DOWN && event.key.repeat) {
|
// SDL represents key auto-repeat as additional key-down events. Forward
|
||||||
return 0;
|
// them so the fallback path has the same long-press behavior as native hooks.
|
||||||
}
|
|
||||||
|
|
||||||
const int key_code = TranslateSdlKeyboardEventToVk(event.key);
|
const int key_code = TranslateSdlKeyboardEventToVk(event.key);
|
||||||
if (key_code < 0) {
|
if (key_code < 0) {
|
||||||
return 0;
|
return 0;
|
||||||
@@ -412,4 +410,4 @@ int GuiApplication::ProcessMouseEvent(const SDL_Event &event) {
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
} // namespace crossdesk
|
} // namespace crossdesk
|
||||||
|
|||||||
Reference in New Issue
Block a user