diff options
Diffstat (limited to 'internal/tui/keys.go')
-rw-r--r-- | internal/tui/keys.go | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/internal/tui/keys.go b/internal/tui/keys.go index c2f2271..3a7242d 100644 --- a/internal/tui/keys.go +++ b/internal/tui/keys.go @@ -164,6 +164,16 @@ var Bindings map[KeyBindingScope]map[string]KeyBinding = map[KeyBindingScope]map Description: func(AppModel) string { return "Filter" }, Result: func(*AppModel) tea.Cmd { return createHistoryFilterModal() }, }, + "g": KeyBinding{ + Key: "g", + Description: func(AppModel) string { return "Top" }, + Result: func(*AppModel) tea.Cmd { return changeSelectionToTop() }, + }, + "G": KeyBinding{ + Key: "G", + Description: func(AppModel) string { return "Bottom" }, + Result: func(*AppModel) tea.Cmd { return changeSelectionToBottom() }, + }, }, ScopeHistoryBoxDetails: { "j": KeyBinding{ @@ -214,6 +224,16 @@ var Bindings map[KeyBindingScope]map[string]KeyBinding = map[KeyBindingScope]map Result: func(*AppModel) tea.Cmd { return backToHistorySummary() }, Hide: true, }, + "g": KeyBinding{ + Key: "g", + Description: func(AppModel) string { return "Top" }, + Result: func(*AppModel) tea.Cmd { return changeSelectionToTop() }, + }, + "G": KeyBinding{ + Key: "G", + Description: func(AppModel) string { return "Bottom" }, + Result: func(*AppModel) tea.Cmd { return changeSelectionToBottom() }, + }, }, ScopeModal: { "enter": KeyBinding{ @@ -231,6 +251,23 @@ var Bindings map[KeyBindingScope]map[string]KeyBinding = map[KeyBindingScope]map Description: func(AppModel) string { return "Close" }, Result: func(*AppModel) tea.Cmd { return closeModal() }, }, + "ctrl+n": KeyBinding{ + Key: "Ctrl+n", + Description: func(m AppModel) string { + if m.modalBox.form.fields[m.modalBox.form.selIdx].suggestions == noSuggestions { + return "" + } else { + return "Accept Suggestion" + } + }, + Result: func(m *AppModel) tea.Cmd { + field := &m.modalBox.form.fields[m.modalBox.form.selIdx] + sugg := field.CurrentSuggestion() + field.SetValue(sugg) + field.CursorEnd() + return nil + }, + }, }, } |