From 6522f0e438a8c56a8f3cce2095b193ea6e3f5016 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Gir=C3=A3o=20Serr=C3=A3o?= <5621605+rodrigogiraoserrao@users.noreply.github.com> Date: Mon, 15 Jul 2024 19:47:56 +0200 Subject: [PATCH] gh-121746: Bind Alt+Enter to "accept" in the REPL (GH-121754) --- Lib/_pyrepl/reader.py | 2 +- Misc/ACKS | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/_pyrepl/reader.py b/Lib/_pyrepl/reader.py index b2da038906939b..8b282a382d374f 100644 --- a/Lib/_pyrepl/reader.py +++ b/Lib/_pyrepl/reader.py @@ -130,7 +130,7 @@ def make_default_commands() -> dict[CommandName, type[Command]]: (r"\M-7", "digit-arg"), (r"\M-8", "digit-arg"), (r"\M-9", "digit-arg"), - # (r'\M-\n', 'insert-nl'), + (r"\M-\n", "accept"), ("\\\\", "self-insert"), (r"\x1b[200~", "enable_bracketed_paste"), (r"\x1b[201~", "disable_bracketed_paste"), diff --git a/Misc/ACKS b/Misc/ACKS index 53258dbfd9f478..6008f9e1770d1d 100644 --- a/Misc/ACKS +++ b/Misc/ACKS @@ -1670,6 +1670,7 @@ Fred Sells Jiwon Seo Iñigo Serna Joakim Sernbrant +Rodrigo Girão Serrão Roger D. Serwy Jerry Seutter Pete Sevander