Skip to content

Instantly share code, notes, and snippets.

@danhab99
Created January 21, 2022 03:32
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danhab99/050d68eea261da1374807c79ac63bfde to your computer and use it in GitHub Desktop.
Save danhab99/050d68eea261da1374807c79ac63bfde to your computer and use it in GitHub Desktop.
I3 keybindings for moving the mouse

I3 Keybindings For Moving The Mouse

This is really just meant to be goofy, noone should use this instead of a mouse.

Installation

Add these lines to your i3 config.

bindsym $mod+Mod1+h exec xdotool mousemove_relative -p 270 10
bindsym $mod+Mod1+l exec xdotool mousemove_relative -p 90 10
bindsym $mod+Mod1+k exec xdotool mousemove_relative -p 0 10
bindsym $mod+Mod1+j exec xdotool mousemove_relative -p 180 10

bindsym $mod+Shift+Mod1+h exec xdotool mousemove_relative -p 270 100
bindsym $mod+Shift+Mod1+l exec xdotool mousemove_relative -p 90 100
bindsym $mod+Shift+Mod1+k exec xdotool mousemove_relative -p 0 100
bindsym $mod+Shift+Mod1+j exec xdotool mousemove_relative -p 180 100

bindsym $mod+Mod1+c exec xdotool mousedown 1 && xdotool mouseup 1

Requires i3wm

Usage Instructions

Use your left 3rd & 4th fingers to hold down the windows key and alt.

  • Now your hjkl are arrow keys that move the mouse by 10px steps
  • Use your left pinky to press shift to go fast (100px steps)
  • Press c with your left index finger for left click.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment