Patch submission: support for Shift+Return keycode
From a42168e86d35f0127e3ed0831f457ab6aee356cf Mon Sep 17 00:00:00 2001
From: Sebastian Koenig <sekoenig.de@googlemail.com>
Date: Thu, 15 Sep 2022 10:53:29 -0400
Subject: [PATCH] keymap: Send code for Shift+Return
This is useful to trigger actions based on that combination, which is
commonly used in notebook-style applications to evaluate command.
The specific code has been chosen to match what KDE (Konsole) already
does.
---
src/keymap.cc | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/keymap.cc b/src/keymap.cc
index 00fad07a6..0404082dd 100644
--- a/src/keymap.cc
+++ b/src/keymap.cc
@@ -109,6 +109,8 @@ static const struct _vte_keymap_entry _vte_keymap_GDK_Tab[] = {
};
static const struct _vte_keymap_entry _vte_keymap_GDK_Return[] = {
+ /* Shift+Return */
+ {cursor_all, keypad_all, GDK_SHIFT_MASK, _VTE_CAP_CSI "\r", -1},
{cursor_all, keypad_all, VTE_ALT_MASK, _VTE_CAP_ESC "\r", 2},
{cursor_all, keypad_all, 0, "\r", 1},
{cursor_all, keypad_all, 0, X_NULL, 0},
@@ -724,7 +726,7 @@ _vte_keymap_map(guint keyval,
g_return_if_fail(normal != NULL);
g_return_if_fail(normal_length != NULL);
- _VTE_DEBUG_IF(VTE_DEBUG_KEYBOARD)
+ _VTE_DEBUG_IF(VTE_DEBUG_KEYBOARD)
_vte_keysym_print(keyval, modifiers);
/* Start from scratch. */
--
GitLab
Edited by Sebastian Koenig