hid

package
v0.0.0-...-5f91306 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2016 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Int8Min  = -128
	Int8Max  = 127
	Int32Min = -2147483648
	Int32Max = 2147483647
)
View Source
const (
	UNKNOWN = iota
	MOD
	FUNC
)

Variables

This section is empty.

Functions

func Convert

func Convert(v string) (int, int)

Types

type DeviceError

type DeviceError struct {
	// contains filtered or unexported fields
}

func (*DeviceError) Error

func (de *DeviceError) Error() string

type DeviceEventCtrl

type DeviceEventCtrl byte
const (
	DEVEVCBQUIT DeviceEventCtrl = iota
)

type Keyboard

type Keyboard struct {
	// contains filtered or unexported fields
}

Keyboard HID Report structure [

0xA1, # This is an input report at first byte field
0x02, # Usage report(exclusive for bt) = Keyboard
# Bit array for Modifier keys (D7 being the first element, D0 being last)
[
	0,   # Right GUI - (usually the Windows key)
	0,   # Right ALT
	0,   # Right Shift
	0,   # Right Control
	0,   # Left GUI - (again, usually the Windows key)
	0,   # Left ALT
	0,   # Left Shift
	0    # Left Control
],
0x00, # Vendor reserved
0x00, # Rest is space for 6 keys
0x00,
0x00,
0x00,
0x00,
0x00

]

func NewKeyboard

func NewKeyboard(path string, sintr *bluetooth.Bluetooth) (*Keyboard, error)

func (*Keyboard) StopProcess

func (k *Keyboard) StopProcess()

type Mouse

type Mouse struct {
	// contains filtered or unexported fields
}

Mouse HID Report structure [

0xA1, # This is an input report at first byte field
0x01, # Usage report(exclusive for bt) = Mouse
# Bit array for Modifier keys (D7 being the first element, D0 being last)
[
	0,   // Not Used
	0,   // Not Used
	0,   // Not Used
	0,   // Not Used
	0,   // Not Used
	0,   // Button Left
	0,   // Button Middle
	0    // Button Right
],
0x00, // X relative
0x00, // Y relative
0x00  // Wheel relative

]

func NewMouse

func NewMouse(path string, sintr *bluetooth.Bluetooth) (*Mouse, error)

func (*Mouse) StopProcess

func (m *Mouse) StopProcess()

Jump to

Keyboard shortcuts

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