uinput

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultLayoutRegistry = NewLayoutRegistry()

Functions

func Paste

func Paste(layout string) error

func Sleep

func Sleep()

func TypeString

func TypeString(text string, layout string) error

Types

type Dvorak

type Dvorak struct {
}

func (Dvorak) TypeKey

func (d Dvorak) TypeKey(key Key, keyboard uinput.Keyboard) error

type Key

type Key string
const (
	KeyA      Key = "a"
	KeyB      Key = "b"
	KeyC      Key = "c"
	KeyD      Key = "d"
	KeyE      Key = "e"
	KeyF      Key = "f"
	KeyG      Key = "g"
	KeyH      Key = "h"
	KeyI      Key = "i"
	KeyJ      Key = "j"
	KeyK      Key = "k"
	KeyL      Key = "l"
	KeyM      Key = "m"
	KeyN      Key = "n"
	KeyO      Key = "o"
	KeyP      Key = "p"
	KeyQ      Key = "q"
	KeyR      Key = "r"
	KeyS      Key = "s"
	KeyT      Key = "t"
	KeyU      Key = "u"
	KeyV      Key = "v"
	KeyW      Key = "w"
	KeyX      Key = "x"
	KeyY      Key = "y"
	KeyZ      Key = "z"
	KeyAUpper Key = "A"
	KeyBUpper Key = "B"
	KeyCUpper Key = "C"
	KeyDUpper Key = "D"
	KeyEUpper Key = "E"
	KeyFUpper Key = "F"
	KeyGUpper Key = "G"
	KeyHUpper Key = "H"
	KeyIUpper Key = "I"
	KeyJUpper Key = "J"
	KeyKUpper Key = "K"
	KeyLUpper Key = "L"
	KeyMUpper Key = "M"
	KeyNUpper Key = "N"
	KeyOUpper Key = "O"
	KeyPUpper Key = "P"
	KeyQUpper Key = "Q"
	KeyRUpper Key = "R"
	KeySUpper Key = "S"
	KeyTUpper Key = "T"
	KeyUUpper Key = "U"
	KeyVUpper Key = "V"
	KeyWUpper Key = "W"
	KeyXUpper Key = "X"
	KeyYUpper Key = "Y"
	KeyZUpper Key = "Z"
	Key0      Key = "0"
	Key1      Key = "1"
	Key2      Key = "2"
	Key3      Key = "3"
	Key4      Key = "4"
	Key5      Key = "5"
	Key6      Key = "6"
	Key7      Key = "7"
	Key8      Key = "8"
	Key9      Key = "9"

	KeyHyphen Key = "-"

	KeySpace           Key = " "
	KeyExclamationMark Key = "!"
	KeyAtSign          Key = "@"
	KeyHash            Key = "#"
	KeyDollar          Key = "$"
	KeyPercent         Key = "%"
	KeyCaret           Key = "^"
	KeyAmpersand       Key = "&"
	KeyAsterisk        Key = "*"

	KeyDot          Key = "."
	KeyComma        Key = ","
	KeySlash        Key = "/"
	KeyBackslash    Key = "\\"
	KeyQuestionMark Key = "?"
	KeySemicolon    Key = ";"
	KeyColon        Key = ":"
	KeyApostrophe   Key = "'"

	KeyTab Key = "\t"
)

type Layout

type Layout interface {
	TypeKey(key Key, keyboard uinput.Keyboard) error
}

type LayoutRegistry

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

func NewLayoutRegistry

func NewLayoutRegistry() *LayoutRegistry

func (*LayoutRegistry) Register

func (r *LayoutRegistry) Register(name string, layout Layout)

type Qwerty

type Qwerty struct {
}

func (Qwerty) TypeKey

func (d Qwerty) TypeKey(key Key, keyboard uinput.Keyboard) error

Jump to

Keyboard shortcuts

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