diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/acer-aspire-1600.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/acer-aspire-1600.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/acer-aspire-1600.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/acer-aspire-1600.hk 2006-03-25 19:13:17.000000000 +0000 @@ -0,0 +1,19 @@ +# Acer 1690 and Aspire 1680 Manufacturer: "Acer", Product Name: "Aspire 1680 ", +# http://users.linuxbourg.ch/didier/blog/?p=29 +setkeycodes e025 $KEY_HELP # Fn-F1 Help +setkeycodes e026 $KEY_SETUP # Fn-F2 eSetting +#setkeycodes e027 $KEY_ # Fn-F3 ePowerManagement + # Fn-F4 Sleep Zz. +setkeycodes e029 $KEY_VIDEOOUT # Fn-F5 External VGA toggle + # Fn-F6 Blank screen (hardware) +#setkeycodes e071 $KEY_ # Fn-F7 TrackPad On (hardware, informational only) +#setkeycodes e072 $KEY_ # Fn-F7 TrackPad Off (hardware, informational only) +setkeycodes e06e $KEY_BRIGHTNESSUP # Fn--> LCD Brightness up +# mjg59 thinks these two are the most crack ever seen on a laptop... +#setkeycodes e033 $KEY_EURO # '€' hard to do out-of-the-box +#setkeycodes e034 $KEY_DOLLAR # '$' hard to do out-of-the-box +setkeycodes e073 $KEY_PROG1 # 'P' button +setkeycodes e074 $KEY_MAIL # 'e' button +#setkeycodes e055 $KEY_ # Orange Wireless On (hardware, led, informational only) +#setkeycodes e056 $KEY_ # Orange Wireless Off (hardware, led, informational only) + diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/acer.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/acer.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/acer.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/acer.hk 2006-03-25 18:03:36.000000000 +0000 @@ -2,3 +2,6 @@ setkeycodes e025 $KEY_HELP # Help key setkeycodes e074 $KEY_PROG1 # Misc 1 setkeycodes e073 $KEY_PROG2 # Misc 2 +#setkeycodes e057 $KEY_ # Blue Bluetooth On (hardware, led, informational only) +#setkeycodes e058 $KEY_ # Blue Bluetooth Off (hardware, led, informational only) +#Also: PreviousTrack, NextTrack, Play, Stop, WWW, Email, VolumeUp, VolumeDown, Mute, BrightnessDown... diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/aliased-keys /tmp/Bs89SjMGZp/hotkey-setup-0.1/aliased-keys --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/aliased-keys 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/aliased-keys 2006-03-25 19:08:01.000000000 +0000 @@ -0,0 +1,7 @@ +KEY_LOCK=$KEY_COFFEE +KEY_LIGHT=$KEY_F19 +KEY_VIDEOOUT=$KEY_F20 +KEY_ROTATESCREEN=$KEY_F21 +KEY_VIDEOMODECYCLE=$KEY_F22 +KEY_PRESENTATION=$KEY_F23 +KEY_BATTERY=236 diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/atkbd.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/atkbd.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/atkbd.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/atkbd.hk 2006-03-16 02:24:21.000000000 +0000 @@ -0,0 +1,257 @@ +# Generated from Mon, 20 Mar 2006 13:49:36 +0000 + hotkey-setup (0.1-14) unstable; urgency=low * Change to using symbolic constants for hotkeys (patch from Paul diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/debian/hotkey-setup.docs /tmp/Bs89SjMGZp/hotkey-setup-0.1/debian/hotkey-setup.docs --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/debian/hotkey-setup.docs 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/debian/hotkey-setup.docs 2006-03-02 03:44:24.000000000 +0000 @@ -0,0 +1 @@ +NOTES diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/debian/init.d /tmp/Bs89SjMGZp/hotkey-setup-0.1/debian/init.d --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/debian/init.d 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/debian/init.d 2006-03-25 20:03:29.000000000 +0000 @@ -4,59 +4,77 @@ name=`dmidecode --string system-product-name` version=`dmidecode --string system-version` +SAVED_STATE=/var/run/hotkey-setup +THINKPAD_LOCKFILE=$SAVED_STATE.thinkpad-keys + case "$1" in start) - /usr/sbin/dumpkeycodes >/var/run/hotkey-setup + /usr/sbin/dumpkeycodes >$SAVED_STATE if [ $? -gt 0 ]; then - rm /var/run/hotkey-setup + rm -f $SAVED_STATE fi . /usr/share/hotkey-setup/key-constants case "$manufacturer" in - Hewlett-Packard*) - case "$name" in - *Tablet*) - . /usr/share/hotkey-setup/hptablet.hk - ;; - esac - . /usr/share/hotkey-setup/hp.hk - ;; Acer*) . /usr/share/hotkey-setup/acer.hk + case "$name" in + Aspire\ 16*) + . /usr/share/hotkey-setup/acer-aspire-1600.hk + ;; + esac ;; ASUS*) . /usr/share/hotkey-setup/asus.hk ;; - Sony*) - modprobe sonypi; # Needed to get hotkey events - ;; Dell*) . /usr/share/hotkey-setup/dell.hk ;; + Hewlett-Packard*) + # Load this _first_, so that it can be overridden + . /usr/share/hotkey-setup/hp.hk + case "$name" in + *Tablet*) + . /usr/share/hotkey-setup/hp-tablet.hk + ;; + esac + ;; IBM*) . /usr/share/hotkey-setup/ibm.hk - if [ ! -c /dev/input/uinput ]; then + if [ -x /usr/sbin/thinkpad-keys ]; then + if [ ! -c /dev/input/uinput ]; then modprobe uinput + fi + if [ ! -b /dev/nvram ]; then + modprobe nvram + fi + /usr/sbin/thinkpad-keys && touch $THINKPAD_LOCKFILE fi - /usr/sbin/thinkpad-keys - touch /var/run/hotkey-setup.thinkpad-keys ;; - *) + MEDION*) + case "$name" in + *FID2060*) + . /usr/share/hotkey-setup/medion-md6200.hk + ;; + esac + ;; + Sony*) + modprobe sonypi; # Needed to get hotkey events + ;; + *) . /usr/share/hotkey-setup/default.hk esac . /usr/share/hotkey-setup/generic.hk ;; stop) - if [ -f /var/run/hotkey-setup.thinkpad-keys ]; then - kill `pidof thinkpad-keys` + if [ -f $THINKPAD_LOCKFILE ]; then + kill `pidof thinkpad-keys` && rm -f $THINKPAD_LOCKFILE fi - if [ -f /var/run/hotkey-setup ]; then - cat /var/run/hotkey-setup | while read scancode keycode; do - setkeycodes $scancode $keycode; - done + if [ -f $SAVED_STATE ]; then + setkeycodes $(cat $SAVED_STATE) fi ;; restart|force-reload) @@ -64,4 +82,3 @@ $0 start ;; esac - diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/dell.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/dell.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/dell.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/dell.hk 2006-03-25 19:17:15.000000000 +0000 @@ -1,4 +1,10 @@ # Dell Laptops -setkeycodes e00a $KEY_SUSPEND # Hibernate -setkeycodes e007 $KEY_F24 # Battery [was: 230] -setkeycodes e009 $KEY_EJECTCD # Eject + # Fn+Esc Standby (ACPI) +setkeycodes e00a $KEY_SUSPEND # Fn+F1 Hibernate (e00a) +#setkeycodes e008 $KEY_ # Fn+F2 Wireless (e008) +setkeycodes e007 $KEY_BATTERY # Fn+F3 Battery (e007) +setkeycodes e00b $KEY_VIDEOOUT # Fn+F8 CRT/LCD (e00b) +setkeycodes e009 $KEY_EJECTCD # Fn+F10 EjectCD (e009) +setkeycodes e005 $KEY_BRIGHTNESSDOWN # Fn+Down Brightness Down (e005) +setkeycodes e006 $KEY_BRIGHTNESSUP # Fn+Up Brightness Up (e006) +setkeycodes e012 $KEY_MEDIA # MediaDirect Load Media Player (e012) diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/hp /tmp/Bs89SjMGZp/hotkey-setup-0.1/hp --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/hp 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/hp 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -# HP Laptops diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/hp.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/hp.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/hp.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/hp.hk 2006-03-25 19:22:50.000000000 +0000 @@ -1,7 +1,7 @@ -# HP Laptops +# HP Laptops with "Hewlett-Packard" in the dmi identifier setkeycodes e001 $KEY_PROG1 # Fn+Escape? -setkeycodes e008 $KEY_F23 # Presentation (Misc 1) -setkeycodes e009 $KEY_F24 # Battery [was: 230] +setkeycodes e008 $KEY_PRESENTATION # Presentation (Misc 1) +setkeycodes e009 $KEY_BATTERY # Battery setkeycodes e00a $KEY_COFFEE # Lock setkeycodes e00c $KEY_SOUND # Music setkeycodes e00e $KEY_MEDIA # DVD diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/hp-tablet.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/hp-tablet.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/hp-tablet.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/hp-tablet.hk 2006-02-06 13:41:37.000000000 +0000 @@ -0,0 +1,7 @@ +# HP Tablets +setkeycodes e002 $KEY_PROG2 # Funny key +setkeycodes e003 $KEY_PROG1 # Q +setkeycodes e004 $KEY_TAB # Tab +setkeycodes e005 $KEY_ESC # Escape +setkeycodes e006 $KEY_PAGEUP # Rocker left (Page up) +setkeycodes e007 $KEY_PAGEDOWN # Rocker right (Page down) diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/hptablet.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/hptablet.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/hptablet.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/hptablet.hk 1970-01-01 01:00:00.000000000 +0100 @@ -1,7 +0,0 @@ -# HP Tablets -setkeycodes e002 $KEY_PROG2 # Funny key -setkeycodes e003 $KEY_PROG1 # Q -setkeycodes e004 $KEY_TAB # Tab -setkeycodes e005 $KEY_ESC # Escape -setkeycodes e006 $KEY_PAGEUP # Rocker left (Page up) -setkeycodes e007 $KEY_PAGEDOWN # Rocker right (Page down) diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/ibm.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/ibm.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/ibm.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/ibm.hk 2006-03-25 19:10:39.000000000 +0000 @@ -1,20 +1,20 @@ # IBM/Lenovo ThinkPads -setkeycodes e05d $KEY_PROG1 # Fn-click (Press & release with no action), observed on R52 -setkeycodes e063 $KEY_PROG1 # Fn-click (Press & release with no action), found on Google +setkeycodes e05d $KEY_WAKEUP # Fn-click (Press & release with no action), observed on R52 +#setkeycodes e063 $KEY_WAKEUP # Fn-click (Press & release with no action), found on Google and LenovoPads # Canonical mapping, commented out. # ThinkPad A and S series -setkeycodes e032 $KEY_HOMEPAGE # Home -setkeycodes e065 $KEY_SEARCH # Search -setkeycodes e06c $KEY_MAIL # Mail [also: KEY_EMAIL] +#setkeycodes e032 $KEY_WWW # Home # Canonical mapping, commented out. +#setkeycodes e065 $KEY_SEARCH # Search # Canonical mapping, commented out. +#setkeycodes e06c $KEY_MAIL # Mail [also: KEY_EMAIL] # Canonical mapping, commented out. # ThinkPad A-series -setkeycodes e066 $KEY_BOOKMARKS # Favorites -setkeycodes e067 $KEY_REFRESH # Reload -setkeycodes e068 $KEY_STOP # Abort +#setkeycodes e066 $KEY_BOOKMARKS # Favorites # Canonical mapping, commented out. +#setkeycodes e067 $KEY_REFRESH # Reload # Canonical mapping, commented out. +#setkeycodes e068 $KEY_STOP # Abort # Canonical mapping, commented out. # ThinkPads from 2002 onwards -setkeycodes e069 $KEY_BACK # Back -setkeycodes e06a $KEY_FORWARD # Forward +#setkeycodes e069 $KEY_BACK # Back # Canonical mapping, commented out. +#setkeycodes e06a $KEY_FORWARD # Forward # Canonical mapping, commented out. # X41 Tablet series only # L-to-R: Scancodes have differing reports. Are these correct? @@ -29,14 +29,30 @@ setkeycodes 6d $KEY_PAGEUP # Tablet Up setkeycodes 6e $KEY_PAGEDOWN # Tablet Down -# TODO: Fn + Spacebar -> $KEY_ZOOM (/dev/nvram) -# TODO: ThinkPad Button -> $KEY_VENDOR (/dev/nvram) - -# TODO: ThinkPad R30, R31, R40e (Acer OEMs, no hardware mixer on these) -# TODO: Map Volume Mute/Down/Up to KEY_MUTE, KEY_VOLUMEDOWN, KEY_VOLUMEUP (/dev/nvram) +# New Lenovo *60* Series + # Fn (e063) + # Fn-PrtSc SysRq (3854) + # Fn-ScrLk NumLk (45) + # Fn-Pause Break (e11d45) + # Fn-Up Media Stop (e024) + # Fn-Down Media PlayPause (e022) + # Fn-Left Media Previous (e019) + # Fn-Right Media Right (e010) + +# Handled via a daemon: +# DONE: Fn + Spacebar -> $KEY_ZOOM (/dev/nvram, thinkpad-keys) +# DONE: ThinkPad Button -> $KEY_PROG1 (/dev/nvram, thinkpad-keys) +# DONE: ThinkPad R30, R31, R40e (Acer OEMs, no hardware mixer on these): +# DONE: Map Volume Mute/Down/Up to KEY_MUTE, KEY_VOLUMEDOWN, KEY_VOLUMEUP (/dev/nvram, thinkpad-keys) # TODO: Fix Num-Lock, work out what it's going on. +# +# ThinkPads internally map Shift+ScrollLock -> NumLock; however shift key +# is also down at this point, so the actual code that gets sent is Shift+NumLock +# and by default X maps Shift+NumLock to Pointer_Emulation_Enable. # Shift+Scroll_Lock (0x45) to NumLock (77) and disable X's Pointer_EnableKeys -#Works in X with xmodmap -e 'keycode 77 = Num_Lock' ... How to do it on console? -#setkeycodes 45 $KEY_KP6 # ??? +# +# Works in X with xmodmap -e 'keycode 77 = Num_Lock' +# Fixed in by removing Pointer_EnableKeys from the default policy in X +# setkeycodes 45 $KEY_KP6 # ??? diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/key-constants /tmp/Bs89SjMGZp/hotkey-setup-0.1/key-constants --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/key-constants 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/key-constants 2006-03-25 19:28:22.000000000 +0000 @@ -1,4 +1,4 @@ -# Generated from /usr/include/linux/input.h dated Tue Dec 6 15:47:18 EET 2005 +# Generated from /usr/include/linux/input.h dated Sat Feb 4 14:58:52 GMT 2006 KEY_RESERVED=0 KEY_ESC=1 KEY_1=2 @@ -218,3 +218,10 @@ KEY_BRIGHTNESSUP=225 KEY_MEDIA=226 KEY_UNKNOWN=240 +KEY_LOCK=$KEY_COFFEE +KEY_LIGHT=$KEY_F19 +KEY_VIDEOOUT=$KEY_F20 +KEY_ROTATESCREEN=$KEY_F21 +KEY_VIDEOMODECYCLE=$KEY_F22 +KEY_PRESENTATION=$KEY_F23 +KEY_BATTERY=236 diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/make-atkbd /tmp/Bs89SjMGZp/hotkey-setup-0.1/make-atkbd --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/make-atkbd 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/make-atkbd 2006-03-25 18:04:22.000000000 +0000 @@ -0,0 +1,21 @@ +#!/bin/sh +f=/var/run/hotkey-setup +p="sudo ./dumpkeycodes" +if [ -r $f ] ; then + echo -n "# Generated from $f dated " + date -r $f +#else +# echo -n "# Generated by $p at " +# date +# $p & +else + exit 1 +fi >atkbd.hk +while read e k; do + if m=`LANG=C grep "=$k\$" key-constants`; then + m=`echo $m | cut -d= -f1` + echo -e "setkeycodes\t$e\t\$$m" + else + echo -e "#setkeycodes\t$e" + fi +done <$f >>atkbd.hk diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/Makefile /tmp/Bs89SjMGZp/hotkey-setup-0.1/Makefile --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/Makefile 2006-02-06 13:43:30.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/Makefile 2006-03-25 19:28:16.000000000 +0000 @@ -1,18 +1,27 @@ all: dumpkeycodes thinkpad-keys dumpkeycodes: dumpkeycodes.c - gcc -o dumpkeycodes dumpkeycodes.c + $(CC) -o $@ $< + strip $@ thinkpad-keys: thinkpad-keys.c $(CC) -o $@ $< + strip $@ -key-constants: /usr/include/linux/input.h +key-constants: /usr/include/linux/input.h aliased-keys test -f $< echo -n '# Generated from $< dated ' > $@ date -r $< >> $@ - awk '/#define *KEY_/{if(($$3+0) <= 255) print $$2"="($$3+0)}' $< | sort -nt'=' -k2 >> $@ + + awk '/^#define *KEY_/{if(strtonum($$3) <= 255) print $$2"="strtonum($$3)}' $< | sort -nt'=' -k2 >> $@ + echo -n "# Aliases for keys not yet assigned in 'linux/input.h'" + cat aliased-keys >> $@ + +atkbd.hk: /var/run/hotkey-setup + test -f $< + ./make-atkbd.sh clean: - - rm dumpkeycodes thinkpad-keys + - rm -f dumpkeycodes thinkpad-keys *~ diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/medion-md6200.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/medion-md6200.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/medion-md6200.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/medion-md6200.hk 2006-03-17 16:07:13.000000000 +0000 @@ -0,0 +1,7 @@ +# Medion Laptop +# MedionMD6200, Manufactuer: "MEDION", Product: "FID2060" + +#setkeycodes 6b $KEY_ # Thottle Down Reduce CPU Speed +setkeycodes 6b $KEY_PROG3 # Instead, remap it to something usable +#setkeycodes 6d $KEY_ # Thottle Up Increase CPU Speed +setkeycodes 6d $KEY_PROG4 # Instead, remap it to something usable diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/NOTES /tmp/Bs89SjMGZp/hotkey-setup-0.1/NOTES --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/NOTES 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/NOTES 2006-03-25 19:08:18.000000000 +0000 @@ -0,0 +1,43 @@ +When the machine should be put to sleep in some fashion: + +KEY_SLEEP signals Suspend to RAM (Suspend, technically called "standby") +KEY_SUSPEND signals Suspend to Disk (Hibernate, technically called "suspend"...) + +KEY_MAIL is used in preference to KEY_EMAIL. + +For functions that have not been assigned a named Linux kernel keycode, +with a value <=255, then the following aliases are used: + +KEY_LOCK=$KEY_COFFEE +KEY_PRESENTATION=$KEY_F23 + +# This has been assigned 236 now +KEY_BATTERY=236 + +# Acer 1690, VGA toggle +KEY_VIDEOOUT=$KEY_F20 + +# Toshiba (and other) Tablets, +# the support to actually rotate the screen is only in very recent i810 drivers. +#KEY_ROTATESCREEN=$KEY_F21 + +# ThinkPad Fn+Spacebar (called "Zoom") +KEY_VIDEOMODECYCLE=$KEY_F22 + +# ThinkPad Fn+PgUp (called ThinkLight) +# On Apple laptop, under-keyboard lighting +KEY_LIGHT=$KEY_F19 + +# All the laptops except 1 Medion (Acer) I've seen using ACPI for the wifikey hotkey. +#KEY_WIFI=$KEY_CONNECT + +Avoiding remapping already mapped hotkeys. 'atkbd.hk' contains a list of the keycodes +and KEY_NAME mappings used by the 'drivers/input/keyboard/atkbd.c' driver at boot-time. +This may be useful as a reference and for grepping out entries that don't actually need +to be matched. + + awk '/^setkeycodes/{x=strtonum("0x"$2);if(x>127)x-=(0xe000-128);sub("^.","",$3);print$3"="x }' *.hk \ + | xargs -d"\n" -n1 grep -c < key-constants | grep -cv 0 + + -- Paul Sladen Thu, 02 Mar 2006 04:00:09 +0000 + diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/thinkpad-keys.c /tmp/Bs89SjMGZp/hotkey-setup-0.1/thinkpad-keys.c --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/thinkpad-keys.c 2006-02-06 14:26:24.000000000 +0000 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/thinkpad-keys.c 2006-03-02 03:27:44.000000000 +0000 @@ -50,7 +50,7 @@ } struct record { - unsigned char thinkpad, zoom, brightness_moved, brightness, volume_moved, muted, volume; + unsigned char thinkpad, zoom, brightness_moved, brightness, volume_moved, muted, volume, thinklight; }; enum { @@ -61,6 +61,7 @@ VOLUME_MUTE = 16, BRIGHTNESS_DOWN = 32, BRIGHTNESS_UP = 64, + THINKLIGHT = 128 }; struct keys { @@ -68,12 +69,13 @@ unsigned short keycode; } codes[] = { { THINKPAD, KEY_PROG1 }, - { ZOOM, KEY_PROG2 }, + { ZOOM, KEY_F22 }, /* Stand-in for KEY_VIDEOMODECYCLE */ { VOLUME_DOWN, KEY_VOLUMEDOWN }, { VOLUME_UP, KEY_VOLUMEUP }, { VOLUME_MUTE, KEY_MUTE }, { BRIGHTNESS_DOWN, KEY_BRIGHTNESSDOWN }, { BRIGHTNESS_UP, KEY_BRIGHTNESSUP }, + { THINKLIGHT, KEY_F19 }, /* Stand-in for KEY_LIGHT */ { 0, 0 } }; @@ -88,6 +90,11 @@ where->thinkpad = c & 0x08; where->zoom = c & 0x20; + lseek(fd, 0x58, SEEK_SET); + read(fd, &c, 1); + + where->thinklight = c & 0x10; + lseek(fd, 0x5e, SEEK_SET); read(fd, &c, 1); @@ -109,6 +116,8 @@ r |= THINKPAD; if(a->zoom != b->zoom) r |= ZOOM; + if(a->thinklight != b->thinklight) + r |= THINKLIGHT; if (a->brightness_moved != b->brightness_moved) { if(a->brightness > b->brightness || !b->brightness) @@ -129,6 +138,7 @@ r |= VOLUME_DOWN; else r |= VOLUME_UP; + *result = r; } @@ -232,7 +242,7 @@ #if 1 /* Software volume control */ - int mask = THINKPAD|ZOOM|VOLUME_UP|VOLUME_DOWN|VOLUME_MUTE|BRIGHTNESS_DOWN|BRIGHTNESS_UP; + int mask = THINKPAD|ZOOM|VOLUME_UP|VOLUME_DOWN|VOLUME_MUTE|BRIGHTNESS_DOWN|BRIGHTNESS_UP|THINKLIGHT; #else /* Hardware mixer present */ int mask = THINKPAD|ZOOM; diff -Nru /tmp/xcVcdlzF5G/hotkey-setup-0.1/toshiba-tablet.hk /tmp/Bs89SjMGZp/hotkey-setup-0.1/toshiba-tablet.hk --- /tmp/xcVcdlzF5G/hotkey-setup-0.1/toshiba-tablet.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/Bs89SjMGZp/hotkey-setup-0.1/toshiba-tablet.hk 2006-03-02 03:38:02.000000000 +0000 @@ -0,0 +1,6 @@ +# Tosbia Portege 3500 (the "first" tablet) + # Fn-F12 Scroll-lock (0x46) + # Login Ctrl-Alt-Del (1d386fefb89d) + # Down-Left (7e02[02]82fe) + # Toolbox (7e0686fe) + # Up-Right (7e03[03]82fe)