Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • xserver xserver
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 886
    • Issues 886
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 106
    • Merge requests 106
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • xorg
  • xserverxserver
  • Merge requests
  • !239
The source project of this merge request has been removed.

XQuartz: translate additional mouse buttons

Merged Christopher Chavez requested to merge (removed):xquartz-buttons into master Jul 22, 2019
  • Overview 4
  • Changes 1

Old behavior was to translate the middle mouse button, as well as every other button that isn't the left or right mouse button, to act as the middle mouse button (2).

New behavior is to translate only the middle mouse button to 2, and translate higher-numbered buttons to 8 and higher. This allows additional mouse buttons to behave under XQuartz more like they do by default under X11 on other platforms (e.g. Linux and BSD distributions).

Signed-off-by: Christopher Chavez chrischavez@gmx.us


I have tested this change as a patch on top of xorg-server 1.20.5 from MacPorts. In addition to testing a USB mouse with 4th and 5th shoulder buttons, I used Karabiner-Elements to simulate clicks from different mouse buttons. I used xev and Tcl/Tk to verify that the button number seen by XQuartz programs is correct.

One thing I am not sure how to handle, or whether needs to be handled, is the maximum number of buttons that may be translated this way. With Karabiner-Elements, it can generate up to AppKit button 32 (presumably this is the highest number mouse button in AppKit), but AppKit button 31 is the highest recognized (translated to button 35); generating button 32 seems to be silently ignored (and does not appear cause any warnings, errors, or crashes).

Note that buttons repurposed by the user, such as being configured in System Preferences to invoke Exposé/Mission Control, will have no effect in XQuartz.

Edited Jul 27, 2019 by Christopher Chavez
Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: xquartz-buttons