diff -uNr linux-2.4.18/Documentation/hp_onetouch.txt linux-2.4.18-xe3/Documentation/hp_onetouch.txt
--- linux-2.4.18/Documentation/hp_onetouch.txt	Thu Jan  1 01:00:00 1970
+++ linux-2.4.18-xe3/Documentation/hp_onetouch.txt	Tue Apr 16 18:42:17 2002
@@ -0,0 +1,103 @@
+             Kernel Support for HP OmniBook XE3 OneTouch buttons
+             ===================================================
+
+Some HP OmniBook laptops (XE3s and XT1000) have special multimedia keys
+(aka OneTouch buttons) disabled by default. They need to be enabled.
+
+Linux kernel able to detect your HP OmniBook and enabling the OneTouch
+buttons to generate scancodes.
+Look in syslog messages for "keyboard: unknown scancode e0 xx" messages to
+identify the scancode assigned to button. Use setkeycodes from console-tools
+package to assign keycodes to them.
+
+The scancodes are different on different models:
+
+XT1000 models
+-------------
+
+Mail button:                     e06c
+Special-1 button:                e074
+WWW button:                      e032
+Special-2 button:                e073
+Help button:                     e072
+
+MP3 button:                      e071
+Previous Track button:           e010
+Next Track button:               e019
+Play / Pause button:             e022
+Stop / Eject button:             e024
+
+Volume down button:              e02e
+Volume up button:                e030
+Mute / Unmute button:            e020
+
+XE3 GF models
+-------------
+
+WWW button:                      e032
+Mail button:                     e06c
+Demo button:                     e074
+Help button:                     e073
+
+Previous Track button:           e010
+Play / Pause button:             e022
+Stop / Eject button:             e024
+Next Track button:               e019
+
+Volume down (and Fn-Down arrow): e02e
+Volume up (and Fn-Up arrow):     e030
+Mute / Unmute (Fn-F7):           e020
+
+XE3 GC models
+-------------
+
+WWW button:                      e073
+Mail button:                     e074
+Demo button:                     e072
+Help button:                     e071
+
+Previous Track button:           e010
+Play / Pause button:             e022
+Stop / Eject button:             e024
+Next Track button:               e019
+
+Unfortunately the volume control buttons on HP OmniBook XE3 GC models are
+implemented in different way and do not generates scancodes. There is no
+publically available technical information about implementing them.
+
+HP refusing to share any information:
+
+> Thank you for contacting Hewlett Packard laptop email support.
+> 
+> I'm sorry, but I won't be able to help you with that. HP does not
+> recommend or support the installation of any version of Linux on any of
+> our notebook products.
+
+Additionally neither Compal Electronics, Inc. (the manufacturer of OmniBook
+XE3 machines) nor Dritek System, Inc. (the vendor of the Windows software for
+OneTouch buttons) send any response to information requests.
+
+There are programs sepcifically designed such application keys (e.g. hotkeys:
+http://ypwong.org/hotkeys/)
+
+Credits:
+
+* Al Stone <ahs3@fc.hp.com>
+   sharing some programming information
+* Guido Guenther <agx@sigxcpu.org> and Pavel Mihaylov <bin@bash.info>
+   initial OneTouch enabling code
+* Jens Thoms Toerring <Jens.Toerring@physik.fu-berlin.de>
+   initial power management code
+* Peter Soos <sp@osb.hu>
+   dmi and power management code
+* Some others on OmniBook mailing list
+   providing information and testing
+
+For more information you can see the OmniBook mailing list at
+http://zurich.ai.mit.edu/mailman/listinfo/omnibook
+
+You can find actual version of this patch at
+http://sourceforge.net/projects/omke
+
+---
+Written by: Peter Soos <sp@osb.hu>
diff -uNr linux-2.4.18/arch/i386/kernel/dmi_scan.c linux-2.4.18-xe3/arch/i386/kernel/dmi_scan.c
--- linux-2.4.18/arch/i386/kernel/dmi_scan.c	Mon Feb 25 20:37:53 2002
+++ linux-2.4.18-xe3/arch/i386/kernel/dmi_scan.c	Tue Apr 16 16:30:29 2002
@@ -414,6 +414,32 @@
 	return 0;
 }
 
