Skip to content

Show context menu with long press #2517

@lokman2k5

Description

@lokman2k5

What Happened?

Finger long press in files(on empty area or on any file) does not show the context menu. Happens in X11 and Wayland.

Steps to Reproduce

Long press in files

Expected Behavior

Context menu appearing

OS Version

8.x (Circe)

Session Type

Classic Session (X11, This is the default)

Software Version

Latest release (I have run all updates)

Log Output

No response

Hardware Info

Thinkpad X1 Yoga Gen3

Activity

changed the title [-]Context menus do not work with touch[/-] [+]Show context menu with long press[/+] on Dec 4, 2024
jeremypw

jeremypw commented on Dec 4, 2024

@jeremypw
Collaborator

I don't think Files itself was ever long press aware so I have changed this to a feature request. However, if you want this to work globally, there is a setting in System Settings/Mouse & Touchpad/Clicking - "Long press secondary click" that should accomplish the desired behaviour. Have you tried this?

jeremypw

jeremypw commented on Dec 4, 2024

@jeremypw
Collaborator

I notice that the on my machine, the above-mentioned setting works with mouse clicks but only sometimes works with a single touchpad press. With the touchpad I have to do a long double-press i.e. two presses in quick succession with the second one held down. Not sure if this is a hardware/driver/upstream issue or can be fixed by changes to elementaryos code. Either way, it is not a Files issue unless you want this behaviour only to apply to Files.

jeremypw

jeremypw commented on Dec 4, 2024

@jeremypw
Collaborator

In the same settings plug, in the touchpad section, you can also set a two-finger normal touch pad press to be equivalent to a secondary click (and therefore show the context menu).

lokman2k5

lokman2k5 commented on Dec 5, 2024

@lokman2k5
Author

I thought I mentioned it, but I am talking about a long press on a touchscreen. Will those settings work for touchscreen as well?

jeremypw

jeremypw commented on Dec 5, 2024

@jeremypw
Collaborator

@lokman2k5 Touchscreens and touchpads have different technology and drivers and are distinguishable by the software but I am not sure if there is much logical difference. They should both be able to generate click, double-click, long-press, pinch, zoom, swipe gestures but the exact capabilities (like how many simultaneous touches are distinguishable) may depend on the hardware. Touchpads may have additional capabilities like having different areas behave differently that would not be appropriate for a touch screen. I use a touchpad but I believe some elementaryos developers use a touchscreen.

If an option does not work for you please file an issue with the details of the hardware you are using, I guess initially in the switchboard-plug-mouse-touchpad project. The software should detect what capabilities your device has and not offer options it cannot do.

danirabbit

danirabbit commented on Dec 5, 2024

@danirabbit
Member

I think the long-press secondary click option is meant only as an accessibility feature for mice. We do support GTK's long-press gesture in the navigation buttons for example. I think we should probably use the long press gesture anywhere we have a secondary click gesture

jeremypw

jeremypw commented on Dec 5, 2024

@jeremypw
Collaborator

@danirabbit I read the settings plug to mean "Long press single click == secondary click" - is that what is intended? Because on my hardware I have to use a "Long press double click" where the second press is the long one. Do we have to implement long-press single click == secondary-click in each app?

added
AccessibilityAffecting usability for differently abled users
Priority: Mediume.g. Unwanted behaviour, major cosmetic issues
on Jun 8, 2025
jeremypw

jeremypw commented on Jun 8, 2025

@jeremypw
Collaborator

It looks like in Gtk4 at least we will have to handle this explicitly with Gtk.LongPressGesture event controller rather than rely on the system to translate a long press/touch event into a "secondary-click" event. Is there any need to be able to turn this off? I can't see it interfering with "normal" operation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    AccessibilityAffecting usability for differently abled usersPriority: Mediume.g. Unwanted behaviour, major cosmetic issues

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @danirabbit@jeremypw@lokman2k5

        Issue actions

          Show context menu with long press · Issue #2517 · elementary/files