Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Command ¶
type Command struct { // The program to execute Program string `mapstructure:"program"` // any arguments for the program. Args []string `mapstructure:"args"` }
Describes the command that will execute when a key is pressed
type Config ¶
type Config struct { // The screen name. Not currently used Screen string `mapstructure:"screen"` // The array of keys. Keys []Key `mapstructure:"keys"` }
The overall structure for the config file.
type Key ¶
type Key struct { // the type of key. Values can be // - Single // - Chord // - Mode Type KeyType `mapstructure:"type"` // The key to be pressed. Check xenv to get the correct key names Key string `mapstructure:"key"` // The modifiers for the key values can be // - super // - control // - shift Modifiers []string `mapstructure:"modifiers"` // The command that will be updated. Command Command `mapstructure:"command"` // a message that can be displayed using goxhkd-status Message string `mapstructure:"message"` // an array of keys that add chording capabilities Chords []Key `mapstructure:"chords"` // if true the command will be run when the key is released OnRelease bool `mapstructure:"onrelease"` // Will force an exit from the current mode. ExitMode bool `mapstructure:"exitmode"` // Translated for quick lookups. Not used for the configuration. TranslatedChords map[keydefinitions.KeyDefinitionKey]Key `mapstructure:"-"` }
The configuration of a key.
type KeyType ¶ added in v0.0.4
type KeyType int
Indicates if the key definition is a chord, mode, or single
func (*KeyType) UnmarshalText ¶ added in v0.0.4
UnmarshalJSON custom implementation This is called by viper to convert the key type
Click to show internal directories.
Click to hide internal directories.