Skip to main content
MangoWCMangoWC
Bindings & Input

Mouse & Gestures

Configure mouse buttons, scrolling, gestures, and lid switches.

Assign actions to mouse button presses with optional modifier keys.

Syntax

mousebind=MODIFIERS,BUTTON,COMMAND,PARAMETERS
  • Modifiers: SUPER, CTRL, ALT, SHIFT, NONE. Combine with + (e.g., SUPER+CTRL)
  • Buttons: btn_left, btn_right, btn_middle, btn_side, btn_extra, btn_forward, btn_back, btn_task

NONE Modifier Behavior

When modifiers are set to NONE:

  • Only btn_middle works in normal mode
  • btn_left and btn_right only work in overview mode

Examples

# Window manipulation
mousebind=SUPER,btn_left,moveresize,curmove
mousebind=SUPER,btn_right,moveresize,curresize
mousebind=SUPER+CTRL,btn_right,killclient

# Overview mode (requires NONE modifier)
mousebind=NONE,btn_left,toggleoverview,-1
mousebind=NONE,btn_right,killclient,0
mousebind=NONE,btn_middle,togglemaximizescreen,0

Map scroll wheel movements to actions for workspace and window navigation.

Syntax

axisbind=MODIFIERS,DIRECTION,COMMAND,PARAMETERS
  • Direction: UP, DOWN, LEFT, RIGHT

Examples

axisbind=SUPER,UP,viewtoleft_have_client
axisbind=SUPER,DOWN,viewtoright_have_client

Enable touchpad swipe gestures for navigation and window management.

Syntax

gesturebind=MODIFIERS,DIRECTION,FINGERS,COMMAND,PARAMETERS
  • Direction: up, down, left, right
  • Fingers: 3 or 4

Touchpad Setup Required

Gestures require proper touchpad configuration. See Input Devices for touchpad settings like tap_to_click and disable_while_typing.

Examples

# 3-finger: Window focus
gesturebind=none,left,3,focusdir,left
gesturebind=none,right,3,focusdir,right
gesturebind=none,up,3,focusdir,up
gesturebind=none,down,3,focusdir,down

# 4-finger: Workspace navigation
gesturebind=none,left,4,viewtoleft_have_client
gesturebind=none,right,4,viewtoright_have_client
gesturebind=none,up,4,toggleoverview
gesturebind=none,down,4,toggleovervie

Trigger actions on hardware events like laptop lid open/close.

Syntax

switchbind=FOLD_STATE,COMMAND,PARAMETERS
  • Fold State: fold (lid closed), unfold (lid opened)

System Configuration Required

Disable system lid handling in /etc/systemd/logind.conf:

HandleLidSwitch=ignore
HandleLidSwitchExternalPower=ignore  
HandleLidSwitchDocked=ignore

Examples

switchbind=fold,spawn,swaylock -f -c 000000
switchbind=unfold,spawn,wlr-dpms on

On this page