Skip to main content

Mouse keys

To enable mouse cursor and/or mouse buttons control from the keyboard add this module to list:

from kmk.modules.mouse_keys import MouseKeys


KC.MB_LMBLeft mouse button
KC.MB_RMBRight mouse button
KC.MB_MMBMiddle mouse button
KC.MB_BTN4mouse button 4
KC.MB_BTN5mouse button 5
KC.MW_UPMouse wheel up
KC.MW_DOWN, KC.MW_DNMouse wheel down
KC.MW_LEFT, KC.MW_LTMouse pan left
KC.MW_RIGHT, KC.MW_RTMouse pan right
KC.MS_UPMove mouse cursor up
KC.MS_DOWN, KC.MS_DNMove mouse cursor down
KC.MS_LEFT, KC.MS_LTMove mouse cursor left
KC.MS_RIGHT, KC.MS_RTMove mouse cursor right

Note: Support for panning (mouse wheel left/right) has to be explicitly enabled in with the bootcfg module.