diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/acer-aspire-1600.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/acer-aspire-1600.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/acer-aspire-1600.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/acer-aspire-1600.hk 2006-03-02 17:47:40.000000000 +0000 @@ -0,0 +1,26 @@ +setkeycodes e074 $KEY_PROG1 # Misc 1 +setkeycodes e073 $KEY_PROG2 # Misc 2 + +# Acer 1680, mjg59 thinks this is the most crack ever seen on a laptop... +# Manufacturer: "Acer", Product Name: "Aspire 1680 ", Version: "Rev 1 " +#setkeycodes e033 $KEY_EURO # '€' hard to do out-of-the-box +#setkeycodes e034 $KEY_DOLLAR # '$' hard to do out-of-the-box + +# Acer 1690 +# 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_F20 # 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 +#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/kzKQ5mBLYO/hotkey-setup-0.1/acer.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/acer.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/acer.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/acer.hk 2006-03-02 23:49:47.000000000 +0000 @@ -1,4 +1,5 @@ # Acer Laptops 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/kzKQ5mBLYO/hotkey-setup-0.1/compal-cl56.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/compal-cl56.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/compal-cl56.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/compal-cl56.hk 2006-03-02 23:49:43.000000000 +0000 @@ -0,0 +1,8 @@ +# Acer/Compal CL56 rebadge +# with retarded dmidecode data +setkeycodes e05f $KEY_SLEEP # Fn-Esc Suspend to RAM ("standard" keycode) +setkeycodes e020 $KEY_MUTE # Fn-End Volume Mute +setkeycodes e02e $KEY_VOLUMEDOWN # Fn-PgDown Volume Down +setkeycodes e030 $KEY_VOLUMEUP # Fn-PgUp Volume Up +setkeycodes e032 $KEY_WWW # Left App Web-browser (acerhk.ko) +setkeycodes e06c $KEY_MAIL # Right App Email Client (acerhk.ko) diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/debian/changelog /tmp/qSGXDb88BV/hotkey-setup-0.1/debian/changelog --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/debian/changelog 2006-02-06 14:40:30.000000000 +0000 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/debian/changelog 2006-03-15 22:08:12.000000000 +0000 @@ -1,3 +1,16 @@ +hotkey-setup (0.1-15) unstable; urgency=low + + * Support for Compaq laptops made before the Hewlett Packard merger. + * Call setkeycodes once instead of 255 times. + * Canonical list of not-yet-assigned keys alised to high Function-keys + * thinkpad-keys reports KEY_LIGHT + + Fix Thinkpad lockfile deletion. + + modprobe nvram if not loaded. + * Support for Acer Aspire 1680/1690 + * Attempt to support COMPAL CL56 Acer-rebadge (with retarded dmidecode) + + -- Paul Sladen Thu, 2 Mar 2006 04:00:09 +0000 + hotkey-setup (0.1-14) unstable; urgency=low * Change to using symbolic constants for hotkeys (patch from Paul diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/debian/hotkey-setup.docs /tmp/qSGXDb88BV/hotkey-setup-0.1/debian/hotkey-setup.docs --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/debian/hotkey-setup.docs 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/debian/hotkey-setup.docs 2006-03-02 03:44:24.000000000 +0000 @@ -0,0 +1 @@ +NOTES diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/debian/init.d /tmp/qSGXDb88BV/hotkey-setup-0.1/debian/init.d --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/debian/init.d 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/debian/init.d 2006-03-02 23:52:34.000000000 +0000 @@ -4,59 +4,87 @@ 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 + Compaq*) + . /usr/share/hotkey-setup/compaq.hk ;; 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 + *Presario\ V2000*) + . /usr/share/hotkey-setup/hp-v2000.hk + ;; + *Tablet*) + . /usr/share/hotkey-setup/hp-tablet.hk + ;; + esac + ;; + HP\ Compaq*) + . /usr/share/hotkey-setup/hp-compaq.hk + ;; + # *sigh* ... + OEM\ Manufacturer*) + case `dmidecode --string bios-vendor` in + COMPAL*) + . /usr/share/hotkey-setup/compal.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 ;; - *) + 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 +92,3 @@ $0 start ;; esac - diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp /tmp/qSGXDb88BV/hotkey-setup-0.1/hp --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/hp 1970-01-01 01:00:00.000000000 +0100 @@ -1 +0,0 @@ -# HP Laptops diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp-compaq.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/hp-compaq.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp-compaq.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/hp-compaq.hk 2006-02-22 12:55:48.000000000 +0000 @@ -0,0 +1,9 @@ +# Compaq laptops rebadged as HP models +# From: "HP Compaq nw8240 (PG818ET#ABU)" +setkeycodes e05f $KEY_SLEEP # Fn+F3 Sleep (matches compaq.hk) +setkeycodes e059 $KEY_F24 # Fn+F8 Battery +setkeycodes e075 $KEY_PROG2 # Info Info key (matches hp.hk) +setkeycodes e01f $KEY_F23 # Presentation (Full screen?) +setkeycodes e020 $KEY_MUTE # Mute toggle Volume Mute (matches compaq.hk) +setkeycodes e02e $KEY_VOLUMEDOWN # LowVolume Volume Down (matches compaq.hk) +setkeycodes e030 $KEY_VOLUMEUP # HighVolume Volume Up (matches compaq.hk) diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/hp.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/hp.hk 2006-02-22 17:28:05.000000000 +0000 @@ -7,3 +7,4 @@ setkeycodes e00e $KEY_MEDIA # DVD setkeycodes e031 $KEY_HELP # Help setkeycodes e059 $KEY_HELP # Another help key + diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp-tablet.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/hp-tablet.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp-tablet.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/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/kzKQ5mBLYO/hotkey-setup-0.1/hptablet.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/hptablet.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hptablet.hk 2006-02-06 13:41:37.000000000 +0000 +++ /tmp/qSGXDb88BV/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/kzKQ5mBLYO/hotkey-setup-0.1/hp-v2000.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/hp-v2000.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/hp-v2000.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/hp-v2000.hk 2006-02-22 12:55:33.000000000 +0000 @@ -0,0 +1,25 @@ +# Compaq (pre-HP merger) +# From Compaq Presario LV2417LA, Thanks to Cristian Aravena Romero +setkeycodes e01f $KEY_PROG1 # Fn-Esc Unknown +setkeycodes e075 $KEY_HELP # Fn-F1 Help + # Fn-F2 Print, sends Ctrl-p (1d19) +setkeycodes e032 $KEY_WWW # Fn-F3 Web + # Fn-F4 External VGA +setkeycodes e05f $KEY_SLEEP # Fn-F5 Sleep (Hibernate) +setkeycodes e012 $KEY_COFFEE # Fn-F6 Lock Screen + # Fn-F7 Brightness Down + # Fn-F8 Brightness Up +setkeycodes e022 $KEY_PLAYPAUSE # Fn-F9 Media Play/Pause +setkeycodes e024 $KEY_STOP # Fn-F10 Media Stop +setkeycodes e010 $KEY_PREVIOUSSONG # Fn-F11 Media Previous Song +setkeycodes e019 $KEY_NEXTSONG # Fn-F12 Media Next Song + # Fn-Scroll Num_Lock (0x45) + # Fn-Pause Pause/Break (e11d45) + # Fn-Ins PrintScreen (e02ae037) + # Fn-Del PrintScreen (e02ae037) + # Fn-Enter KP_Enter (e01c) + # Wireless Wireless RF_Kill with LED +setkeycodes e02e $KEY_VOLUMEDOWN # Sound Down Volume Down +setkeycodes e030 $KEY_VOLUMEUP # Sound Up Volume Up +setkeycodes e020 $KEY_MUTE # Sound On/Off Volume Mute + diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/Makefile /tmp/qSGXDb88BV/hotkey-setup-0.1/Makefile --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/Makefile 2006-02-06 13:43:30.000000000 +0000 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/Makefile 2006-03-02 03:31:23.000000000 +0000 @@ -1,10 +1,12 @@ 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 test -f $< diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/NOTES /tmp/qSGXDb88BV/hotkey-setup-0.1/NOTES --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/NOTES 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/hotkey-setup-0.1/NOTES 2006-03-02 04:00:20.000000000 +0000 @@ -0,0 +1,32 @@ +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 +KEY_BATTERY=$KEY_F24 + +# 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 # currently KEY_PROG2 + +# 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 + + -- Paul Sladen Thu, 02 Mar 2006 04:00:09 +0000 diff -Nru /tmp/kzKQ5mBLYO/hotkey-setup-0.1/thinkpad-keys.c /tmp/qSGXDb88BV/hotkey-setup-0.1/thinkpad-keys.c --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/thinkpad-keys.c 2006-02-06 14:26:24.000000000 +0000 +++ /tmp/qSGXDb88BV/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/kzKQ5mBLYO/hotkey-setup-0.1/toshiba-tablet.hk /tmp/qSGXDb88BV/hotkey-setup-0.1/toshiba-tablet.hk --- /tmp/kzKQ5mBLYO/hotkey-setup-0.1/toshiba-tablet.hk 1970-01-01 01:00:00.000000000 +0100 +++ /tmp/qSGXDb88BV/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)