# Example gestures :::{important} Read [](/getting-started/introduction) first before complaining that these do not work. ::: ## Mouse
Right + Draw circle clockwise - Close window ```yaml - type: stroke strokes: [ 'OAMAAUkEBRZZEgwkYCARMmA6GUBSViRPQGMrYyNkNLAOVT3DAzhH0AUdUOkYC1j2OQBkAA==' ] mouse_buttons: [ right ] actions: - plasma_shortcut: kwin,Window Close ```
Meta + Wheel - Volume control ```yaml - type: wheel direction: up_down conditions: - $keyboard_modifiers == meta actions: - on: update interval: '+' input: - keyboard: [ volumedown ] - on: update interval: '-' input: - keyboard: [ volumeup ] ```
Extra7/Extra8 - Volume control (repeats if held) ```yaml _anchors: - &repeat_delay 250 - &repeat_interval 50 mouse: gestures: - type: press mouse_buttons: [ extra8 ] instant: true actions: - on: begin input: - keyboard: [ volumedown ] - on: update threshold: *repeat_delay interval: *repeat_interval input: - keyboard: [ volumedown ] - type: press mouse_buttons: [ extra7 ] instant: true actions: - on: begin input: - keyboard: [ volumeup ] - on: update threshold: *repeat_delay interval: *repeat_interval input: - keyboard: [ volumeup ] ```
Meta + Left/Right - Go back/forward ```yaml - type: press mouse_buttons: [ left ] instant: true conditions: - $keyboard_modifiers == meta actions: - on: begin input: - mouse: [ back ] - type: press mouse_buttons: [ right ] instant: true conditions: - $keyboard_modifiers == meta actions: - on: begin input: - mouse: [ forward ] ```
Meta + Left + Swipe up/down - Home/End ```yaml - type: swipe direction: up mouse_buttons: [ left ] conditions: - $keyboard_modifiers == meta actions: - on: begin input: - keyboard: [ leftctrl+home ] - type: swipe direction: down mouse_buttons: [ left ] conditions: - $keyboard_modifiers == meta actions: - on: begin input: - keyboard: [ leftctrl+end ] ```
Left click top left corner - Open dolphin ```yaml - type: press mouse_buttons: [ left ] instant: true conditions: - $pointer_position_screen_percentage <= 0.01,0.01 actions: - on: begin command: dolphin ```
Middle click top edge - Maximize window ```yaml - type: press mouse_buttons: [ middle ] instant: true conditions: - $pointer_position_screen_percentage_y <= 0.01 actions: - on: begin plasma_shortcut: kwin,Window Maximize ```
Right + Swipe down - Minimize window under cursor ```yaml - type: swipe direction: down mouse_buttons: [ right ] actions: - command: kdotool windowminimize $window_under_id ```
## Touchpad
Swipe 3 - Window drag Swipe gestures have a different acceleration profile. You can change *Device.delta_multiplier* to make the gesture faster or slower. ```yaml - type: swipe fingers: 3 direction: any actions: - on: begin input: - keyboard: [ +leftmeta ] - mouse: [ +left ] - on: update input: - mouse: [ move_by_delta ] - on: end_cancel input: - keyboard: [ -leftmeta ] - mouse: [ -left ] ```
Swipe 3 left/right - Go back/forward ```yaml - type: swipe fingers: 3 direction: left actions: - on: begin input: - mouse: [ back ] - type: swipe fingers: 3 direction: right actions: - on: begin input: - mouse: [ forward ] ```
Rotate 2 - Volume control ```yaml - type: rotate fingers: 2 direction: any actions: - on: update interval: -10 input: - keyboard: [ volumedown ] - on: update interval: 10 input: - keyboard: [ volumeup ] ```
Swipe 4 left/right - Switch window Swipe slow - Switch window
Swipe fast - Open alt+tab switcher ```yaml - type: swipe fingers: 4 direction: left_right speed: fast actions: - on: begin input: - keyboard: [ +leftalt, tab ] - on: update interval: -75 input: - keyboard: [ leftshift+tab ] - on: update interval: 75 input: - keyboard: [ tab ] - on: end_cancel input: - keyboard: [ -leftalt ] # Quick window switching (left) - type: swipe fingers: 4 direction: left speed: slow actions: - on: begin input: - keyboard: [ leftalt+leftshift+tab ] # Quick window switching (right) - type: swipe fingers: 4 direction: right speed: slow actions: - on: begin input: - keyboard: [ leftalt+tab ] ```
Swipe 4 down - Exit fullscreen/Unmaximize/Minimize ```yaml - type: swipe fingers: 4 direction: down actions: - on: begin one: - plasma_shortcut: kwin,Window Fullscreen conditions: - $window_fullscreen == true - plasma_shortcut: kwin,Window Maximize conditions: - $window_maximized == true - plasma_shortcut: kwin,Window Minimize ```
From this point onwards gestures will only have placeholder actions.
Tip tap Place one finger in the middle then another one on the left/right. The gesture will not trigger if the second finger is removed too quickly. ```yaml - type: press fingers: 2 conditions: - $finger_1_position_percentage_x between 0.4;0.6 - $finger_2_position_percentage_x < 0.5 actions: - on: begin input: - keyboard: [ a ] - type: press fingers: 2 conditions: - $finger_1_position_percentage_x between 0.4;0.6 - $finger_2_position_percentage_x > 0.5 actions: - on: begin input: - keyboard: [ b ] ```
Swipe up from bottom edge ```yaml - type: swipe fingers: 3 direction: up conditions: - $finger_1_position_percentage_y >= 0.8 actions: - on: begin input: - keyboard: [ a ] ```