feat: add configurable touchpad gestures - #2838
Open
abhighansala wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Configurable Touchpad Gestures
This change adds the compositor-side foundation for configurable touchpad gestures in COSMIC.
What changed
Added a configurable
TouchpadGesturesstructure tocosmic-comp-config.Added separate gesture configurations for 3-finger and 4-finger swipes.
Added configurable actions for:
App Library
Workspace Overview
Previous Workspace
Next Workspace
Window Switcher
Window Switcher Previous
None
Updated gesture handling in
cosmic-compto resolve actions from the configured finger count and swipe direction.Added 3-finger gesture support:
Swipe Up → App Library
Swipe Left → Window Switcher Previous
Swipe Right → Window Switcher
Preserved the existing 4-finger workspace and Workspace Overview behavior.
Added App Library surface detection alongside the existing Workspace Overview detection.
Reused the existing COSMIC system actions for Window Switching, App Library, and Workspace Overview instead of implementing duplicate functionality.
Added layout-aware defaults so existing horizontal and vertical workspace behavior remains compatible.
Changed gesture capture so all gestures with 3 or more fingers are tracked by the compositor.
Default gesture mapping
Gesture | Default action -- | -- 3-finger Up | App Library 3-finger Down | None 3-finger Left | Window Switcher Previous 3-finger Right | Window Switcher 4-finger Up | Workspace Overview 4-finger Down | Workspace Overview 4-finger Left | Previous Workspace 4-finger Right | Next WorkspaceThe
cosmic-settingsUI for editing these mappings will be implemented separately.Verification
The changes were verified with:
All checks completed successfully.