Multimedia keyboards: uhidd/xbindkeys/xmodmap

Table of Contents

uhidd: The driver
xbindkeys: Create hotkeys
xmodmap: Remap the keys

uhidd: The driver

by ross at 06:29:56 on December 4, 2012

Install uhidd

# cd /usr/ports/sysutils/uhidd
# make install clean

Add to /etc/rc.conf:

uhidd_enable="YES"
uhidd_flags="-kmohsu"
# service uhidd start

Press each of the additional keys on the keyboard once.

Now look at /var/run/uhidd.ugenX.Y/cc_keymap, where X.Y corresponds to your usb keyboard (/dev/ugenX.Y). Copy contents of this file to /usr/local/etc/uhidd.conf and restart the daemon.

If the daemon fails to start because of "invalid syntax" or some of the keys do not work then you will need to install svn version of uhidd (refer to the end of this page).

With current version of port it's possible that uhidd will detach the kernel keyboard driver but won't attach itself because of ”invalid syntax” leaving the system without input driver. Unplug and reconnect the keyboard to make the keyboard work again. (btw, this is fixed in svn).

Development version of uhidd

I have Logitech Wave Corded keyboard and Logitech MX 620 Cordless Laser mouse. Unfortunately the keyboard is not supported by current version of the port. But it will work with the development version.

Install uhidd port, then overwrite the binary:

# cd
# svn co http://uhidd.googlecode.com/svn/trunk uhidd
# cd uhidd/uhidd
# make
# cp uhidd /usr/local/sbin/uhidd

Now restart the daemon and refer to “Create hotkeys” section.

If you want to see the config, it's here. You will see two sections: keyboard and mouse (it has a multimedia key too). I only had to change 0x3D="0x60" line to 0x3D="0x7D" (avalable codes are in the man page) to make all the keys work.

 

Comments