hkd

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NameRegexStr        = `[A-Za-z\-_0-9]{1,20}`
	BoundedNameRegexStr = `^` + NameRegexStr + `$`
)

Variables

View Source
var (
	NameRegex = regexp.MustCompile(BoundedNameRegexStr)

	// aliases should be on the same line
	Keys = map[string]kbd.Code{}/* 121 elements not displayed */

)

Functions

This section is empty.

Types

type HotKey

type HotKey struct {
	Keys []kbd.Code
}

type HotKeyDaemon

type HotKeyDaemon struct {
	HotKeys HotKeys
}

func (HotKeyDaemon) Schedule

func (hkdc HotKeyDaemon) Schedule(key string) bool

Try to schedule the key for the given string, returns false if the hotkey doesn't exist or if the key press failed

func (HotKeyDaemon) Start

func (hkdc HotKeyDaemon) Start(http KeyScheduler)

type HotKeys

type HotKeys map[string]HotKey

type KeyScheduler

type KeyScheduler chan string

Jump to

Keyboard shortcuts

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