CTRL+ shortcuts don't work on OSX with Qt 5.4 #203

Open
opened 2015-01-08 20:50:35 +01:00 by starmatt · 18 comments
starmatt commented 2015-01-08 20:50:35 +01:00 (Migrated from github.com)

Hello, I am trying get the control key to work on CRT, I'm on OSX.
It seems that it doesnt register anything. I cannot type when using the ctrl key, but things like CTRL+C won't work (to cancel a process for instance).
Using tmux, I can't even use the prefix command because it seems that pressing ctrl does nothing.

This term is awesome by the way, this is my only issue with it.
Thanks for the help!

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7596293-ctrl-shortcuts-don-t-work-on-osx-with-qt-5-4?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github).
Hello, I am trying get the control key to work on CRT, I'm on OSX. It seems that it doesnt register anything. I cannot type when using the ctrl key, but things like CTRL+C won't work (to cancel a process for instance). Using tmux, I can't even use the prefix command because it seems that pressing ctrl does nothing. This term is awesome by the way, this is my only issue with it. Thanks for the help! ## <bountysource-plugin> --- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7596293-ctrl-shortcuts-don-t-work-on-osx-with-qt-5-4?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F479407&utm_medium=issues&utm_source=github). </bountysource-plugin>
Swordfish90 commented 2015-01-08 21:13:31 +01:00 (Migrated from github.com)

Hi @starmatt, sadly I'm aware of the issue when CRT is built with Qt 5.4 . I suggest you to use an older version such as 5.3.2 or to simply use the prepackaged dmg I built (https://github.com/Swordfish90/cool-retro-term/releases/tag/v1.0.0-RC1).

Anyway we need to investigate this further since this is likely a Qt regression (OSX only).

I'm glad you are enjoying CRT :)

Hi @starmatt, sadly I'm aware of the issue when CRT is built with Qt 5.4 . I suggest you to use an older version such as 5.3.2 or to simply use the prepackaged dmg I built (https://github.com/Swordfish90/cool-retro-term/releases/tag/v1.0.0-RC1). Anyway we need to investigate this further since this is likely a Qt regression (OSX only). I'm glad you are enjoying CRT :)
starmatt commented 2015-01-08 21:20:09 +01:00 (Migrated from github.com)

Thanks for your answer, so I should install Qt5.3.2, then reinstall CRT, right?

Thanks for your answer, so I should install Qt5.3.2, then reinstall CRT, right?
Swordfish90 commented 2015-01-08 21:23:57 +01:00 (Migrated from github.com)

If you use the prepackaged version I made, libraries are already included in the app. Simply download the dmg file, extract CRT in your Application folder and you are good to go.

You need to install Qt5.3.2 only if you want to build it from source yourself.

If you use the prepackaged version I made, libraries are already included in the app. Simply download the dmg file, extract CRT in your Application folder and you are good to go. You need to install Qt5.3.2 only if you want to build it from source yourself.
starmatt commented 2015-01-08 22:07:44 +01:00 (Migrated from github.com)

Thanks again for the quick answer! I unfortunately cannot use the dmg on that computer because of security measures but I'll gladly build it, again great work dude!

Thanks again for the quick answer! I unfortunately cannot use the dmg on that computer because of security measures but I'll gladly build it, again great work dude!
starmatt commented 2015-01-08 23:04:04 +01:00 (Migrated from github.com)

Welp, it doesn't look as nice on Qt5.3, but it's still awesome. Hope they fix that issue someday though.

Welp, it doesn't look as nice on Qt5.3, but it's still awesome. Hope they fix that issue someday though.
vitapluvia commented 2015-01-21 00:51:41 +01:00 (Migrated from github.com)

It looks like Command key is intentionally mapped to the Ctrl functionality to avoid conflict with copy & paste. Is there a way to switch this back easily ? I'm not sure if it relates to this same issue, but it sounded close...

Thank you for providing this awesome tool! :)

