Bug 442306 - Konsole doesn't send Ctrl+Left click to terminal application
Summary: Konsole doesn't send Ctrl+Left click to terminal application
Status: RESOLVED FIXED
Alias: None
Product: konsole
Classification: Applications
Component: keyboard (show other bugs)
Version: 20.12.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Konsole Developer
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-11 13:43 UTC by Gustavo
Modified: 2022-12-30 18:04 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 Gustavo 2021-09-11 13:43:44 UTC
Hi!

I'm a user of the Kakoune editor. One of its features is multiple selections, that is, multiple cursors each selecting a different region of text.

To manually place a new selection, we can use Ctrl + Left mouse click. It works well on every terminal I've tested so far except Konsole, which seems to not send the corresponding event to Kakoune.


STEPS TO REPRODUCE

1. Install any recent version of Kakoune (the version in your distro repo should do the job, albeit colors will only work properly on Konsole with the last Kakoune's release: version 2021.08.28; this bug can be reproduced also in previous versions though)

2. Run `kak` in Konsole; it will open a scratch buffer

3. Press `Ctrl+Left click` on any word in that scratch buffer

OBSERVED RESULT

The cursor jumps to the word pointed by the mouse as if the `Ctrl` modifier is not pressed.

EXPECTED RESULT

A new cursor should be created at the mouse position, adding to the cursor already present when Kakoune starts, resulting in two cursors.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 21.04
KDE Plasma Version: 5.21.4
KDE Frameworks Version: 5.80.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION

Also tested on Opensuse Tumbleweed with Konsole 21.08.1.

Tweaking settings in `Settings -> Edit current profile -> Mouse -> Miscellaneous` doesn't take any effect on the observed behaviour.

Terminal emulators I can attest `Ctrl+Left click` works properly:  Kitty, Alacritty, Gnome Terminal, Wezterm.

Kakoune website: https://kakoune.org
Comment 1 Gustavo 2021-10-17 13:15:04 UTC
Hi!

If you need extra information regarding this bug, please tell me, and I will try to give any information you need.
Comment 2 Bug Janitor Service 2022-12-04 00:07:45 UTC
A possibly relevant merge request was started @ https://invent.kde.org/utilities/konsole/-/merge_requests/781
Comment 3 Kurt Hindenburg 2022-12-12 19:46:33 UTC
Git commit b4a3a076b35b6b1f183e374e67953f67e0412b4c by Kurt Hindenburg, on behalf of Luis Javier Merino Morán.
Committed on 12/12/2022 at 19:34.
Pushed by hindenburg into branch 'master'.

Support Ctrl and Alt in mouse tracking mode

Konsole uses Shift to bypass mouse tracking mode, so we don't support
that one.  We also don't support Alt + wheel, since Qt uses ihat to
simulate an horizontal wheel.

M  +5    -9    src/Vt102Emulation.cpp
M  +31   -10   src/terminalDisplay/TerminalDisplay.cpp
M  +2    -1    src/terminalDisplay/TerminalDisplay.h

https://invent.kde.org/utilities/konsole/commit/b4a3a076b35b6b1f183e374e67953f67e0412b4c
Comment 4 Gustavo 2022-12-13 20:20:11 UTC
Nice! Thank you very much!
Comment 5 Kurt Hindenburg 2022-12-30 18:04:10 UTC
Git commit a072d060c6abf94f0fcaf95531c8260b814f4314 by Kurt Hindenburg, on behalf of Luis Javier Merino Morán.
Committed on 30/12/2022 at 16:49.
Pushed by hindenburg into branch 'release/22.12'.

Support Ctrl and Alt in mouse tracking mode

Konsole uses Shift to bypass mouse tracking mode, so we don't support
that one.  We also don't support Alt + wheel, since Qt uses ihat to
simulate an horizontal wheel.

M  +5    -9    src/Vt102Emulation.cpp
M  +31   -10   src/terminalDisplay/TerminalDisplay.cpp
M  +2    -1    src/terminalDisplay/TerminalDisplay.h

https://invent.kde.org/utilities/konsole/commit/a072d060c6abf94f0fcaf95531c8260b814f4314