Skip to content
Open
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
2 changes: 1 addition & 1 deletion prompt_toolkit/key_binding/bindings/completion.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,9 +179,9 @@ def _create_more_session(message: str = "--MORE--") -> "PromptSession":

bindings = KeyBindings()

@bindings.add(" ")
@bindings.add("y")
@bindings.add("Y")
@bindings.add(Keys.Space)
@bindings.add(Keys.ControlJ)
@bindings.add(Keys.ControlM)
@bindings.add(Keys.ControlI) # Tab.
Expand Down
1 change: 1 addition & 0 deletions prompt_toolkit/keys.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ class Keys(str, Enum):

Escape = "escape" # Also Control-[
ShiftEscape = "s-escape"
Space = " "

ControlAt = "c-@" # Also Control-Space.

Expand Down
4 changes: 2 additions & 2 deletions prompt_toolkit/widgets/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -422,8 +422,8 @@ def _get_key_bindings(self) -> KeyBindings:
" Key bindings for the Button. "
kb = KeyBindings()

@kb.add(" ")
@kb.add("enter")
@kb.add(Keys.Space)
def _(event: E) -> None:
if self.handler is not None:
self.handler()
Expand Down Expand Up @@ -692,7 +692,7 @@ def _pagedown(event: E) -> None:
)

@kb.add("enter")
@kb.add(" ")
@kb.add(Keys.Space)
def _click(event: E) -> None:
self._handle_enter()

Expand Down