Bug 61667 - Can't use Ctrl+something shortcuts in konsole
Summary: Can't use Ctrl+something shortcuts in konsole
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: general (show other bugs)
Version: 1.2.1
Platform: Mandrake RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-07-25 17:45 UTC by Jeffery Yoder
Modified: 2004-07-28 15:29 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeffery Yoder 2003-07-25 17:45:57 UTC
Version:           1.2.1 (using KDE 3.1.0)
Installed from:    Mandrake Linux Cooker i586 - Cooker
Compiler:          gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
OS:          Linux (i686) release 2.4.21-0.13mdkenterprise

I have configured Ctrl+Insert as a shortcut to copy in Settings->Configure Shortcuts, however when I select some text and press Ctrl+Insert it is not copied to the clipboard, and the Warning bell is displayed.

This is a default Mandrake 9.1 install with no modifications.
Comment 1 Dominique Devriese 2003-12-20 15:13:54 UTC
I can confirm this bug, and also know its cause.

In fact, you cannot use any Ctrl+something key sequence as a shortcut for any sort of action ( app-local or global ) in konsole, because of the following piece of code in TEWidget.cpp:

  // Override any Ctrl+<key> accelerator when pressed with the keyboard
  // focus in TEWidget, so that the key will be passed to the terminal instead.
  bool TEWidget::event( QEvent *e )
  {
    if ( e->type() == QEvent::AccelOverride )
    {
      QKeyEvent *ke = static_cast<QKeyEvent *>( e );
      KKey key( ke );
      int keyCodeQt = key.keyCodeQt();

      if ( ke->state() == Qt::ControlButton )
      {
        ke->accept();
        return true;
      }


This causes any Ctrl+something keypresses to be overridden, and not tested for containing a shortcut.

This is confusing for users, as they do not know that this is the case, and I am working on another bug report on the Debian BTS about the same thing.  It was also about Ctrl+Insert, this seems to be a common key sequence among our users.

I don't know how this should be solved.  I know the override is there for a reason.  Perhaps Ctrl+Insert should not be overridden as a special case.  I can provide you with a patch that does that if you want it.

cheers
domi
Comment 2 Dominique Devriese 2003-12-20 15:15:07 UTC
Note: this bug was also reported as http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=203709

cheers
domi
Comment 3 Waldo Bastian 2004-04-07 14:37:34 UTC
See http://bugs.kde.org/show_bug.cgi?id=48103 and
http://bugs.kde.org/show_bug.cgi?id=41601

Those two bugreports deal with konsole embedded as part though. I don't think it is strictly necessary to block ctrl-key shortcuts in a stand-alone konsole as well.

That should then be combined with a dialog as in http://bugs.kde.org/show_bug.cgi?id=74396
that explains that using a control-key shortcut may have unintended consequences.
Comment 4 Waldo Bastian 2004-04-08 23:15:42 UTC
*** Bug has been marked as fixed ***.
Comment 5 peppelorum 2004-07-28 10:12:09 UTC
This is behaviour still exists in 3.2.3.
Comment 6 Waldo Bastian 2004-07-28 15:29:28 UTC
Fixed for KDE 3.3, has/will not be fixed KDE 3.2.x