Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultKeyMap = KeyMap{ Up: key.NewBinding( key.WithKeys("up", "alt+OA", "ctrl+p"), key.WithHelp("↑ ", "scroll up "), ), Down: key.NewBinding( key.WithKeys("down", "alt+OB", "ctrl+n"), key.WithHelp("↓ ", "scroll down "), ), PageUp: key.NewBinding( key.WithKeys("pgup"), key.WithHelp("pgup", "page up "), ), PageDown: key.NewBinding( key.WithKeys("pgdown"), key.WithHelp("pgdn", "page down "), ), SelectEntry: key.NewBinding( key.WithKeys("enter"), key.WithHelp("enter", "select an entry "), ), SelectEntryAndChangeDir: key.NewBinding( key.WithKeys("ctrl+x"), key.WithHelp("ctrl+x", "select an entry and cd into that directory"), ), Left: key.NewBinding( key.WithKeys("left"), key.WithHelp("← ", "move left "), ), Right: key.NewBinding( key.WithKeys("right"), key.WithHelp("→ ", "move right "), ), TableLeft: key.NewBinding( key.WithKeys("shift+left"), key.WithHelp("shift+← ", "scroll the table left "), ), TableRight: key.NewBinding( key.WithKeys("shift+right"), key.WithHelp("shift+→ ", "scroll the table right "), ), DeleteEntry: key.NewBinding( key.WithKeys("ctrl+k"), key.WithHelp("ctrl+k", "delete the highlighted entry "), ), Help: key.NewBinding( key.WithKeys("ctrl+h"), key.WithHelp("ctrl+h", "help "), ), Quit: key.NewBinding( key.WithKeys("esc", "ctrl+c", "ctrl+d"), key.WithHelp("esc", "exit hiSHtory "), ), JumpStartOfInput: key.NewBinding( key.WithKeys("ctrl+a"), key.WithHelp("ctrl+a", "jump to the start of the input "), ), JumpEndOfInput: key.NewBinding( key.WithKeys("ctrl+e"), key.WithHelp("ctrl+e", "jump to the end of the input "), ), WordLeft: key.NewBinding( key.WithKeys("ctrl+left"), key.WithHelp("ctrl+left", "jump left one word "), ), WordRight: key.NewBinding( key.WithKeys("ctrl+right"), key.WithHelp("ctrl+right", "jump right one word "), ), }
Functions ¶
This section is empty.
Types ¶
type KeyMap ¶
type KeyMap struct { Up key.Binding Down key.Binding PageUp key.Binding PageDown key.Binding SelectEntry key.Binding SelectEntryAndChangeDir key.Binding Left key.Binding Right key.Binding TableLeft key.Binding TableRight key.Binding DeleteEntry key.Binding Help key.Binding Quit key.Binding JumpStartOfInput key.Binding JumpEndOfInput key.Binding WordLeft key.Binding WordRight key.Binding }
func (KeyMap) ToSerializable ¶
func (k KeyMap) ToSerializable() SerializableKeyMap
type SerializableKeyMap ¶
type SerializableKeyMap struct { Up []string Down []string PageUp []string PageDown []string SelectEntry []string SelectEntryAndChangeDir []string Left []string Right []string TableLeft []string TableRight []string DeleteEntry []string Help []string Quit []string JumpStartOfInput []string JumpEndOfInput []string WordLeft []string WordRight []string }
func (SerializableKeyMap) ToKeyMap ¶
func (s SerializableKeyMap) ToKeyMap() KeyMap
func (SerializableKeyMap) WithDefaults ¶
func (s SerializableKeyMap) WithDefaults() SerializableKeyMap
Click to show internal directories.
Click to hide internal directories.