Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click and then Ctrl interpreted as Ctrl+click #16074

Open
1 task done
cshaa opened this issue Aug 11, 2024 · 6 comments
Open
1 task done

Click and then Ctrl interpreted as Ctrl+click #16074

cshaa opened this issue Aug 11, 2024 · 6 comments
Labels
linux mouse interaction Feedback for mouse interaction states, actions, etc support User support (non-defect troubleshooting, documentation, etc)

Comments

@cshaa
Copy link

cshaa commented Aug 11, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

  1. Open a TypeScript file (or any language whose LSP supports jump to definition)
  2. Click on an identifier, and immediately after that press Ctrl
  3. See that Zed jumped to definition or opened References

Environment

Zed: v0.147.2 (Zed)
OS: Linux X11 elementary 7.1
Memory: 15 GiB
Architecture: x86_64
GPU: AMD Unknown (RADV RENOIR) || radv || Mesa 23.2.1-1ubuntu3.1~22.04.2

If applicable, add mockups / screenshots to help explain present your vision of the feature

Video_2024-08-11_11-10-25.online-video-cutter.com.mp4

If applicable, attach your Zed.log file to this issue.

Zed.log
2024-08-11T11:07:33.774950498+02:00 [INFO] new;
2024-08-11T11:07:33.775875188+02:00 [INFO] keep_updated;
2024-08-11T11:07:33.775985075+02:00 [INFO] new;
2024-08-11T11:07:34.164259661+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 261 }
2024-08-11T11:07:36.926346718+02:00 [INFO] Initializing default prettier with plugins {}
2024-08-11T11:07:36.926484448+02:00 [INFO] starting language servers for TypeScript: vtsls, eslint, deno
2024-08-11T11:07:37.006019708+02:00 [INFO] Language server with id 2 sent unhandled notification eslint/status:
{
  "uri": "file:///home/csha/Documents/chartium/lib/foo.ts",
  "state": 1,
  "validationTime": 20
}
2024-08-11T11:07:42.352069902+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 262 }
2024-08-11T11:08:06.748553013+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 263 }
2024-08-11T11:09:55.870712099+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 264 }
2024-08-11T11:09:56.191906523+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 265 }
2024-08-11T11:10:01.11631656+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 266 }
2024-08-11T11:10:52.310583136+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 267 }
2024-08-11T11:14:14.041743009+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.044815239+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.058347001+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.05908131+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.06544476+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.074362567+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.091901735+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.094000957+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.094314255+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.100455298+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.114430733+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.123201093+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.128049518+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.140109617+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.141930436+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.148953846+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.156592421+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.162861513+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.169887278+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.183788503+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.190685846+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.197784287+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.211888744+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.246735665+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:14.958449968+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:15.391649916+02:00 [WARN] Unknown request DestroyIcReply { input_method_id: 2, input_context_id: 268 }
2024-08-11T11:14:15.98004052+02:00 [INFO] Using surface present mode MAILBOX
2024-08-11T11:14:15.980331786+02:00 [WARN] Unable to forbid exclusive full screen
2024-08-11T11:14:16.011225342+02:00 [INFO] Using surface present mode MAILBOX
2024-08-11T11:14:16.012100585+02:00 [WARN] Unable to forbid exclusive full screen
2024-08-11T11:14:17.108816788+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:17.157952149+02:00 [INFO] Creating a descriptor pool for at most 4096 sets
2024-08-11T11:14:17.159163533+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:17.2072479+02:00 [INFO] Creating a descriptor pool for at most 4096 sets
2024-08-11T11:14:17.231865359+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:17.375779071+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:17.606374241+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:19.610398346+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:19.661623969+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:19.693689963+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:19.824431665+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:20.290579316+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:20.366803942+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
2024-08-11T11:14:20.409064369+02:00 [WARN] Unknown button press: ButtonPressEvent { .. }
@cshaa cshaa added admin read Pending admin review bug [core label] triage Maintainer needs to classify the issue labels Aug 11, 2024
@cshaa
Copy link
Author

cshaa commented Aug 11, 2024

It is possible that my touchpad sends the mouseup event after a delay. However, in VSC I have no such problem.

It's extremely annoying when I want to click on an identifier and then Ctrl+Backpace to delete the beginning of it, but Zed yeets me into a different file and deletes the identifier's definition.

@notpeter
Copy link
Member

I am not able to reproduce this on my Linux machine, I attempted with a trackpad and mouse but with no luck.

