Skip to main content
MangoWCMangoWC
Bindings & Input

Key Bindings

Define keyboard shortcuts and modes.

Syntax

Key bindings follow this format:

bind[flags]=MODIFIERS,KEY,COMMAND,PARAMETERS
  • Modifiers: SUPER, CTRL, ALT, SHIFT, NONE (combine with +).
  • Key: Key name (from xev or wev) or code (e.g., code:24 for q).

Flags

  • l: Works even when screen is locked.
  • s: Uses keysym instead of keycode.
  • r: Triggers on key release instead of press.
  • p: Pass key event to client.

Examples:

bind=SUPER,Q,killclient
bindl=SUPER,L,spawn,swaylock

Key Modes (Submaps)

You can create modal keybindings (like resize mode in Sway).

# Enter 'resize' mode
bind=ALT,R,setkeymode,resize

keymode=resize
bind=NONE,Left,resizewin,-10,0
bind=NONE,Escape,setkeymode,default

Dispatchers List

Window Management

CommandParamDescription
killclient-Close the focused window.
togglefloating-Toggle floating state.
togglefullscreen-Toggle fullscreen.
togglefakefullscreen-Toggle "fake" fullscreen (remains constrained).
togglemaximizescreen-Maximize window (keep decoration/bar).
toggleglobal-Pin window to all tags.
toggle_render_border-Toggle border rendering.
centerwin-Center the floating window.
minimized-Minimize window to scratchpad.
restore_minimized-Restore window from scratchpad.
toggle_scratchpad-Toggle scratchpad.
toggle_name_scratchpad(appid,title,width,height,cmd)Toggle named scratchpad.

Focus & Movement

CommandParamDescription
focusdirleft/right/up/downFocus window in direction (left, right, up, down).
focusstacknext/prevCycle focus within the stack.
focuslast-Focus the previously active window.
exchange_clientleft/right/up/downSwap window with neighbor in direction.
exchange_stack_clientnext/prevExchange window position in stack.
zoom-Swap focused window with Master.

Tags & Monitors

CommandParamDescription
view1-9 or maskView tag or mask (e.g., 1|3|5).
viewtoleft-View previous tag.
viewtoright-View next tag.
viewtoleft_have_client-View left tag and focus client if present.
viewtoright_have_client-View right tag and focus client if present.
viewcrossmontag,monitorView specified tag on specified monitor.
tag1-9Move window to tag.
tagtoleft-Move window to left tag.
tagtoright-Move window to right tag.
tagcrossmontag,monitorMove window to specified tag on specified monitor.
toggletag0-9Toggle tag on window (0 means all tags).
toggleview1-9Toggle tag view.
comboview1-9View multi tags pressed simultaneously.
focusmonleft/right/up/down/[monitorName]Focus monitor. monitorName is the monitor name string.
tagmonleft/right/up/down/[monitorName],[keeptag]Move window to monitor. keeptag is 0 or 1.

Layouts

CommandParamDescription
setlayoutnameSwitch to layout (e.g., scroller, tile).
switch_layout-Cycle through available layouts.
incnmaster+1/-1Increase/Decrease number of master windows.
setmfact+0.05Increase/Decrease master area size.
set_proportionfloatSet scroller window proportion (0.0-1.0).
switch_proportion_preset-Cycle proportion presets of scroller window.
scroller_stackleft/rightMove window inside/outside scroller stack.
incgaps+/-valueAdjust gap size.
togglegaps-Toggle gaps.

System

CommandParamDescription
spawncmdExecute a command.
spawn_shellcmdExecute shell command (supports pipes |).
spawn_on_emptycmd,tagnumberOpen command on empty tag.
reload_config-Hot-reload configuration.
quit-Exit MangoWC.
toggleoverview-Toggle overview mode.
create_virtual_output-Create a headless monitor (for VNC/Sunshine).
destroy_all_virtual_output-Destroy all virtual monitors.
toggle_trackpad_enable-Toggle trackpad enable.
setkeymodemodeSet keymode.
switch_keyboard_layout[index]Switch keyboard layout. Optional index (0, 1, 2...) to switch to specific layout.
setoptionkey,valueSet config option temporarily.
disable_monitormonitor_nameShutdown monitor.
enable_monitormonitor_nameOpen monitor.
toggle_monitormonitor_nameToggle monitor power.

Media Controls

Requires: brightnessctl

bind=NONE,XF86MonBrightnessUp,spawn,brightnessctl s +2%
bind=SHIFT,XF86MonBrightnessUp,spawn,brightnessctl s 100%
bind=NONE,XF86MonBrightnessDown,spawn,brightnessctl s 2%-
bind=SHIFT,XF86MonBrightnessDown,spawn,brightnessctl s 1%

Requires: wpctl (WirePlumber)

bind=NONE,XF86AudioRaiseVolume,spawn,wpctl set-volume @DEFAULT_SINK@ 5%+
bind=NONE,XF86AudioLowerVolume,spawn,wpctl set-volume @DEFAULT_SINK@ 5%-
bind=NONE,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_SINK@ toggle
bind=SHIFT,XF86AudioMute,spawn,wpctl set-mute @DEFAULT_SOURCE@ toggle

Some keyboards don't send standard media keys. Run wev and press your key to check.

Floating Window Movement

CommandParamDescription
smartmovewinleft/right/up/downMove floating window by snap distance.
smartresizewinleft/right/up/downResize floating window by snap distance.
movewin(x,y)Move floating window.
resizewin(width,height)Resize window.

On this page