Repository navigation
API Mouse and keyboard
Alexandre 'kidev' Poumaroux edited this page Oct 21, 2026
·
4 revisions
| Import | from proleak import input |
Mouse and keyboard hooks. Handlers observe; they cannot block the game's own input.
| Returns | Function | |
|---|---|---|
Callable |
click(fn: Handler | None = None, button: int = 0) |
Call fn(ev) on mouse clicks (button: 0 left, 1 right). |
Handler |
hover(fn: Handler) |
Call fn(ev) when the cursor moves onto a unit (ev.unit). |
Callable |
key(name: str, fn: Handler | None = None, shift: bool = False, ctrl: bool = False, alt: bool = False) |
Call fn(ev) when key name (a Unity KeyCode name such as "F" or "F5") is pressed with exactly these modifiers. |
click(fn: Handler | None = None, button: int = 0) -> Callable
Call fn(ev) on mouse clicks (button: 0 left, 1 right). ev has screen and
world positions and ev.unit, a Unit (None when no unit is under the
cursor).
hover(fn: Handler) -> Handler
Call fn(ev) when the cursor moves onto a unit (ev.unit).
key(name: str, fn: Handler | None = None, shift: bool = False, ctrl: bool = False, alt: bool = False) -> Callable
Call fn(ev) when key name (a Unity KeyCode name such as "F" or "F5") is pressed
with exactly these modifiers.
Using ProLeak
Features
Tutorial
- Your first plugin
- Plugin basics
- Handling events
- Plugin settings
- User interface
- Players, units and game data
- Purchases, signals and pings
- Chat, camera, input and more
- Cosmetics
- Game modes
- Game updates
- Publishing plugins
Reference