I recently acquired a HP EliteBook 9470m (before you ask: it's personal), and installed FreeBSD on it. The Synaptics touchpad is detected on FreeBSD as a PS/2 mouse on both laptops, and unlike the 2570p I was coming from, the 9470m doesn't automatically fallback to edge scrolling. While web browsers make up by making it easy to scroll with the arrow keys, other applications (such as email) end up doing actions you might not want with the arrow keys.
scrollify.py is not yet on FreeBSD Ports, you will have to install it manually.
First, you need
pip. To install this, run either:
pkg install py27-pip py27-xlib
cd /usr/ports/devel/python-pip make config-recursive install clean cd /usr/ports/x11-toolkits/py-xlib make config-recursive install clean
Then you need to install the Python module
pynput. This is used for controlling the keyboard and mouse from Python, and is not in Ports either. To install this, run this as a normal user:
pip install --user pynput
Next, you will need
xbindkeys in order to do the mapping. To install this, run:
pkg install xbindkeys
cd /usr/ports/x11/xbindkeys make config-recursive install clean
Finally, you should install
scrollify.py somewhere on your system. For example, if you want it in
mkdir -p ~/.local/bin cd ~/.local/bin fetch --no-verify-peer https://raw.githubusercontent.com/neelchauhan/scrollify/master/scrollify.py
You will need to modify
.xbindkeysrc. To do that, run:
and add the following:
"python ~/.local/bin/scrollify.py up" alt + Up "python ~/.local/bin/scrollify.py down" alt + Down
vim with your text editor of choice,
~/.local/bin to the place you stored
alt + Up and
alt + Down to your desired key combination (you can Google search the possible combinations). This will map the scroll up to Alt + Up and scroll down to Alt + Down.
You finally need to make your window manager or desktop environment (GNOME for me) launch
xbindkeys on startup. For instance, on GNOME, make the directory
~/.config/autostart if it doesn't exist, create a
.desktop file in the directory with the following content:
[Desktop Entry] Name=xbindkeys GenericName=Keyboard Bindings Comment=Keybindings Exec=xbindkeys Terminal=false Type=application X-GNOME-Autostart-enabled=true
On your specific WM or DE, this can be found on the Internet. Arch Linux's wiki has a page on startup scripts for all the major DEs (and I believe the information should be common on FreeBSD as well).
I may update this page once
pynput makes it to FreeBSD Ports (I am a maintainer), but in the meanwhile, that's it.