Control (CTRL) + Space keyboard shortcut not working #165
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
I use the keyboard shortcut Ctrl + Space as my escape character sequence in GNU Screen, and I discovered that it doesn't work in cool-retro-term. The terminal doesn't seem to recognize that key combination at all!
Steps to reproduce:
Observed behavior:
Nothing is output by showkey, indicating that the terminal has failed to process the keyboard event
Expected behavior:
showkey outputs:
^@ 0 0000 0x00
This, sadly, prevents me from using cool-retro-term for remote connections.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Yes, this is definitely an issue. I will look into it. Thanks.
This also affects Emacs, where is C-space is a pretty common sequence for setting the mark. I've also noticed the C-_ doesn't work, which is Emacs undo. Most keys seem to work though.
Just a quick update. Yesterday I took a deeper look into this issue and I think it's a regression from qt4 to qt5. Upstream qtermwidget is also effected (qt5 only) and it also seem that konsole also have this issue https://bugs.kde.org/show_bug.cgi?id=341157 . We'll see if they can come up with a proper solution.
Seeing similar thing on the mac build I just did. I regularly use ctrl-r to jump to parts my bash history quickly and ctrl-d to log out of servers and neither register. Also just remembered screen uses ctrl for pretty much all the commands so it renders screen a little useless not being able to detach or switch screens.
EDIT: Just read the other report about the custom qt4 build and that seems to be working fine, so thanks.
@surrealchemist Those are two different issues. Ctrl+R and Ctrl+D should be working fine on all platforms. Ctrl shortcut are not working on OSX when built with Qt 5.4 (https://github.com/Swordfish90/cool-retro-term/issues/203).
Hah yeah, I was just updating my comment after reading the other issues. Thanks.
This issue has been fixed in konsole and I just included the patch. It's already in unstable, let me know if there is any major regression. https://github.com/Swordfish90/cool-retro-term/tree/unstable
Thanks for looking into this, Swordfish90. Unfortunately, I followed the steps to clone the repo, and then did:
git checkout unstable
git log shows my HEAD at: bf99376... "Update engine. This fixes the CTRL+Space behaviour."
After qmake && make, ./cool-retro-term still doesn't seem to handle CTRL + Space. showkeys -a just outputs nothing when I use that key combo.
I notice the diff for that commit is just one line:
bf9937619e
Is that right? Do I have to do some other step? Thanks!
You're welcome. I'm actually sorry it took so long.
Anyway you probably need to update the submodules (the fix is actually in qmltermwidget and the commit you are linking just points to a newer version).
In the project folder, with the unstable branch just run:
git submodule init
It should pull the latest version of the terminal plugin. If something is now working please try again the full procedure:
git clone --recursive https://github.com/Swordfish90/cool-retro-term
git checkout unstable
git submodule init
I feel like something may be going wrong with updating qmltermwidget. Here are my steps and some truncated output that may be relevant:
rm -rf cool-retro-term/
git clone --recursive https://github.com/Swordfish90/cool-retro-term
c cool-retro-term/
git checkout unstable
git branch -a
c qmltermwidget/
git branch -a
c ..
git submodule init
qmake && make
And it results in the same behavior.
Is it possible that some config file in .config or elsewhere is interfering?
For some reasons the qmltermwidget plugin is still in the wrong version. Please delete the cool-retro-term folder and completely re-clone the project with:
git clone --recursive -b unstable https://github.com/Swordfish90/cool-retro-term
This automatically retrieve the unstable branch and update the plugin to the correct version.
Thanks! By checking it out with the clone command it mysteriously worked. Is this a git thing?
It looks like I have the ability to close this bug, so I shall!
Glad to hear it's working for you. Yeah, it seems there were some mistakes updating the submodules when changing the branch. I'm reopening the issue, I'll close it when the fix is merged in master (to avoid possible duplications).
C-Space works! Thank you!
However, C-_ (Emacs undo) is still not working... Maybe that is a separate issue?
@tprk77 . You're welcome. I think the two issues are not related. Could you try to reproduce it in konsole (build with qt5) (https://projects.kde.org/projects/kde/applications/konsole) and qtermwidget (https://github.com/qterminal/qtermwidget)?
It would be great to understand if it's a regression we somehow introduced, or if it's something we inherited.
I recently rediscovered cool-retro-term and tried to start to use it again, but ran into problems using Emacs, as Ctrl-Space does not seem to get passed on to the program running inside the terminal.
I'm trying this on Fedora 28, building from source from the instructions in README.md. I have tried both
master and unstable, newly cloned today:
~/git/cool-retro-term% git branch -v
f89aeec
Merge pull request #512 from timm0e/patch-1~/git/cool-retro-term% git submodule status
48274c75660e28d44af7c195e79accdf1bd44963 qmltermwidget (0.6.0-323-g48274c7)
and
~/git/cool-retro-term-unstable% git branch -v
cdbe8d7
Bump version code.~/git/cool-retro-term-unstable% git submodule status
ddd71acdd4d5f6a8f764daec679eadcc100e4d9a qmltermwidget (0.6.0-322-gddd71ac)
Tried again on Fedora 30, with stable and unstable versions. Control + Space still does not work. Did some more troubleshooting this time (on unstable), and looked at the commit in qmltermwidget that should fix this,
``
commit 490eeaf195cd5764a3798c2a2340ced648db4526
Author: Filippo Scognamiglio flscogna@gmail.com
Date: Fri Apr 3 19:01:43 2015 +0200
diff --git a/lib/KeyboardTranslator.cpp b/lib/KeyboardTranslator.cpp
index 7530421..46f035c 100644
--- a/lib/KeyboardTranslator.cpp
+++ b/lib/KeyboardTranslator.cpp
@@ -718,7 +718,7 @@ QByteArray KeyboardTranslator::Entry::unescape(const QByteArray& input) const
}
diff --git a/lib/Vt102Emulation.cpp b/lib/Vt102Emulation.cpp
index 3343571..da2b3d7 100644
--- a/lib/Vt102Emulation.cpp
+++ b/lib/Vt102Emulation.cpp
@@ -953,7 +953,7 @@ void Vt102Emulation::sendKeyEvent( QKeyEvent* event )
}
else if ( !entry.text().isEmpty() )
{
``
It seems the Vt102Emulation.cpp part is later changed so the line reads
and that stops Ctrl-Space from working. Testing to change it back to
make Ctrl-Space work again, but I'm scared of what other consequences it could have.
Hi @kent-engstrom , thank you very much for your investigation, you are right. This was something I missed while merging back the latest changes in qtermwidget, the fix we had in place was correct.
Just to make sure I also checked the current konsole implementation and they are doing something along these lines.
Feel free to open a pull request so I can give you credit for it (otherwise I will patch it the next days).
Pull Request no 24 for Swordfish90/qmltermwidget.
Thank you again @kent-engstrom... This was merged yesterday, master is fixed now.