Linux Mapping Unknown Keys

written by mr337 on 2016-01-16

I recently received a Lenovo X1 Carbon Gen 3. Using this with xmonad, a lot of the special/multimedia keys do not work. Using other DMs such as Gnome or KDE take care of this and provides a built in utility to maps keys.

Using Xmonad I needed to map these myself, def a learning experience. Links below explain how to discover why a keypress sends to the OS, how to intercept it, and how to map it to an action.

http://hackage.haskell.org/package/X11-1.6.1.2/docs/src/Graphics-X11-Types.html#xK_Return

http://askubuntu.com/questions/235126/simulate-media-keys-in-terminal

http://piotrkrzyzek.com/linux-spotify-media-keys-for-ubuntu-archlinux-and-more/