#!/bin/bash # $Id$ # Reconfigure an iBook's keyboard mapping for use with a standard PC keyboard # instead of the tweaked version case $1 in off) echo "Using the iBook's keyboard..." xmodmap -e "keycode 108=ISO_Level3_Shift" sudo sysctl -w dev.mac_hid.mouse_button_emulation=1 ;; on) echo "Using an external keyboard..." xmodmap -e "keycode 108=KP_Enter" sudo sysctl -w dev.mac_hid.mouse_button_emulation=0 ;; *) echo "usage: $0 on|off" exit 1 ;; esac