Terminal: lock/unlock keyboard

We copied QShortCutMap into Qtc to allow us tight control over which shortcuts
are "enabled" while the focus is inside a terminal, and the keyboard is "locked"
to the Terminal. Locked here means that except for a select few, all key presses
are send directly to the terminal and cannot be used to activate other actions.

Change-Id: I96cddf753033c0f4e7d806b20085bb4755853117
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
This commit is contained in:
Marcus Tillmanns
2023-06-06 09:37:13 +02:00
parent ad5e8392fe
commit 217b03c1ac
10 changed files with 711 additions and 45 deletions

View File

@@ -92,6 +92,8 @@ protected:
void setupContext(const Context &context, QWidget *widget);
void setZoomButtonsEnabled(bool enabled);
IContext *m_context = nullptr;
private:
virtual void updateFilter();
@@ -108,7 +110,6 @@ private:
QAction *m_filterActionCaseSensitive = nullptr;
QAction *m_invertFilterAction = nullptr;
Utils::FancyLineEdit *m_filterOutputLineEdit = nullptr;
IContext *m_context = nullptr;
bool m_filterRegexp = false;
bool m_invertFilter = false;
Qt::CaseSensitivity m_filterCaseSensitivity = Qt::CaseInsensitive;