windowsinput

package
v2.18.0-beta.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 22, 2026 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Overview

Package windowsinput drives virtual keyboard input on Windows. The input engine works in raw evdev keycodes, so this package translates them to the AT scancode set 1 values SendInput expects.

Index

Constants

This section is empty.

Variables

View Source
var ErrDriverMissing = errors.New("the ViGEmBus driver is not installed")

ErrDriverMissing reports that the ViGEmBus driver is not installed. That is the expected state on a machine that has never asked for gamepad support, so it has to reach the user as a clear message rather than a silent success.

View Source
var ErrUnknownButton = errors.New("gamepad button is not supported on windows")

ErrUnknownButton is returned for a button code with no XUSB equivalent.

Functions

func Scancode

func Scancode(code int) (scancode uint16, extended, ok bool)

Scancode returns the AT set 1 scancode for an evdev keycode, whether it needs the extended prefix, and whether the key is known at all.

Linux assigned its keycodes 1-83 to match the scancodes the AT keyboard already sent, so that range needs no translation; F11 and F12 kept the same trick at 87 and 88. Everything else was added later and has to be looked up.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL