Skip to main content

Module input

Module input 

Source
Expand description

Global input hooks — raw keyboard and mouse events captured system-wide, regardless of which window is focused.

This is the foundation for “keyboard driver / mouse driver” scenarios (e.g. a Logitech G-Hub-style remapper): rdesktop owns the low-level hook and forwards every event to a GlobalInputHandler, where application code can observe, transform, or suppress it.

  • Windows: SetWindowsHookExW with WH_KEYBOARD_LL + WH_MOUSE_LL on a dedicated message-pump thread.
  • macOS: a CGEventTap on kCGHIDEventTap (see input_mac).

Structs§

GlobalInput
Platform-independent manager for global input hooks.

Enums§

GlobalInputEvent
A single global input event.
KeyState
Pressed / released state for a key or mouse button.
MouseButton
Mouse buttons reported by the low-level hook.

Traits§

GlobalInputHandler
Callback invoked for every global input event.