mouse

Mouse interactions in nim

Pure Nim score 15/100 · tests present · no docs generated

Summary

Latest Version Unknown
License MPL-2.0
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:25

Installation

nimble install mouse
choosenim install mouse
git clone https://github.com/hiikion/mouse

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
mouse - - - - - - -

Source

Repository https://github.com/hiikion/mouse
Homepage https://github.com/hiikion/mouse
Registry Source nimble_official

README

mouse

This library allows you to programmatically control the mouse.

nimble install mouse

Suported platforms

Platform Support Implementation
Windows full WINAPI
Linux full X11
Macos none none

Docs

procs

click

click(button: MouseButton)

Clicks the given mouse button.

press

press(button: MouseButton)

Presses the given mouse button.

release

release(button: MouseButton)

Releases the given mouse button.

move

move(x, y: int, `type` = Relative)

Moves the mouse pointer to the location given in x y.

Relative moves the mouse relative to the current mouse position.

For exmaple calling move(0, 100) will move the pointer 100 pixels up.

Absolute moves the mouse to absolute coordinates on the screen.

So calling move(0, 100, Absolute) will move the pointer to the pixel in the position (0, 100).

smoothMove

smoothMove(x: int, y: int,
    smoothingStep: float = 0.005,
    sleep = 3,
    `type` = Absolute
)

Moves the mouse pointer in a smooth human like way, to the location given in x y.

scroll

scroll(amount: int, direction: ScrollDirection)

Scrolls the mouse wheel the amount of notches in the given direction.

getPos

getPos(): Point

Gets the pointer position on the screen.

types

MouseButton = enum
    Left, Right, Middle

PositionKind = enum
    Relative, Absolute

ScrollDirection = enum
    Up, Down

Point = tuple
    x: int
    y: int