[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
@@ -24,8 +24,8 @@ class KeyboardCapturer : public DeviceController {
virtual int SendKeyboardCommand(int key_code, bool is_down);
private:
CFMachPortRef event_tap_;
CFRunLoopSourceRef run_loop_source_;
CFMachPortRef event_tap_ = nullptr;
CFRunLoopSourceRef run_loop_source_ = nullptr;
public:
bool caps_lock_flag_ = false;
@@ -36,4 +36,4 @@ class KeyboardCapturer : public DeviceController {
int fn_key_code_ = 0x3F;
};
} // namespace crossdesk
#endif
#endif