xkbcommon

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	XKB_MOD_NAME_SHIFT = (*C.char)(unsafe.Pointer(&[]byte("Shift\x00")[0]))
	XKB_MOD_NAME_CTRL  = (*C.char)(unsafe.Pointer(&[]byte("Control\x00")[0]))
	XKB_MOD_NAME_ALT   = (*C.char)(unsafe.Pointer(&[]byte("Mod1\x00")[0]))
)

Functions

func KeySymToVirtualKey

func KeySymToVirtualKey(sym KeySym) events.VirtualKey

Types

type KeyCode

type KeyCode = C.xkb_keycode_t

type KeySym

type KeySym = C.xkb_keysym_t

type LayoutIndex

type LayoutIndex = C.xkb_layout_index_t

type ModMask

type ModMask = C.xkb_mod_mask_t

type XcbConnection

type XcbConnection = C.xcb_connection_t

type Xkb

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

func New

func New() (xkb *Xkb, err error)

func NewFromXcb

func NewFromXcb(conn *XcbConnection) (xkb *Xkb, deviceId int32, firstEvent uint8, err error)

func (*Xkb) Destroy

func (xkb *Xkb) Destroy()

func (*Xkb) GetOneSym

func (xkb *Xkb) GetOneSym(key KeyCode) C.xkb_keysym_t

func (*Xkb) GetUtf8

func (xkb *Xkb) GetUtf8(key KeyCode, sym KeySym) string

func (*Xkb) KeyRepeats

func (xkb *Xkb) KeyRepeats(key KeyCode) bool

func (*Xkb) KeymapFromBuffer

func (xkb *Xkb) KeymapFromBuffer(buf []byte) error

func (*Xkb) ModIsAlt

func (xkb *Xkb) ModIsAlt() bool

func (*Xkb) ModIsCtrl

func (xkb *Xkb) ModIsCtrl() bool
func (xkb *Xkb) ModIsLogo() bool

func (*Xkb) ModIsShift

func (xkb *Xkb) ModIsShift() bool

func (*Xkb) UpdateKeymap

func (xkb *Xkb) UpdateKeymap(conn *XcbConnection, deviceID int32) error

func (*Xkb) UpdateMask

func (xkb *Xkb) UpdateMask(
	depressed_mods ModMask,
	latched_mods ModMask,
	locked_mods ModMask,
	depressed_layout LayoutIndex,
	latched_layout LayoutIndex,
	locked_layout LayoutIndex,
) bool

Jump to

Keyboard shortcuts

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