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

Wayland - Ctrl + Click Gesture Does Not Work Anywhere #1

Open
ilikenwf opened this issue Dec 2, 2023 · 15 comments · May be fixed by linuxmint/muffin#710
Open

Wayland - Ctrl + Click Gesture Does Not Work Anywhere #1

ilikenwf opened this issue Dec 2, 2023 · 15 comments · May be fixed by linuxmint/muffin#710

Comments

@ilikenwf
Copy link

ilikenwf commented Dec 2, 2023

Distribution

Archlinux

Package version

6.0

Graphics hardware in use

Intel + Nvidia Optimus

Frequency

Always

Bug description

When testing with the Wayland integration, I notice that I can no longer use mouse gestures that include the use of the left control...I am unsure if this translates to other keys.

Steps to reproduce

Open a browser or other application that has a use for ctrl + click, such as opening a new tab...try it and it won't work.

Expected behavior

A new tab would open in firefox or chromium. Instead, it opens in the current tab because left control does nothing as a modifier when using the mouse.

Additional information

No response

@rcalixte rcalixte transferred this issue from linuxmint/cinnamon Dec 2, 2023
@Gr3q
Copy link

Gr3q commented Dec 4, 2023

Maybe related, Nemo Shift+Click or Ctrl+Click doesn't work either.

@ENRORMA
Copy link

ENRORMA commented Jan 13, 2024

linux mint 21.3
cinnamon 6.0.4
nemo 6.0.2
kernel 5.15.0-91-generic

I have the same problem, Shift and Ctrl only work when writing text, if im in a game or in nemo they dont do anything.
My Alt key also doesnt work

@dzaima
Copy link

dzaima commented Jan 14, 2024

Seems like key-down events aren't sent for shift/ctrl/alt. Key-up events for them are however.

@ecnepsnai
Copy link

ecnepsnai commented Feb 7, 2024

Fedora 39 with cinnamon 6.0.4, same problem - affects all applications as far as I can tell

@teodly
Copy link

teodly commented Mar 2, 2024

If you press Ctrl having different window focused, and then click within the desired window, it works.

Fedora 39 with Cinnamon 6.0.4

@MisterFlames
Copy link

linux mint 21.3 cinnamon 6.0.4 nemo 6.0.2 kernel 5.15.0-91-generic

I have the same problem, Shift and Ctrl only work when writing text, if im in a game or in nemo they dont do anything. My Alt key also doesnt work

Also have the same issue when running applications such as games. Pressing Shift key does nothing.

Linux mint 21.3
Cinnamon 6.0.4
Kernel 6.5.0-28-generic

@WerIstLuka
Copy link

i just tried cinnamon 6.4.0 on arch linux and this still doesnt work
is it going to be fixed by 22.1?

@stellarkookies
Copy link

i just tried cinnamon 6.4.0 on arch linux and this still doesnt work is it going to be fixed by 22.1?

so far, that doesn't seem to be the case; this bug is still present in the 22.1 beta...

@ilikenwf
Copy link
Author

ilikenwf commented Jan 3, 2025

So interestingly, if you do CTRL+Shift+Click it works so this may be some simple keymap issue?

@WerIstLuka
Copy link

thats interesting
i tried it out and found out that the order of the keys matters

ctrl+shift+click = ctrl+click
shift+ctrl+click = shift+click

the second key can also be alt

@ilikenwf
Copy link
Author

ilikenwf commented Jan 3, 2025

Surely this is something that can be programmed around...

@WerIstLuka
Copy link

yeah, i would try to do it myself but i don't know if this is inside cinnamon or muffin
it would take days to go through all the code

@xmvziron
Copy link

xmvziron commented Jan 8, 2025

I am having the same issue, on Linux Mint 22.0, but I'm confident that I have identified the cause and here are my steps of logic:

  • This seemingly happens only with Wine/Proton. I haven't found a native application that has this issue, but I could be wrong. (EDIT: see below)
  • Running xev shows that no KeyPress or KeyRelease events are received for the Ctrl, Shift or Alt keys. This would suggest that pressing those keys would not work on their own, as in without another key. As a test, I started Kerbal Space Program (a native Linux game) which I know utilizes the Shift key, and pressing it did not work. This output from xev running in Xorg:
KeyPress event, serial 38, synthetic NO, window 0x3c00001,
    root 0x5f6, subw 0x0, time 150024652, (110,84), root:(160,628),
    state 0x0, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 38, synthetic NO, window 0x3c00001,
    root 0x5f6, subw 0x0, time 150024788, (110,84), root:(160,628),
    state 0x1, keycode 50 (keysym 0xffe1, Shift_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False
  • Running a Wine application with WINEDEBUG=msg (debug window messages) shows differing results depending on the driver: with the X11 driver it gets no events for the Ctrl, Shift key. With the Wayland driver, only WM_KEYUP messages are sent.
  • Running ANY Wayland application (native or otherwise) with WAYLAND_DEBUG=1 shows that the compositor is only sending key up messages, no key down messages.

Consider this output from Weston, when I press the Shift key:

[2660826.628] [email protected](1130, 141435685, 42, 1)
[2660827.030] [email protected](1130, 1, 0, 0, 0)
[2660922.626] [email protected](1131, 141435781, 42, 0)
[2660922.961] [email protected](1131, 0, 0, 0, 0)

And this output with Muffin (Cinnamon):

[2446976.281] [email protected](3049, 1, 0, 0, 0)
[2446976.388] [email protected](3050, 141221834, 42, 0)
[2446976.436] [email protected](3051, 0, 0, 0, 0)

The last parameter of this event is the keystate, 1 being pressed (key down) and 0 being released (key up). (Source) As you can see, there is a key down event missing. This does not happen with normal keys, only the modifier keys. Xwayland, GTK and Qt applications don't seem to mind this, but it seems Wine does. I suspect this is due to how Wine's input model differs from X11 and Wayland.

EDIT: more info

EDIT 2: I have found the cause of this bug and I've made a pull request to fix it.

xmvziron added a commit to xmvziron/muffin that referenced this issue Jan 9, 2025
Presently, Muffin sends key-up events for modifier keys but no key-down
event. This breaks applications that use a modifier key standalone, such
as the Shift-click functionality in browsers, games which use modifier
keys seperately, and Wine, where modifiers are rendered completely
non-functional due to how its input model works. This commit fixes
those issues.

Closes: linuxmint/wayland#1
@WerIstLuka
Copy link

works fine just like on x11 with the fix
i tested it on mint 22.0 in a vm

@ferreusveritas
Copy link

Just tested this with the fix on mint 22.0 with wayland experimental. Seemed to do the trick. Blender shift/ctrl key works as expected. Steam games (Enshrouded) also works perfectly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.