Could you see if this still happens with a different input device (mouse, etc) for you?
Do you have any keyboard / mouse remapping or tools configured which might be contributing? (e.g. something that maps "ctrl-click" to right click, etc)

@notpeter notpeter added mouse interaction Feedback for mouse interaction states, actions, etc linux support User support (non-defect troubleshooting, documentation, etc) and removed bug [core label] triage Maintainer needs to classify the issue admin read Pending admin review labels Aug 13, 2024
@cshaa
Copy link
Author

cshaa commented Aug 18, 2024

I tried to use a wireless mouse and can confirm that with a mouse this only occurs if the sequence of events is: mouse down, key down, mouse up. (This sequence of events does not trigger Go To Definition in VSC; only key down, mouse down, mouse up does.) Therefore the behavior reported in OP is only reproducible on the touchpad.

I'm using elementary OS 7.1 (based on Ubuntu 22.04.3) and, apart from elementary OS itself, I'm unaware of any 3rd party software that might be causing this.

Here's the output of xinput that might be relevant.

➜  ~ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ DELL0A7A:00 04F3:3147 Mouse             	id=9	[slave  pointer  (2)]
⎜   ↳ DELL0A7A:00 04F3:3147 Touchpad          	id=10	[slave  pointer  (2)]
⎜   ↳ ETPS/2 Elantech Touchpad                	id=13	[slave  pointer  (2)]
...

➜  ~ xinput list-props 9
Device 'DELL0A7A:00 04F3:3147 Mouse':
	Device Enabled (170):	1
	Coordinate Transformation Matrix (172):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Natural Scrolling Enabled (309):	0
	libinput Natural Scrolling Enabled Default (310):	0
	libinput Scroll Methods Available (311):	0, 0, 1
	libinput Scroll Method Enabled (312):	0, 0, 1
	libinput Scroll Method Enabled Default (313):	0, 0, 1
	libinput Button Scrolling Button (314):	3
	libinput Button Scrolling Button Default (315):	3
	libinput Button Scrolling Button Lock Enabled (316):	0
	libinput Button Scrolling Button Lock Enabled Default (317):	0
	libinput Accel Speed (318):	0.000000
	libinput Accel Speed Default (319):	0.000000
	libinput Accel Profiles Available (320):	1, 1
	libinput Accel Profile Enabled (321):	1, 0
	libinput Accel Profile Enabled Default (322):	1, 0
	libinput Left Handed Enabled (323):	0
	libinput Left Handed Enabled Default (324):	0
	libinput Send Events Modes Available (294):	1, 0
	libinput Send Events Mode Enabled (295):	0, 0
	libinput Send Events Mode Enabled Default (296):	0, 0
	Device Node (297):	"/dev/input/event5"
	Device Product ID (298):	1267, 12615
	libinput Drag Lock Buttons (325):	<no items>
	libinput Horizontal Scroll Enabled (326):	1
	libinput Scrolling Pixel Distance (327):	15
	libinput Scrolling Pixel Distance Default (328):	15
	libinput High Resolution Wheel Scroll Enabled (329):	1

➜  ~ xinput list-props 10
Device 'DELL0A7A:00 04F3:3147 Touchpad':
	Device Enabled (170):	1
	Coordinate Transformation Matrix (172):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Tapping Enabled (330):	1
	libinput Tapping Enabled Default (331):	0
	libinput Tapping Drag Enabled (332):	1
	libinput Tapping Drag Enabled Default (333):	1
	libinput Tapping Drag Lock Enabled (334):	0
	libinput Tapping Drag Lock Enabled Default (335):	0
	libinput Tapping Button Mapping Enabled (336):	1, 0
	libinput Tapping Button Mapping Default (337):	1, 0
	libinput Natural Scrolling Enabled (309):	1
	libinput Natural Scrolling Enabled Default (310):	0
	libinput Disable While Typing Enabled (338):	1
	libinput Disable While Typing Enabled Default (339):	1
	libinput Scroll Methods Available (311):	1, 1, 0
	libinput Scroll Method Enabled (312):	1, 0, 0
	libinput Scroll Method Enabled Default (313):	1, 0, 0
	libinput Click Methods Available (340):	1, 1
	libinput Click Method Enabled (341):	0, 1
	libinput Click Method Enabled Default (342):	1, 0
	libinput Middle Emulation Enabled (343):	0
	libinput Middle Emulation Enabled Default (344):	0
	libinput Accel Speed (318):	0.000000
	libinput Accel Speed Default (319):	0.000000
	libinput Accel Profiles Available (320):	1, 1
	libinput Accel Profile Enabled (321):	1, 0
	libinput Accel Profile Enabled Default (322):	1, 0
	libinput Left Handed Enabled (323):	0
	libinput Left Handed Enabled Default (324):	0
	libinput Send Events Modes Available (294):	1, 1
	libinput Send Events Mode Enabled (295):	0, 0
	libinput Send Events Mode Enabled Default (296):	0, 0
	Device Node (297):	"/dev/input/event9"
	Device Product ID (298):	1267, 12615
	libinput Drag Lock Buttons (325):	<no items>
	libinput Horizontal Scroll Enabled (326):	1
	libinput Scrolling Pixel Distance (327):	15
	libinput Scrolling Pixel Distance Default (328):	15
	libinput High Resolution Wheel Scroll Enabled (329):	1

