Using these values for a "Microsoft MultiMedia Keyboard 1.0A" (with desired results
)
Code:
setkeycodes bb 59 # Help -> F1
setkeycodes 88 60 # Undo -> F2
setkeycodes 87 61 # Redo -> F3
setkeycodes be 62 # New -> F4
setkeycodes bf 63 # Open -> F5
setkeycodes c0 64 # Close -> F6
setkeycodes c1 65 # Reply -> F7
setkeycodes c2 66 # Fwd -> F8
setkeycodes c3 67 # Send -> F9
setkeycodes a3 68 # Spell -> F10
setkeycodes d7 87 # Save -> F11
setkeycodes d8 88 # Print -> F12
Also useful bit of code to add to /etc/rc.d/rc.local (or equivalent):
Code:
#Fix the F-Lock scan codes for F1-F12 on Microsoft MultiMedia Keyboards
if [ -x /usr/local/bin/f_lock_fix ]; then
echo "Fixing the F-Lock scan codes for F1-F12 keys...";
/usr/local/bin/f_lock_fix;
fi
EDIT: The "showkey" command is useful to find the scancodes for a different version.