From 0dfa20e481edbc582caa29c608195d3a206f21d7 Mon Sep 17 00:00:00 2001
From: John Gehrig <jgehrig@users.noreply.github.com>
Date: Tue, 21 Feb 2023 21:51:46 -0500
Subject: [PATCH] Issue 999: Replace Issue 728 with key remap

Many users find the shift-space and shift-backspace behavior in terminal
frustrating. However, some users still want to map these sequences.

Applying the runtime re-map workaround, since Neovim is unable to fix
this issue upstream. Neovim still does not report `:terminal` mode.

Index: test/tst_input_common.cpp
--- test/tst_input_common.cpp.orig
+++ test/tst_input_common.cpp
@@ -15,8 +15,6 @@ private slots:
 	void CapsLockIgnored() noexcept;
 	void AltGrAloneIgnored() noexcept;
 	void AltGrKeyEventWellFormed() noexcept;
-	void ShiftSpaceWellFormed() noexcept;
-	void ShiftBackSpaceWellFormed() noexcept;
 
 	// Mouse Input
 	void MouseLeftClick() noexcept;
@@ -135,26 +133,6 @@ void TestInputCommon::CapsLockIgnored() noexcept
 
 	QKeyEvent evMetaCapsLock{ QEvent::KeyPress, Qt::Key_CapsLock, Qt::MetaModifier};
 	QCOMPARE(NeovimQt::Input::convertKey(evMetaCapsLock), QString{ "" });
-}
-
-void TestInputCommon::ShiftSpaceWellFormed() noexcept
-{
-	// Issue#728: Shift + Space inserts ;2u in `:terminal`, mode sent as <S-Space>.
-	QKeyEvent evShift{ QEvent::KeyPress, Qt::Key_Shift, Qt::ShiftModifier, "" };
-	QCOMPARE(NeovimQt::Input::convertKey(evShift), QString{ "" });
-
-	QKeyEvent evShiftSpace{ QEvent::KeyPress, Qt::Key_Space, Qt::ShiftModifier, " " };
-	QCOMPARE(NeovimQt::Input::convertKey(evShiftSpace), QString{ "<Space>" });
-}
-
-void TestInputCommon::ShiftBackSpaceWellFormed() noexcept
-{
-	// Issue#259: Shift + BackSpace inserts 7;2u in `:terminal`, mode sent as <S-BS>.
-	QKeyEvent evShift{ QEvent::KeyPress, Qt::Key_Shift, Qt::ShiftModifier, "" };
-	QCOMPARE(NeovimQt::Input::convertKey(evShift), QString{ "" });
-
-	QKeyEvent evShiftBackSpace{ QEvent::KeyPress, Qt::Key_Backspace, Qt::ShiftModifier, "\b" };
-	QCOMPARE(NeovimQt::Input::convertKey(evShiftBackSpace), QString{ "<BS>" });
 }
 
 void TestInputCommon::MouseLeftClick() noexcept
