这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@jathoms
Copy link

@jathoms jathoms commented Sep 27, 2025

This allows users to access the Windows-specific dwExtraInfo field that comes in with each event when using the crate compiled for Windows.

This changes the public API of the Event struct by adding a conditionally field pub extra_info: u32 on Windows targets.

Cross-platform considerations

  • On macOS, there is a partial analogue (kCGEventSourceUserData). Could be integrated if more cross-platform support is needed.

  • On X11/Wayland, I did not find a clear parallel after surveying XInput2 and Wayland protocols. Input welcome if there’s a known equivalent.

I considered adding some kind of all-platform user_data field (Option<u32>) that is None on non-Windows, but decided against it to avoid implying consistent support across all platforms where it doesn’t exist.

update grab to use new eventtype

make extra_info field windows-only
@jathoms jathoms changed the title add dwExtraInfo to Event struct in windows implementation add dwExtraInfo to Event struct in Windows implementation Sep 27, 2025
@jathoms jathoms changed the title add dwExtraInfo to Event struct in Windows implementation Add dwExtraInfo to Event struct in Windows implementation Sep 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant