Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 8 additions & 13 deletions keys.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,18 @@ import (

// GlobalKeyMap defines the keybindings available in all panels.
type GlobalKeyMap struct {
Help key.Binding
Quit key.Binding
ThrowError key.Binding
MockFetch key.Binding
ToggleLeftPanel key.Binding
OpenModal key.Binding
CloseRightPanel key.Binding
ToggleFullscreen key.Binding
Help key.Binding
Quit key.Binding
ThrowError key.Binding
MockFetch key.Binding
ToggleLeftPanel key.Binding
OpenModal key.Binding
CloseRightPanel key.Binding
}

// CommonKeys are the keybindings shown in every panel's help.
var CommonKeys = []key.Binding{
GlobalKeys(false).ToggleLeftPanel, GlobalKeys(false).OpenModal, GlobalKeys(false).CloseRightPanel, GlobalKeys(false).ToggleFullscreen, GlobalKeys(false).Help, GlobalKeys(false).Quit,
GlobalKeys(false).ToggleLeftPanel, GlobalKeys(false).OpenModal, GlobalKeys(false).CloseRightPanel, GlobalKeys(false).Help, GlobalKeys(false).Quit,
}

// DevKeys are additional keybindings shown in dev mode.
Expand Down Expand Up @@ -66,10 +65,6 @@ func GlobalKeys(devMode bool) GlobalKeyMap {
key.WithKeys("esc"),
key.WithHelp("esc", "close panel"),
),
ToggleFullscreen: key.NewBinding(
key.WithKeys("f"),
key.WithHelp("f", "fullscreen"),
),
}

if devMode {
Expand Down
6 changes: 0 additions & 6 deletions shell/update.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,6 @@ func (m Model) handleGlobalKeys(msg tea.KeyPressMsg) (Model, tea.Cmd, bool) {
cmds := m.pushSizeToPanels()
return m, tea.Batch(cmds...), true

case m.isRightOpen && match(gk.ToggleFullscreen):
m.isRightFullscreen = !m.isRightFullscreen
m.recomputeLayout()
cmds := m.pushSizeToPanels()
return m, tea.Batch(cmds...), true

case match(gk.ToggleLeftPanel):
m.isLeftOpen = !m.isLeftOpen
if m.isRightOpen {
Expand Down
4 changes: 2 additions & 2 deletions table/table.go
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ func DefaultKeyMap() KeyMap {
key.WithHelp("b/pgup", "page up"),
),
PageDown: key.NewBinding(
key.WithKeys("f", "pgdown", spacebar),
key.WithHelp("f/pgdn", "page down"),
key.WithKeys("pgdown", spacebar),
key.WithHelp("pgdn", "page down"),
),
HalfPageUp: key.NewBinding(
key.WithKeys("u", "ctrl+u"),
Expand Down
Loading