➜  ~ xinput list-props 13
Device 'ETPS/2 Elantech Touchpad':
	Device Enabled (170):	1
	Coordinate Transformation Matrix (172):	1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
	libinput Tapping Enabled (330):	1
	libinput Tapping Enabled Default (331):	0
	libinput Tapping Drag Enabled (332):	1
	libinput Tapping Drag Enabled Default (333):	1
	libinput Tapping Drag Lock Enabled (334):	0
	libinput Tapping Drag Lock Enabled Default (335):	0
	libinput Tapping Button Mapping Enabled (336):	1, 0
	libinput Tapping Button Mapping Default (337):	1, 0
	libinput Natural Scrolling Enabled (309):	1
	libinput Natural Scrolling Enabled Default (310):	0
	libinput Disable While Typing Enabled (338):	1
	libinput Disable While Typing Enabled Default (339):	1
	libinput Scroll Methods Available (311):	1, 1, 0
	libinput Scroll Method Enabled (312):	1, 0, 0
	libinput Scroll Method Enabled Default (313):	1, 0, 0
	libinput Click Methods Available (340):	1, 1
	libinput Click Method Enabled (341):	0, 1
	libinput Click Method Enabled Default (342):	1, 0
	libinput Middle Emulation Enabled (343):	0
	libinput Middle Emulation Enabled Default (344):	0
	libinput Accel Speed (318):	0.000000
	libinput Accel Speed Default (319):	0.000000
	libinput Accel Profiles Available (320):	1, 1
	libinput Accel Profile Enabled (321):	1, 0
	libinput Accel Profile Enabled Default (322):	1, 0
	libinput Left Handed Enabled (323):	0
	libinput Left Handed Enabled Default (324):	0
	libinput Send Events Modes Available (294):	1, 1
	libinput Send Events Mode Enabled (295):	0, 0
	libinput Send Events Mode Enabled Default (296):	0, 0
	Device Node (297):	"/dev/input/event7"
	Device Product ID (298):	2, 14
	libinput Drag Lock Buttons (325):	<no items>
	libinput Horizontal Scroll Enabled (326):	1
	libinput Scrolling Pixel Distance (327):	15
	libinput Scrolling Pixel Distance Default (328):	15
	libinput High Resolution Wheel Scroll Enabled (329):	1

@mary-ext
Copy link

mary-ext commented Nov 9, 2024

Came here to say that I've been having this frustrating issue, one that's been stopping me from at least trying to daily-drive Zed.

It only happens with touchpad, does not happen with mouse, and I don't have any special input configuration. Reproduction is exactly the same, click on something by tapping on the touchpad, and then hold Ctrl after releasing from touchpad.

Zed: v0.161.1 (Zed Preview)
OS: Linux Wayland arch unknown
Memory: 14.9 GiB
Architecture: x86_64
GPU: AMD Radeon 780M (RADV GFX1103_R1) || radv || Mesa 24.3.0-devel (git-5b3f7de99f)

Is there any way to get the sort of debug info ala xinput when using Wayland?

@mary-ext
Copy link

mary-ext commented Nov 10, 2024

Is it possible that my touchpad is sending repeated tap events and holding Ctrl just so happened to coincide with those subsequent events?

@smoores-dev
Copy link

I've been experiencing this as well on my Framework laptop. I suspect that it's actually #12752, but the trackpad or OS is simply sending a delayed mouseup, resulting in a more frustrating user experience. As evidence, my proposed changes in #22988 seem to completely resolve this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
linux mouse interaction Feedback for mouse interaction states, actions, etc support User support (non-defect troubleshooting, documentation, etc)
Projects
None yet
Development

No branches or pull requests

4 participants