Remap mouse buttons
Author: WilliamCappellettiCreated Feb 28, 2022Updated Sep 7, 2026
Problem
Is there a way to remap mouse buttons M4 and M5 (forward and backward)? In particular, I would like to move across workspaces with
ctrl - M4 : skhd -k "ctrl - left"
ctrl - M5 : skhd -k "ctrl - right"I could not find the keycodes for any mouse button, and it seems that mices do not actually send normal keyboard strokes. Are they implemented in skhd? In case, there is no mention in #1.
Source: asmvik/skhd