Skip to content

roblillack/tpadnav

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 

Repository files navigation

tpadnav

OpenBSD's wsmouse (wstpad) driver for touchpads recognizes two-finger scrolling left and right and generates mouse button 6 and 7 events (as well as 4 and 5 for scrolling up and down).

This program listens for those mouse button 6 and 7 events and then generates fake XF86XK_Back or XF86XK_Forward keyboard events with the XTest extension. In at least Firefox, this effectively enables left and right two-finger swipe gestures on a touchpad to navigate backward and forward.

Since these button events are generated many times along a two-finger swipe, this program throttles its output and only generates one back or forward key per 750 milliseconds (configurable with the -i option).

License

ISC

Compiling

Run make to compile, and make install to install to /usr/local by default.

Usage

Add /usr/local/bin/tpadnav & to ~/.xsession.

If the 1 second throttling is generating more events than you want, try a higher -i value (in seconds).

If it's not doing anything, run it with -v to see verbose output.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C 68.3%
  • Makefile 18.9%
  • Roff 12.8%