Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 18, 2026

Implements 3-finger swipe up/down on mobile mousepad to trigger the "show all apps" view on desktop.

Protocol Extension

  • Added ThreeFingerSwipe action (code 10) with SwipeDirection enum (Up=0, Down=1)
  • Binary format: [10, direction]

Backend (Rust)

actions.rs:

  • New action type with decoding logic and unit tests
  • Safe fallback to Up for invalid direction values

mobile_controller.rs:

  • Handler triggers existing AltTab key combo (Super on Linux, Win+Tab on Windows, Control+Up on macOS)
  • Both directions show the same apps overview

Frontend (Dart)

input.dart:

  • Encoding functions: threeFingerSwipeUp() / threeFingerSwipeDown()

mousepad.dart:

  • 3-finger detection via GestureDetector.onScaleStart (pointerCount == 3)
  • Velocity-based direction detection in onScaleEnd (threshold: 100 px/s vertical)
  • Cancels drag mode timer when 3 fingers detected
void _handleScaleEnd(ScaleEndDetails details) {
  if (isThreeFingerSwipe) {
    final dy = details.velocity.pixelsPerSecond.dy;
    if (dy.abs() > 100) {
      ServerConnector.sendInput(
        dy < 0 ? Input.threeFingerSwipeUp() : Input.threeFingerSwipeDown()
      );
    }
  }
}
Original prompt

This section details on the original issue you should resolve

<issue_title>Mousepad swipes</issue_title>
<issue_description>Add mousepad swipe functionality:

  • 3 finger swipe up/down - same as the alt tab shortcut - should show all opened apps
  • 2 finger swipe left: go back
  • 2 finger swipe right: go right
  • pinch: zoom or fullscreen
  • 2 finger touch - same as right mouse button</issue_description>

<agent_instructions>Implement only the 3 finger swipe up / down feature</agent_instructions>

Comments on the Issue (you are @copilot in this section)


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits January 18, 2026 12:53
Co-authored-by: PropzSaladaz <99143417+PropzSaladaz@users.noreply.github.com>
…comments

Co-authored-by: PropzSaladaz <99143417+PropzSaladaz@users.noreply.github.com>
Copilot AI changed the title [WIP] Add three finger swipe up/down functionality Add 3-finger swipe gesture for Alt-Tab functionality Jan 18, 2026
Copilot AI requested a review from PropzSaladaz January 18, 2026 13:00
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 this pull request may close these issues.

Mousepad swipes

2 participants