cmds

package
v0.0.0-...-2dd5c5f Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: LGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Binding

type Binding struct {
	Alt    bool
	Ctrl   bool
	Shift  bool
	Win    bool
	Key    string
	Action string
}

Binding defines a key binding along with an action

type Command

type Command func()

Command is the basic interface for all actions executable by a hotkey

type Commander

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

Commander creates bindings for hotkeys to functions

func (*Commander) Apply

func (commander *Commander) Apply(config *Config, activeConfig actions.ActiveConfig)

Apply will apply the current configuration and its hotkey bindings deleting the previous ones

func (*Commander) Bind

func (commander *Commander) Bind(vkey int32, alt bool, ctrl bool, shift bool, win bool, command Command) bool

Bind will attach a command to a hotkey

func (*Commander) HandleHotkey

func (commander *Commander) HandleHotkey(msg *winapi.Message)

HandleHotkey must be called during handling of the WM_HOTKEY event

func (*Commander) NewCommander

func (commander *Commander) NewCommander()

NewCommander creates a new initialized element

type Config

type Config struct {
	Grids    []actions.Grid
	Bindings []Binding
}

Config defines the configuration information for moving and sizing the windows via hotkey

func LoadConfig

func LoadConfig(fileName string) (*Config, error)

LoadConfig will load a configuration from file

Jump to

Keyboard shortcuts

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