From abb60f2ea5f0aad8940c8857dd71fe2c9769ebfe Mon Sep 17 00:00:00 2001 From: Stephan Binner Date: Sun, 16 Feb 2003 23:27:46 +0000 Subject: [PATCH] Moved emitClipboard/emitSelection configuration from keytables to "Configure Shortcuts..." aka use KAction. Fix for report #53490. svn path=/trunk/kdebase/konsole/; revision=207363 --- konsole/TEWidget.cpp | 5 +++++ konsole/TEWidget.h | 1 + konsole/TEmuVt102.cpp | 2 -- konsole/default.keytab.h | 2 -- konsole/keytrans.cpp | 2 -- konsole/keytrans.h | 2 -- konsole/konsole.cpp | 4 +++- konsole/konsole.h | 1 + other/default.Keytab | 18 ++++++++---------- other/linux.keytab | 2 -- other/vt100.keytab | 2 -- other/vt420pc.keytab | 2 -- other/x11r5.keytab | 2 -- 13 files changed, 18 insertions(+), 27 deletions(-) diff --git a/konsole/TEWidget.cpp b/konsole/TEWidget.cpp index 5a81f6c4..d0075160 100644 --- a/konsole/TEWidget.cpp +++ b/konsole/TEWidget.cpp @@ -1302,6 +1302,11 @@ void TEWidget::pasteClipboard() emitSelection(false,false); } +void TEWidget::pasteSelection() +{ + emitSelection(true,false); +} + void TEWidget::onClearSelection() { emit clearSelectionSignal(); diff --git a/konsole/TEWidget.h b/konsole/TEWidget.h index 09c3e5b8..8225081e 100644 --- a/konsole/TEWidget.h +++ b/konsole/TEWidget.h @@ -109,6 +109,7 @@ public slots: void copyClipboard(); void pasteClipboard(); + void pasteSelection(); void onClearSelection(); signals: diff --git a/konsole/TEmuVt102.cpp b/konsole/TEmuVt102.cpp index b5c42eb9..7aec01ed 100644 --- a/konsole/TEmuVt102.cpp +++ b/konsole/TEmuVt102.cpp @@ -877,8 +877,6 @@ void TEmuVt102::onKeyPress( QKeyEvent* ev ) { switch(cmd) // ... and execute if found. { - case CMD_emitClipboard : gui->emitSelection(false,false); return; - case CMD_emitSelection : gui->emitSelection(true,false); return; case CMD_scrollPageUp : gui->doScroll(-gui->Lines()/2); return; case CMD_scrollPageDown : gui->doScroll(+gui->Lines()/2); return; case CMD_scrollLineUp : gui->doScroll(-1 ); return; diff --git a/konsole/default.keytab.h b/konsole/default.keytab.h index 21fff588..616c3b3b 100644 --- a/konsole/default.keytab.h +++ b/konsole/default.keytab.h @@ -125,8 +125,6 @@ "key Prior +Shift : scrollPageUp\n" "key Down +Shift : scrollLineDown\n" "key Next +Shift : scrollPageDown\n" - "key Insert+Shift -Control : emitClipboard\n" - "key Insert+Shift +Control : emitSelection\n" "\n" "key ScrollLock : scrollLock\n" "\n" diff --git a/konsole/keytrans.cpp b/konsole/keytrans.cpp index f83f9420..aaf2be89 100644 --- a/konsole/keytrans.cpp +++ b/konsole/keytrans.cpp @@ -469,9 +469,7 @@ void KeyTransSymbols::defOprSyms() defOprSym("scrollLineDown",CMD_scrollLineDown); defOprSym("scrollPageUp", CMD_scrollPageUp ); defOprSym("scrollPageDown",CMD_scrollPageDown); - defOprSym("emitSelection", CMD_emitSelection ); defOprSym("scrollLock", CMD_scrollLock); - defOprSym("emitClipboard", CMD_emitClipboard); } void KeyTransSymbols::defModSyms() diff --git a/konsole/keytrans.h b/konsole/keytrans.h index ba422b51..8735f062 100644 --- a/konsole/keytrans.h +++ b/konsole/keytrans.h @@ -28,13 +28,11 @@ #define CMD_none -1 #define CMD_send 0 -#define CMD_emitSelection 1 #define CMD_scrollPageUp 2 #define CMD_scrollPageDown 3 #define CMD_scrollLineUp 4 #define CMD_scrollLineDown 5 #define CMD_scrollLock 6 -#define CMD_emitClipboard 7 #define BITS(x,v) ((((v)!=0)<<(x))) diff --git a/konsole/konsole.cpp b/konsole/konsole.cpp index 3d7b2877..a495e471 100644 --- a/konsole/konsole.cpp +++ b/konsole/konsole.cpp @@ -761,8 +761,10 @@ void Konsole::makeBasicGUI() m_copyClipboard = new KAction(i18n("&Copy"), "editcopy", 0, te, SLOT(copyClipboard()), m_shortcuts, "copy"); - m_pasteClipboard = new KAction(i18n("&Paste"), "editpaste", 0, te, + m_pasteClipboard = new KAction(i18n("&Paste"), "editpaste", Qt::SHIFT+Qt::Key_Insert, te, SLOT(pasteClipboard()), m_shortcuts, "paste"); + m_pasteSelection = new KAction(i18n("Paste Selection"), Qt::CTRL+Qt::SHIFT+Qt::Key_Insert, te, + SLOT(pasteSelection()), m_shortcuts, "pasteselection"); m_clearTerminal = new KAction(i18n("C&lear Terminal"), 0, this, SLOT(slotClearTerminal()), m_shortcuts, "clear_terminal"); diff --git a/konsole/konsole.h b/konsole/konsole.h index eeb81f60..751d7530 100644 --- a/konsole/konsole.h +++ b/konsole/konsole.h @@ -291,6 +291,7 @@ private: KAction *m_copyClipboard; KAction *m_pasteClipboard; + KAction *m_pasteSelection; KAction *m_clearTerminal; KAction *m_resetClearTerminal; KAction *m_clearAllSessionHistories; diff --git a/other/default.Keytab b/other/default.Keytab index 93c76adf..7e808b23 100644 --- a/other/default.Keytab +++ b/other/default.Keytab @@ -99,18 +99,18 @@ key F10 -Shift : "\E[21~" key F11 -Shift : "\E[23~" key F12 -Shift : "\E[24~" -key F1 +Shift : "\EO2P" +key F1 +Shift : "\EO2P" key F2 +Shift : "\EO2Q" key F3 +Shift : "\EO2R" key F4 +Shift : "\EO2S" key F5 +Shift : "\E[15;2~" -key F6 +Shift : "\E[17;2~" -key F7 +Shift : "\E[18;2~" -key F8 +Shift : "\E[19;2~" -key F9 +Shift : "\E[20;2~" -key F10+Shift : "\E[21;2~" -key F11+Shift : "\E[23;2~" -key F12+Shift : "\E[24;2~" +key F6 +Shift : "\E[17;2~" +key F7 +Shift : "\E[18;2~" +key F8 +Shift : "\E[19;2~" +key F9 +Shift : "\E[20;2~" +key F10+Shift : "\E[21;2~" +key F11+Shift : "\E[23;2~" +key F12+Shift : "\E[24;2~" # Work around dead keys @@ -123,8 +123,6 @@ key Up +Shift : scrollLineUp key Prior +Shift : scrollPageUp key Down +Shift : scrollLineDown key Next +Shift : scrollPageDown -key Insert+Shift -Control : emitClipboard -key Insert+Shift +Control : emitSelection key ScrollLock : scrollLock diff --git a/other/linux.keytab b/other/linux.keytab index 2a097fb4..d5149c3c 100644 --- a/other/linux.keytab +++ b/other/linux.keytab @@ -120,8 +120,6 @@ key Up +Shift : scrollLineUp key Prior +Shift : scrollPageUp key Down +Shift : scrollLineDown key Next +Shift : scrollPageDown -key Insert+Shift -Control : emitClipboard -key Insert+Shift +Control : emitSelection key ScrollLock : scrollLock diff --git a/other/vt100.keytab b/other/vt100.keytab index f7f5a4da..dec49baa 100644 --- a/other/vt100.keytab +++ b/other/vt100.keytab @@ -119,8 +119,6 @@ key Up +Shift : scrollLineUp key Prior +Shift : scrollPageUp key Down +Shift : scrollLineDown key Next +Shift : scrollPageDown -key Insert+Shift -Control : emitClipboard -key Insert+Shift +Control : emitSelection key ScrollLock : scrollLock diff --git a/other/vt420pc.keytab b/other/vt420pc.keytab index e3b38c4b..e10d1bdb 100644 --- a/other/vt420pc.keytab +++ b/other/vt420pc.keytab @@ -153,8 +153,6 @@ key Up +Shift : scrollLineUp key Prior +Shift : scrollPageUp key Down +Shift : scrollLineDown key Next +Shift : scrollPageDown -key Insert+Shift -Control : emitClipboard -key Insert+Shift +Control : emitSelection key ScrollLock : scrollLock diff --git a/other/x11r5.keytab b/other/x11r5.keytab index 30b4ecac..75ba06ec 100644 --- a/other/x11r5.keytab +++ b/other/x11r5.keytab @@ -65,8 +65,6 @@ key Up +Shift : scrollLineUp key Prior +Shift : scrollPageUp key Down +Shift : scrollLineDown key Next +Shift : scrollPageDown -key Insert+Shift -Control : emitClipboard -key Insert+Shift +Control : emitSelection key ScrollLock : scrollLock