[fix] fix cross-platform key capture and mapping issues

This commit is contained in:
dijunkun
2026-03-23 20:42:48 +08:00
parent 511831ced3
commit 13c37f01b1
5 changed files with 143 additions and 118 deletions

View File

@@ -734,7 +734,7 @@ int Render::StartKeyboardCapturer() {
LOG_INFO("Start keyboard capturer");
}
return 0;
return keyboard_capturer_init_ret;
}
int Render::StopKeyboardCapturer() {
@@ -1018,8 +1018,9 @@ void Render::UpdateInteractions() {
if (start_keyboard_capturer_ && focus_on_stream_window_) {
if (!keyboard_capturer_is_started_) {
StartKeyboardCapturer();
keyboard_capturer_is_started_ = true;
if (StartKeyboardCapturer() == 0) {
keyboard_capturer_is_started_ = true;
}
}
} else if (keyboard_capturer_is_started_) {
StopKeyboardCapturer();