Bug 117662

Summary: kate: backspace key does not work when shift key is held
Product: [Applications] kate Reporter: missive
Component: generalAssignee: KWrite Developers <kwrite-bugs-null>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
Latest Commit: Version Fixed In:

Description missive 2005-12-04 15:32:42 UTC
Version:           2.5.0 (using KDE 3.5.0, Gentoo)
Compiler:          gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
OS:                Linux (i686) release 2.6.14-gentoo-r3

When holding down the shift key, the backspace key does not work.

There is a very old bug (#56629) reporting the same behavior, but I guess I should open a new one....
I see the same problem in KWrite (and Kate of course), but not in KEdit.
Comment 1 Davorin Učakar 2006-01-11 18:07:47 UTC
That bug was already present in some old versions of KatePart (KDE 2.x), but was resolved in recent ones (KDE 3.2, 3.3, 3.4). Now, it's appeared again in KDE 3.5.
However, it can be circumvented by setting Shift+Backspace shortcut.

Arch Linux 0.7.1, KDE 3.5.0
Comment 2 Anders Lund 2006-01-11 19:25:33 UTC
SVN commit 497013 by alund:

Add shift + backspace and shift + delete as alternate shortcuts for delete char actions.
BUG: 117662


 M  +8 -2      kateview.cpp  


--- branches/KDE/3.5/kdelibs/kate/part/kateview.cpp #497012:497013
@@ -592,13 +592,19 @@
       this, SLOT(deleteWordRight()),
       ac, "delete_word_right" );
 
-    new KAction(i18n("Delete Next Character"), Key_Delete,
+    KAction *a = new KAction(i18n("Delete Next Character"), Key_Delete,
                 this, SLOT(keyDelete()),
                 ac, "delete_next_character");
+    KShortcut cut = a->shortcut();
+    cut.append( KKey( SHIFT + Key_Delete ) );
+    a->setShortcut( cut );
 
-    new KAction(i18n("Backspace"), Key_Backspace,
+    a = new KAction(i18n("Backspace"), Key_Backspace,
                 this, SLOT(backspace()),
                 ac, "backspace");
+    cut = a->shortcut();
+    cut.append( KKey( SHIFT + Key_Backspace ) );
+    a->setShortcut( cut );
   }
 
   connect( this, SIGNAL(gotFocus(Kate::View*)),
Comment 3 Thiago Macieira 2006-01-12 04:12:37 UTC
Shift+Del is already an alias for Cut. Please let it be Cut instead of Delete.
Comment 4 Anders Lund 2006-01-12 13:40:40 UTC
On Thursday 12 January 2006 04:12, Thiago Macieira wrote:
> Shift+Del is already an alias for Cut. Please let it be Cut instead of
> Delete.


Oops sorry, I'll remove that again then.

-anders
Comment 5 Anders Lund 2006-01-12 13:47:33 UTC
SVN commit 497232 by alund:

Don't eat shift + del
CCBUG:  117662


 M  +3 -6      kateview.cpp  


--- branches/KDE/3.5/kdelibs/kate/part/kateview.cpp #497231:497232
@@ -592,17 +592,14 @@
       this, SLOT(deleteWordRight()),
       ac, "delete_word_right" );
 
-    KAction *a = new KAction(i18n("Delete Next Character"), Key_Delete,
+    new KAction(i18n("Delete Next Character"), Key_Delete,
                 this, SLOT(keyDelete()),
                 ac, "delete_next_character");
-    KShortcut cut = a->shortcut();
-    cut.append( KKey( SHIFT + Key_Delete ) );
-    a->setShortcut( cut );
 
-    a = new KAction(i18n("Backspace"), Key_Backspace,
+    KAction *a = new KAction(i18n("Backspace"), Key_Backspace,
                 this, SLOT(backspace()),
                 ac, "backspace");
-    cut = a->shortcut();
+    KShortcut cut = a->shortcut();
     cut.append( KKey( SHIFT + Key_Backspace ) );
     a->setShortcut( cut );
   }
Comment 6 Dominik Haumann 2007-05-20 19:32:50 UTC
SVN commit 666725 by dhaumann:

forward port SVN commit 497013 and 497232 by alund:
Add shift + backspace as alternate shortcuts for delete char action.
CCBUG: 117662


 M  +4 -1      kateview.cpp  


--- trunk/KDE/kdelibs/kate/part/view/kateview.cpp #666724:666725
@@ -740,7 +740,10 @@
 
     a = ac->addAction("backspace");
     a->setText(i18n("Backspace"));
-    a->setShortcut(QKeySequence(Qt::Key_Backspace));
+    QList<QKeySequence> scuts;
+    scuts << QKeySequence(Qt::Key_Backspace)
+          << QKeySequence(Qt::SHIFT + Qt::Key_Backspace);
+    a->setShortcuts(scuts);
     connect(a, SIGNAL(triggered(bool)), SLOT(backspace()));
 
 #if 0