Skip to content

ullasrr/Custom_mouse_Shortcut_Linux

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Repository files navigation

Mouse Shortcuts

Linux kernel module + userspace daemon for custom mouse button shortcuts.

Features

  • Volume control with mouse buttons
  • Copy/paste by holding buttons
  • Screenshots with left+right click hold
  • Toggle mute
  • Launch applications

Requirements

sudo apt-get install build-essential linux-headers-$(uname -r) \
    wl-clipboard grim pulseaudio-utils xdotool

Installation

Build kernel module:

make
sudo insmod mouse_shortcut.ko

Build userspace daemon:

gcc -o mouse_shortcut_user mouse_shortcut_user.c -lrt

Run:

./mouse_shortcut_user 275 276 1.5 1.0 firefox
# Arguments: volume_up_btn volume_down_btn copy_hold_sec screenshot_hold_sec app

Find Your Mouse IDs

lsusb | grep -i mouse
# Use vendor/product IDs: sudo insmod mouse_shortcut.ko vendor_id=0x1234 product_id=0x5678

Actions

  • Volume Up/Down: Press configured buttons
  • Copy: Hold volume_up button
  • Paste: Hold middle button
  • Screenshot: Hold left + right buttons
  • Launch App: Hold volume_down + press middle

Uninstall

sudo rmmod mouse_shortcut

License

GPL

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages