Fix. macos, workaround fn (#7319)

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2024-03-05 11:31:41 +08:00 committed by GitHub
parent c0128d86f4
commit befac94473
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -424,7 +424,7 @@ struct VirtualInputState {
#[cfg(target_os = "macos")]
impl VirtualInputState {
fn new() -> Option<Self> {
VirtualInput::new(CGEventSourceStateID::Private, CGEventTapLocation::Session)
VirtualInput::new(CGEventSourceStateID::CombinedSessionState, CGEventTapLocation::Session)
.map(|virtual_input| Self {
virtual_input,
capslock_down: false,