Ctrl-Space no longer works

Bug #1515881 reported by Richard Hansen
16
This bug affects 3 people
Affects Status Importance Assigned to Milestone
KDE Base
Fix Released
High
konsole (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Starting with Ubuntu 15.10, Ctrl-Space no longer works in konsole and other Qt 5.4 apps. This is a known upstream problem, with a fix available at:
https://quickgit.kde.org/?p=konsole.git&a=commit&h=c16fc7d4671edf14c47132be0c621b08bce7dc82

EDIT:
The fix linked above is already in Ubuntu 15.10, so there is a different underlying problem showing the same symptoms. I submitted a new upstream KDE bug about this.

Revision history for this message
In , Weigert-stefan (weigert-stefan) wrote :

I'm using Emacs within Konsole and in the qt4 - version pressing Ctrl+Space works properly and enables me to select text in Emacs. However, when I use the qt5 version of Konsole (from Kubuntu CI weekly) it does not work anymore (i.e. nothing happens in Emacs). Going to "Configure Profile", selecting "Keyboard" and then "Edit" (default xfree is selected) and then pressing Ctrl + Space in the input area does not generate anything in the output area.

Reproducible: Always

Steps to Reproduce:
1.open konsole
2.open emacs
3.press ctrl+space and then cursor down to select some lines

Actual Results:
the cursor is moved but nothing is selected

Expected Results:
the cursor is moved and the text is selected

Revision history for this message
In , dMaggot (david-narvaez) wrote :

FWIW, I tried qterminal (https://github.com/qterminal), whose code was originally based on konsole. As in konsole, the qt4 version works OK but the qt5 version does not send CTRL+Space so either qterminal and konsole both do the same thing wrong or this is broken at a deeper level in qt5. Notice that you can't send CTRL+@ either, so this looks like something deeper than keyboard bindings, i.e., it looks like konsole/qterminal cannot send ASCII char 0.

Revision history for this message
In , Adrian-metabind (adrian-metabind) wrote :

Arch Linux x86_64

Name : konsole
Version : 14.12.1-1

Name : plasma-workspace
Version : 5.1.2-5

Name : qt5-base
Version : 5.4.0-3

Prior to "Transition of KDE software to the KDE Framework and Qt 5" update in Arch Linux, Ctrl-Space & Ctrl-@ were working in Konsole (Emacs). They continue to work in rxvt and in the Emacs GUI app.

This bug can be reproduced using `showkey -a' in Konsole.

This bug is a major annoyance for all Emacs developers using "Konsole" since Ctrl-Space is one of the most heavily used and fundamental keybindings.

Revision history for this message
In , Accounts+bugs-kde (accounts+bugs-kde) wrote :

I found the same behaviour when trying to use the vimwiki vim plugin, which uses ctrl+space to tick items as done in todo lists. I'm using konsole 14.12 / qt5-base 5.4.0 / kde worskpace 4.11.15 on Arch Linux.

Revision history for this message
In , Calvinh34 (calvinh34) wrote :

If it is of any help, I found that Yakuake running Qt4 still get the null-byte, while Konsole running Qt5 does not. Both are in from the same plasma5 session

$ yakuake --version
Qt : 4.8.6
Plate-forme de développement de KDE : 4.14.4
Yakuake : 2.9.9

$ konsole --version
Qt: 5.4.0
KDE Development Platform: TODO
Konsole: 3.0.1

Archlinux again

Revision history for this message
In , Pasi-luostarinen (pasi-luostarinen) wrote :

If you edit terminal layout and find "Ctrl + Space" and set it to \x0 then press ok and open again edit window the binding has been erased. This does not happen when \x1 is set as binding

Revision history for this message
In , Nectuto (nectuto) wrote :

In midnight commander is used Ctrl + space to show size of directory.
Work around is to use F9 -> Command -> Shou directory sizes. It is not user friendly.
So bug is not only for emacs users...

Revision history for this message
In , Accounts+bugs-kde (accounts+bugs-kde) wrote :

I can still reproduce this with Konsole 3.0.1 from Applications 14.12.2.

Revision history for this message
In , Rubykuby (rubykuby) wrote :

cool-retro-term also has this exact issue: https://github.com/Swordfish90/cool-retro-term/issues/203

It appears to be related to Qt 5.4.

Revision history for this message
In , Cfeck (cfeck) wrote :

*** Bug 343097 has been marked as a duplicate of this bug. ***

Revision history for this message
In , Anand-chirag (anand-chirag) wrote :

Have submitted a review request: https://git.reviewboard.kde.org/r/122711/

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Thanks - I'll look at this to get into the next release

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Git commit 9d062f1f522a50aa5ec2ae2a95ce6124b4427b5b by Kurt Hindenburg.
Committed on 07/03/2015 at 14:42.
Pushed by hindenburg into branch 'master'.

Make Ctrl+Space work again

Qt5.4 appears to have caused this issue. Test using showkey, mc, emacs

Thanks to Chirag Anand anand chirag gmail com for fix
REVIEW: 122711

M +1 -1 src/KeyboardTranslator.cpp
M +1 -1 src/Vt102Emulation.cpp

http://commits.kde.org/konsole/9d062f1f522a50aa5ec2ae2a95ce6124b4427b5b

Revision history for this message
In , Kurt Hindenburg (kurt-hindenburg) wrote :

Git commit c16fc7d4671edf14c47132be0c621b08bce7dc82 by Kurt Hindenburg.
Committed on 07/03/2015 at 14:42.
Pushed by hindenburg into branch 'Applications/15.04'.

Make Ctrl+Space work again

Qt5.4 appears to have caused this issue. Test using showkey, mc, emacs

Thanks to Chirag Anand anand chirag gmail com for fix
REVIEW: 122711
(cherry picked from commit 9d062f1f522a50aa5ec2ae2a95ce6124b4427b5b)

M +1 -1 src/KeyboardTranslator.cpp
M +1 -1 src/Vt102Emulation.cpp

http://commits.kde.org/konsole/c16fc7d4671edf14c47132be0c621b08bce7dc82

Changed in kde-baseapps:
importance: Unknown → High
status: Unknown → Fix Released
Revision history for this message
Richard Hansen (rhansen) wrote :

Actually, https://bugs.kde.org/show_bug.cgi?id=341157 is not the same bug. The fix for that upstream bug is already in wily's version of konsole, so this must be caused by something else.

no longer affects: kde-baseapps
Revision history for this message
In , forek (forek) wrote :

This is NOT a duplicate of #341157. I am running a version of Konsole with the fix for that bug already applied (v15.08.3).

The symptoms are identical to #341157, however: If I hit Ctrl-Space in 'emacs -nw' or 'showkey -a' nothing appears.

Reproducible: Always

Steps to Reproduce:
1. start konsole
2. run 'showkey -a'
3. press Ctrl-Space

Actual Results:
nothing

Expected Results:
it should show ^@

Ubuntu 15.10 (wily) 64-bit.

The problem appears in both the packaged version of Konsole (konsole-4:15.08.2-0ubuntu2) and in Konsole v15.08.3 compiled from the KDE Git repository.

$ konsole --version
Qt: 5.4.2
KDE Frameworks: 5.15.0
Konsole: 15.08.0

Revision history for this message
In , forek (forek) wrote :

If I check out 9d062f1f522a50aa5ec2ae2a95ce6124b4427b5b (the Git commit that fixed bug #341157), build it, and run it, I still experience the same problem. So, this must not be a regression; there must be some other underlying cause.

xev shows the Ctrl, Space, Space release, and Ctrl release events.

Revision history for this message
In , forek (forek) wrote :

I can get it to work by following these steps:
  1. edit the current profile
  2. go to the Keyboard tab
  3. click Edit (the selected entry is "Default (XFree 4)")
  4. click Add
  5. enter Space+Ctrl in the Key Combination column
  6. enter \x00 in the Output column
Should I need to do this?

Using gdb I noticed that for the Ctrl+Space QKeyEvent:
  * event->modifiers() & Qt::ControlModifier is true
  * event->key() is Qt::Key_Space (decimal 32, hex 0x20)
  * event->text().isEmpty() is true

Without the Space+Ctrl key binding, KeyboardTranslator::findEntry() returns an empty entry, which causes Vt102Emulation::sendKeyEvent() to send event->text(), which is empty.

Richard Hansen (rhansen)
description: updated
Changed in kde-baseapps:
importance: Unknown → High
status: Unknown → New
Changed in konsole (Ubuntu):
assignee: nobody → SYEDFAYAZ MUJAWAR (syedfayaz28)
status: New → Confirmed
status: Confirmed → New
Revision history for this message
Faré (fahree) wrote :

I have the same issue and Comment #18 has the solution:

Whereas the "Linux console" keyboard mapping correctly maps Ctrl-Space to outputing \x00, the "Default (XFree 4)" keyboard mapping incorrectly maps it to no output.

I believe this is the bug, and the "Default (XFree 4)" keyboard mapping ought to map Ctrl-Space to outputing \x00 like the "Linux console" keyboard mapping does.

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in konsole (Ubuntu):
status: New → Confirmed
Changed in konsole (Ubuntu):
importance: Undecided → High
Changed in konsole (Ubuntu):
assignee: SYEDFAYAZ MUJAWAR (syedfayaz28) → nobody
Changed in kde-baseapps:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.