It looks like Command key is intentionally mapped to the Ctrl functionality to avoid conflict with copy & paste. Is there a way to switch this back easily ? I'm not sure if it relates to this same issue, but it sounded close... Thank you for providing this awesome tool! :)
Swordfish90 commented 2015-01-22 01:20:02 +01:00 (Migrated from github.com)

@vitapluvia That's actually how Qt manages the shortcuts under OSX: by default the Meta and Control are swapped. It is possible to disable the behaviour by setting app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta) in main.cpp but I'm not sure this would fix the issue (this looks more like a Qt regression).

You're welcome :) ...

@vitapluvia That's actually how Qt manages the shortcuts under OSX: by default the Meta and Control are swapped. It is possible to disable the behaviour by setting app.setAttribute(Qt::AA_MacDontSwapCtrlAndMeta) in main.cpp but I'm not sure this would fix the issue (this looks more like a Qt regression). You're welcome :) ...
florianjacob commented 2015-02-12 19:04:34 +01:00 (Migrated from github.com)

Same bug on Linux with KDE Konsole: https://bugs.kde.org/show_bug.cgi?id=341157 so this is not an OS X only regression in Qt 5.4. @Swordfish90 did you already have the time to file a bug against Qt, or do you have some technical hints for me where that bug could be located?

Same bug on Linux with KDE Konsole: https://bugs.kde.org/show_bug.cgi?id=341157 so this is not an OS X only regression in Qt 5.4. @Swordfish90 did you already have the time to file a bug against Qt, or do you have some technical hints for me where that bug could be located?
Swordfish90 commented 2015-02-13 01:10:56 +01:00 (Migrated from github.com)