+/*
+ * HP OmniBook OneTouch support
+ *
+ * HP OmniBook XE3 and XT1000 laptops have special multimedia
+ * ("OneTouch") buttons disabled by default. They need to be
+ * enabled at boot time.
+ * Volume buttons on XE3 GC models are implemented in different
+ * way and do not generate scancodes. There is no public technical
+ * information about implementing them.
+ */
+
+static __init int hp_onetouch(struct dmi_blacklist *d)
+{
+	printk(KERN_INFO "%s machine detected.\n", d->ident);
+#ifdef CONFIG_VT
+	if (pm_hp_onetouch_callback == NULL)
+	{
+		hp_onetouch_init();
+		pm_hp_onetouch_callback = hp_onetouch_resume;
+		printk(KERN_INFO "%s: OneTouch buttons enabled.\n", d->ident);
+		if (d->ident == "HP OmniBook XE3 GC")
+			printk(KERN_INFO "%s: Volume buttons do not generate scancodes on this model.\n", d->ident);
+	}
+#endif
+	return 0;
+}
 
 /*
  *	Simple "print if true" callback
@@ -618,7 +644,25 @@
 			MATCH(DMI_BIOS_VERSION, "1AET38WW (1.01b)"),
 			NO_MATCH, NO_MATCH
 			} },
-	 
+
+	{ hp_onetouch, "HP OmniBook XE3 GC", { /* Enables HP OmniBook XE3 OneTouch buttons */
+			MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			MATCH(DMI_PRODUCT_VERSION, "HP OmniBook XE3 GC"),
+			NO_MATCH, NO_MATCH
+			} },
+
+	{ hp_onetouch, "HP OmniBook XE3 GF", { /* Enables HP OmniBook XE3 OneTouch buttons */
+			MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			MATCH(DMI_PRODUCT_VERSION, "HP OmniBook XE3 GF"),
+			NO_MATCH, NO_MATCH
+			} },
+
+	{ hp_onetouch, "HP OmniBook XT1000", { /* Enables HP OmniBook XT1000 OneTouch buttons */
+			MATCH(DMI_SYS_VENDOR, "Hewlett-Packard"),
+			MATCH(DMI_PRODUCT_VERSION, "HP OmniBook XT1000"),
+			NO_MATCH, NO_MATCH
+			} },
+ 
 			
 	/*
 	 *	Generic per vendor APM settings
diff -uNr linux-2.4.18/drivers/char/keyboard.c linux-2.4.18-xe3/drivers/char/keyboard.c
--- linux-2.4.18/drivers/char/keyboard.c	Mon Feb 25 20:37:57 2002
+++ linux-2.4.18-xe3/drivers/char/keyboard.c	Tue Apr 16 16:32:30 2002
@@ -161,6 +161,7 @@
 #endif
 
 static struct pm_dev *pm_kbd;
+static struct pm_dev *pm_hp_onetouch;
 
 /*
  * Many other routines do put_queue, but I think either
@@ -205,6 +206,10 @@
 	char raw_mode;
 
 	pm_access(pm_kbd);
+	if (pm_hp_onetouch_callback != NULL)
+	{
+		pm_access(pm_hp_onetouch);
+	}
 	add_keyboard_randomness(scancode | up_flag);
 
 	tty = ttytab? ttytab[fg_console]: NULL;
@@ -942,3 +947,13 @@
 
 	return 0;
 }
+
+pm_callback pm_hp_onetouch_callback = NULL;
+
+int __init hp_onetouch_init(void)
+{
+	hp_onetouch_enable();
+	pm_hp_onetouch = pm_register(PM_SYS_DEV, PM_SYS_KBC, pm_hp_onetouch_callback);
+
+	return 0;
+}
diff -uNr linux-2.4.18/drivers/char/pc_keyb.c linux-2.4.18-xe3/drivers/char/pc_keyb.c
--- linux-2.4.18/drivers/char/pc_keyb.c	Fri Nov  9 23:01:21 2001
+++ linux-2.4.18-xe3/drivers/char/pc_keyb.c	Tue Apr 16 16:33:11 2002
@@ -893,6 +893,28 @@
 	return NULL;
 }
 
+/*
+ * Enable scancodes for HP OmniBook OneTouch buttons
+ */
+void __init hp_onetouch_enable(void)
+{
+	kbd_write_command_w(0x59);
+	kbd_wait_for_input();
+	kbd_write_output_w(0x90);
+	kbd_wait_for_input();
+}
+
+/*
+ * Power management handler:
+ * on resume re-enable the HP OmniBook OneTouch buttons
+ */
+int hp_onetouch_resume(struct pm_dev *dev, pm_request_t rqst, void *data)
+{
+	if (rqst == PM_RESUME)
+		hp_onetouch_enable();
+	return 0;
+}
+
 void __init pckbd_init_hw(void)
 {
 	kbd_request_region();
diff -uNr linux-2.4.18/include/asm-i386/keyboard.h linux-2.4.18-xe3/include/asm-i386/keyboard.h
--- linux-2.4.18/include/asm-i386/keyboard.h	Thu Nov 22 20:47:23 2001
+++ linux-2.4.18-xe3/include/asm-i386/keyboard.h	Tue Apr 16 16:31:17 2002
@@ -33,6 +33,11 @@
 extern pm_callback pm_kbd_request_override;
 extern unsigned char pckbd_sysrq_xlate[128];
 
+extern int hp_onetouch_init(void);
+extern void hp_onetouch_enable(void);
+extern int hp_onetouch_resume(struct pm_dev *, pm_request_t, void *);
+extern pm_callback pm_hp_onetouch_callback;
+
 #define kbd_setkeycode		pckbd_setkeycode
 #define kbd_getkeycode		pckbd_getkeycode
 #define kbd_translate		pckbd_translate

