keyboardlayout

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type KeyDefinition

type KeyDefinition struct {
	Code                   string
	Key                    string
	KeyCode                int64
	KeyCodeWithoutLocation int64
	ShiftKey               string
	ShiftKeyCode           int64
	Text                   string
	Location               int64
}

type KeyInput

type KeyInput string

type KeyboardLayout

type KeyboardLayout struct {
	ValidKeys map[KeyInput]bool
	Keys      map[KeyInput]KeyDefinition
}

func GetKeyboardLayout

func GetKeyboardLayout(name string) KeyboardLayout

GetKeyboardLayout returns the keyboard layout registered with name.

func (KeyboardLayout) KeyDefinition added in v0.1.2

func (kl KeyboardLayout) KeyDefinition(key KeyInput) (KeyDefinition, bool)

KeyDefinition returns true with the key definition of a given key input. It returns false and an empty key definition if it cannot find the key.

func (KeyboardLayout) ShiftKeyDefinition added in v0.1.2

func (kl KeyboardLayout) ShiftKeyDefinition(key KeyInput) KeyDefinition

ShiftKeyDefinition returns shift key definition of a given key input. It returns an empty key definition if it cannot find the key.

Jump to

Keyboard shortcuts

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