@florianjacob These are two separate issues. This one affects all the CTRL+ combinations, it is a Qt 5.4 regression and affects only OSX. The missing CTRL+Space is another issue ( #165 ): it is reproducible only on Linux systems and was a regression with (I think) Qt 5.0 .

I made some tests weeks ago and if I recall correctly, it was due to different values (between Qt4 and Qt5) of the text() method of QKeyEvent (http://qt-project.org/doc/qt-4.8/qkeyevent.html#text) (lib/Vt102Emulation.cpp). Sadly I haven't had time to really pursue the solution. If you have any update I'll be glad to hear it (in the other page #165 ).

@florianjacob These are two separate issues. This one affects all the CTRL+ combinations, it is a Qt 5.4 regression and affects only OSX. The missing CTRL+Space is another issue ( #165 ): it is reproducible only on Linux systems and was a regression with (I think) Qt 5.0 . I made some tests weeks ago and if I recall correctly, it was due to different values (between Qt4 and Qt5) of the text() method of QKeyEvent (http://qt-project.org/doc/qt-4.8/qkeyevent.html#text) (lib/Vt102Emulation.cpp). Sadly I haven't had time to really pursue the solution. If you have any update I'll be glad to hear it (in the other page #165 ).
adammathes commented 2017-01-11 07:02:45 +01:00 (Migrated from github.com)

@Swordfish90 I was able to address one of the issues (at least on my own build on MacOS) with this change --

65225a5c47

CTRL is properly sent and recognized on MacOS within terminal commands, CMD is properly interpreted for copy/paste. Though I'm not sure what other bugs/issues this might introduce or if this was a reasonable solution.

@Swordfish90 I was able to address one of the issues (at least on my own build on MacOS) with this change -- https://github.com/adammathes/qmltermwidget/commit/65225a5c47faf9358de82ba3c0de1230d87835f2 CTRL is properly sent and recognized on MacOS within terminal commands, CMD is properly interpreted for copy/paste. Though I'm not sure what other bugs/issues this might introduce or if this was a reasonable solution.
tguless commented 2017-05-11 22:57:56 +02:00 (Migrated from github.com)

Why is there no PR for @adammathes's fix? It works on OSX. It should at least be put in a working OSX branch.

Why is there no PR for @adammathes's fix? It works on OSX. It should at least be put in a working OSX branch.
ShikiSuen commented 2018-03-16 03:50:00 +01:00 (Migrated from github.com)

I must address that this seriously affected my efficiency using most audio apps on macOS that rely on Qt: PreSonus Studio One, Steinberg HALion Sampler, etc. It is really stupid to have to use mouse right-click in lieu of clipboard shortcuts.

Update: This is not the repository for Qt, right? Could anyone please tell me how to let this informed by Qt official?

I must address that this seriously affected my efficiency using most audio apps on macOS that rely on Qt: PreSonus Studio One, Steinberg HALion Sampler, etc. It is really stupid to have to use mouse right-click in lieu of clipboard shortcuts. Update: This is not the repository for Qt, right? Could anyone please tell me how to let this informed by Qt official?
richarson commented 2018-03-20 02:15:18 +01:00 (Migrated from github.com)

@ShikiSuen there's a bug tracker here:
https://bugreports.qt.io/secure/Dashboard.jspa

But you should probably check with a newer Qt version, as 5.4 (the last one mentioned in this thread) is ancient :)

@ShikiSuen there's a bug tracker here: https://bugreports.qt.io/secure/Dashboard.jspa But you should probably check with a newer Qt version, as 5.4 (the last one mentioned in this thread) is ancient :)
athompso commented 2018-07-03 17:41:28 +02:00 (Migrated from github.com)

FYI, the macOS .dmg for v1.0.1 is afflicted with this bug, ast least under macOS 10.13.6 - the above recommendation to use the official .dmg file no longer fixes the problem.
(I don't know where and when it stopped working, sorry.)

FYI, the macOS .dmg for v1.0.1 is afflicted with this bug, ast least under macOS 10.13.6 - the above recommendation to use the official .dmg file no longer fixes the problem. (I don't know where and when it stopped working, sorry.)
nop commented 2019-08-25 08:19:03 +02:00 (Migrated from github.com)

I hope I'm not necrobumping, but I'm having this issue on Manjaro Linux, too. I can't use Control + Space (as per my config in ~/.tmux.config, works in every other term I have) for my tmux leader. I haven't tried any other keybind yet, though. I can use C-d, C-c and C-z to send signals to the terminal, though.

I hope I'm not necrobumping, but I'm having this issue on Manjaro Linux, too. I can't use Control + Space (as per my config in `~/.tmux.config`, works in every other term I have) for my tmux leader. I haven't tried any other keybind yet, though. I can use C-d, C-c and C-z to send signals to the terminal, though.
jtaala commented 2019-08-25 22:45:49 +02:00 (Migrated from github.com)

Exact same issue on Manjaro Linux as @NOP. It's not picking up Control+Space and others. No response at all with
showkey -a and control+space. Recent commits appear to suggest this is fixed but seems to not be.

Exact same issue on Manjaro Linux as @NOP. It's not picking up Control+Space and others. No response at all with `showkey -a` and control+space. Recent commits appear to suggest this is fixed but seems to not be.
Einenlum commented 2019-09-19 11:36:50 +02:00 (Migrated from github.com)

Same problem as @NOP and @jtaala. Can't use the Ctrl + space as my Tmux leader, although it is working on every other terminal. Don't know why. (Not related to OS X though here, since I'm on ArchLinux)

Same problem as @NOP and @jtaala. Can't use the `Ctrl + space` as my Tmux leader, although it is working on every other terminal. Don't know why. (Not related to OS X though here, since I'm on ArchLinux)
maddiemort commented 2020-09-30 16:29:40 +02:00 (Migrated from github.com)

I'm having the same issue as @Einenlum, but on macOS. I can't use Ctrl + Space as my tmux leader.

I'm having the same issue as @Einenlum, but on macOS. I can't use Ctrl + Space as my tmux leader.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: seeseemelk/cool-retro-term#203
No description provided.