From 109d965bba9dca10aa86ab54e6a5320473a9e9a9 Mon Sep 17 00:00:00 2001 From: Jordan Borean Date: Tue, 2 Apr 2024 09:56:43 +1000 Subject: [PATCH] Add ctrl+enter key binding for Linux Adds the Ctrl+Enter key binding for Linux that defaults to AcceptLine. This allows PSReadLine to work by default on Linux terminals like Alacritty where a newline in a paste comes across as the Ctrl+Enter key. --- PSReadLine/KeyBindings.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/PSReadLine/KeyBindings.cs b/PSReadLine/KeyBindings.cs index 89564228d..7c8f1003a 100644 --- a/PSReadLine/KeyBindings.cs +++ b/PSReadLine/KeyBindings.cs @@ -270,6 +270,7 @@ void SetDefaultEmacsBindings() { { Keys.Backspace, MakeKeyHandler(BackwardDeleteChar, "BackwardDeleteChar") }, { Keys.Enter, MakeKeyHandler(AcceptLine, "AcceptLine") }, + { Keys.CtrlEnter, MakeKeyHandler(AcceptLine, "AcceptLine") }, { Keys.ShiftEnter, MakeKeyHandler(AddLine, "AddLine") }, { Keys.LeftArrow, MakeKeyHandler(BackwardChar, "BackwardChar") }, { Keys.RightArrow, MakeKeyHandler(ForwardChar, "ForwardChar") },