xkeyboard

package
v0.0.0-...-21b5dc8 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Based on https://github.com/BurntSushi/xgb/blob/master/xtest/xtest.go

Based on https://github.com/BurntSushi/xgb/blob/master/xtest/xtest.go

Index

Constants

View Source
const XkbAccessXNotify = 10
View Source
const XkbActionMessage = 9
View Source
const XkbAllEventsMask = 4095
View Source
const XkbBellNotify = 8
View Source
const XkbCompatMapNotify = 7
View Source
const XkbControlsNotify = 3
View Source
const XkbExtensionDeviceNotify = 11
View Source
const XkbGroupNamesMask = (1 << 12)
View Source
const XkbIndicatorMapNotify = 5
View Source
const XkbIndicatorStateNotify = 4
View Source
const XkbMapNotify = 1
View Source
const XkbNamesNotify = 6
View Source
const XkbNewKeyboardNotify = 0
View Source
const XkbStateNotify = 2
View Source
const XkbSymbolsNameMask = (1 << 2)

Variables

This section is empty.

Functions

func Init

func Init(c *xgb.Conn) error

func XkbEventNew

func XkbEventNew(buf []byte) xgb.Event

KeyPressEventNew constructs a KeyPressEvent value that implements xgb.Event from a byte slice.

Types

type GetNamesCookie

type GetNamesCookie struct {
	*xgb.Cookie
}

GetVersionCookie is a cookie used only for GetVersion requests.

func GetNames

func GetNames(c *xgb.Conn, which uint32) GetNamesCookie

GetVersion sends a checked request. If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()

func (GetNamesCookie) Reply

func (cook GetNamesCookie) Reply() (*GetNamesReply, error)

Reply blocks and returns the reply data for a GetNames request.

type GetNamesReply

type GetNamesReply struct {
	DeviceId     byte
	Sequence     uint16 // sequence number of the request for this reply
	Length       uint32 // number of bytes in this reply
	Which        uint32
	MinKeyCode   byte
	MaxKeyCode   byte
	NTypes       byte
	GroupNames   byte
	VirtualMods  uint16
	FirstKey     byte
	NKeys        byte
	Indicators   uint32
	NRadioGroups byte
	NKeyAliases  byte
	NKTLevels    uint16
	ValueList    uint32
}

GetNamesReply represents the data returned from a GetNames request.

type GetStateCookie

type GetStateCookie struct {
	*xgb.Cookie
}

GetStateCookie is a cookie used only for GetState requests.

func GetState

func GetState(c *xgb.Conn, deviceSpec uint16) GetStateCookie

GetState sends a checked request. If an error occurs, it will be returned with the reply by calling GetStateCookie.Reply()

func GetStateUnchecked

func GetStateUnchecked(c *xgb.Conn, deviceSpec uint16) GetStateCookie

GetStateUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (GetStateCookie) Reply

func (cook GetStateCookie) Reply() (*GetStateReply, error)

Reply blocks and returns the reply data for a GetState request.

type GetStateReply

type GetStateReply struct {
	Sequence         uint16 // sequence number of the request for this reply
	Length           uint32 // number of bytes in this reply
	Type             byte
	DeviceId         byte
	Mods             byte
	BaseMods         byte
	LatchedMods      byte
	LockedMods       byte
	Group            byte
	LockedGroup      byte
	BaseGroup        uint16
	LatchedGroup     uint16
	CompatState      byte
	GrabMods         byte
	CompatGrabMods   byte
	LookupMods       byte
	CompatLookupMods byte
	PtrBtnState      uint16
}

GetStateReply represents the data returned from a GetState request.

type GetVersionCookie

type GetVersionCookie struct {
	*xgb.Cookie
}

GetVersionCookie is a cookie used only for GetVersion requests.

func GetVersion

func GetVersion(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie

GetVersion sends a checked request. If an error occurs, it will be returned with the reply by calling GetVersionCookie.Reply()

func GetVersionUnchecked

func GetVersionUnchecked(c *xgb.Conn, MajorVersion byte, MinorVersion uint16) GetVersionCookie

GetVersionUnchecked sends an unchecked request. If an error occurs, it can only be retrieved using xgb.WaitForEvent or xgb.PollForEvent.

func (GetVersionCookie) Reply

func (cook GetVersionCookie) Reply() (*GetVersionReply, error)

Reply blocks and returns the reply data for a GetVersion request.

type GetVersionReply

type GetVersionReply struct {
	Sequence     uint16 // sequence number of the request for this reply
	Length       uint32 // number of bytes in this reply
	MajorVersion byte
	MinorVersion uint16
}

GetVersionReply represents the data returned from a GetVersion request.

type LatchLockStateCookie

type LatchLockStateCookie struct {
	*xgb.Cookie
}

func LatchLockState

func LatchLockState(c *xgb.Conn, data []byte) LatchLockStateCookie

SelectEvents selects events from X11 X11 sends no reply for this command

type SelectEventsCookie

type SelectEventsCookie struct {
	*xgb.Cookie
}

func SelectEvents

func SelectEvents(c *xgb.Conn, data []byte) SelectEventsCookie

SelectEvents selects events from X11 X11 sends no reply for this command

type XkbEvent

type XkbEvent struct {
	Sequence   uint16
	Type       byte
	Time       xproto.Timestamp
	Root       xproto.Window
	Event      xproto.Window
	Child      xproto.Window
	RootX      int16
	RootY      int16
	EventX     int16
	EventY     int16
	State      uint16
	SameScreen bool
}

func (XkbEvent) Bytes

func (v XkbEvent) Bytes() []byte

Not implemented

func (XkbEvent) SequenceId

func (v XkbEvent) SequenceId() uint16

SequenceId returns the sequence id attached to the KeyPress event. Events without a sequence number (KeymapNotify) return 0. This is mostly used internally.

func (XkbEvent) String

func (v XkbEvent) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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