8000 GitHub - gonutz/di8: DirectInput8 wrapper for Go.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

gonutz/di8

Repository files navigation

di8 provides a way to access the Windows DirectInput8 API in Go.

Call di8.Create() to create the basic DirectInput object.

Use DirectInput.EnumDevices() to list all the mouse, keyboard and game controller devices.

Use DirectInput.CreateDevice() to create Device objects for all devices that you want to use.

To be able to query data from a Device, call Device.SetDataFormat() first, then Device.SetProperty(di8.PROP_BUFFERSIZE) and lastly Device.Acquire(). When you are done with it, call Device.Unacquire().

There are two ways to query a Device: get the current state or get events when the state changes. To get the current state, call Device.GetDeviceState. To get state change events, call Device.GetDeviceData.

Call Release() on all objects when you are done using them.

About

DirectInput8 wrapper for Go.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

0