#!/bin/bash # # sapphire_keymap.sh by Mark Lord , April/2013. # http://rtr.ca/sapphire_remote/ # # Script to translate a symbolic keymap file for the Sapphire driver # into hex format and feed the results to /proc/sapphire. # # This can be invoked on the fly, as often as desired. # Eg. to change keymaps to match a specific program, such as mythfrontend or xbmc. # # By default, this script reads key mappings from /etc/sapphire.keymap # but this can be overridden by supplying an alternative path/file as a parameter. # # Eg. sapphire_keymap.sh ~/.sapphire_keymap # ## Arrays for Buttons, Keycodes, and Modifiers: ##' declare -A K B M