generate back and forward keyboard events from two-finger swipes left and right
openbsd
C 68.3%
Makefile 18.9%
Roff 12.8%
6 1 2

Clone this repository

https://tangled.org/jcs.org/tpadnav https://tangled.org/did:plc:6ashubrd3ihfmnrpsatviswa/tpadnav
git@git.jcs.org:jcs.org/tpadnav git@git.jcs.org:did:plc:6ashubrd3ihfmnrpsatviswa/tpadnav

For self-hosted knots, clone URLs may differ based on your setup.

Download tar.gz
README.md

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.