Skip to content

Commit f81fd52

Browse files
committed
fix: spacebar keybinding is now "space" instead of a literal space
1 parent 3a53c6a commit f81fd52

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

table/table.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ func (km KeyMap) FullHelp() [][]key.Binding {
6464

6565
// DefaultKeyMap returns a default set of keybindings.
6666
func DefaultKeyMap() KeyMap {
67-
const spacebar = " "
6867
return KeyMap{
6968
LineUp: key.NewBinding(
7069
key.WithKeys("up", "k"),
@@ -79,7 +78,7 @@ func DefaultKeyMap() KeyMap {
7978
key.WithHelp("b/pgup", "page up"),
8079
),
8180
PageDown: key.NewBinding(
82-
key.WithKeys("f", "pgdown", spacebar),
81+
key.WithKeys("f", "pgdown", "space"),
8382
key.WithHelp("f/pgdn", "page down"),
8483
),
8584
HalfPageUp: key.NewBinding(

viewport/keymap.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@ package viewport
22

33
import "github.com/charmbracelet/bubbles/v2/key"
44

5-
const spacebar = " "
6-
75
// KeyMap defines the keybindings for the viewport. Note that you don't
86
// necessary need to use keybindings at all; the viewport can be controlled
97
// programmatically with methods like Model.LineDown(1). See the GoDocs for
@@ -21,7 +19,7 @@ type KeyMap struct {
2119
func DefaultKeyMap() KeyMap {
2220
return KeyMap{
2321
PageDown: key.NewBinding(
24-
key.WithKeys("pgdown", spacebar, "f"),
22+
key.WithKeys("pgdown", "space", "f"),
2523
key.WithHelp("f/pgdn", "page down"),
2624
),
2725
PageUp: key.NewBinding(

0 commit comments

Comments
 (0)