Index: sys/dev/i2c/files.i2c
===================================================================
RCS file: /usr/cvs/openbsd/src/sys/dev/i2c/files.i2c,v
retrieving revision 1.51
diff -u -u -r1.51 files.i2c
--- sys/dev/i2c/files.i2c	31 Mar 2013 13:30:24 -0000	1.51
+++ sys/dev/i2c/files.i2c	31 Mar 2013 18:28:55 -0000
@@ -171,3 +171,7 @@
 attach	lisa at i2c
 file	dev/i2c/lis331dl.c			lisa
 
+# Fujitsu Lifebook Keypad
+device	fjkey: wskbddev
+attach	fjkey at i2c
+file	dev/i2c/fjkey.c			    fjkey
Index: sys/dev/i2c/fjkey.c
===================================================================
RCS file: sys/dev/i2c/fjkey.c
diff -N sys/dev/i2c/fjkey.c
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ sys/dev/i2c/fjkey.c	27 Jan 2015 20:10:15 -0000
@@ -0,0 +1,460 @@
+/*
+ * Copyright (c) 2015 Ralf Horstmann
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+ * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+ * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+ * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+ * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ */
+
+#include <sys/param.h>
+#include <sys/systm.h>
+#include <sys/device.h>
+#include <sys/timeout.h>
+#include <sys/task.h>
+
+#include <dev/i2c/i2cvar.h>
+#include <dev/isa/isareg.h>
+
+#include <dev/wscons/wsconsio.h>
+#include <dev/wscons/wskbdraw.h>
+#include <dev/wscons/wskbdvar.h>
+#include <dev/wscons/wsksymdef.h>
+#include <dev/wscons/wsksymvar.h>
+
+#include <dev/pckbc/wskbdmap_mfii.h>
+
+#if __i386__
+#include <i386/isa/isa_machdep.h>
+#endif
+#if __amd64__
+#include <amd64/include/isa_machdep.h>
+#endif
+
+#define KEY_RELEASE		0	/* button release */
+#define KEY_APP_D		1
+#define KEY_APP_C		2
+#define KEY_APP_A		3
+#define KEY_APP_B		4
+
+#ifdef DEBUG
+static const char *fjkey_keyname[] = {
+	"(release)", "rewind", "forward", "play", "stop"
+};
+#endif
+
+enum fjkey_devid {
+	FJKEY_TYPE_NONE = 0,
+	FJKEY_TYPE_APPBTN = 1,
+	FJKEY_TYPE_CDBTN = 2,
+	FJKEY_TYPE_LCD = 3,
+	FJKEY_TYPE_LED = 4,
+	FJKEY_TYPE_APPBTN2 = 6,
+};
+
+enum fjkey_chip {
+	FJKEY_CHIP_NONE = 0,
+	FJKEY_CHIP_OZ992C = 1,
+	FJKEY_CHIP_OZ163T = 2,
+	FJKEY_CHIP_OZ711M3 = 4,
+};
+
+struct fjkey_internal {
+	u_int8_t fi_type;
+	u_int8_t fi_meth;
+	u_int8_t fi_chip;
+	u_int8_t fi_cmd;
+	u_int8_t fi_addr;
+	u_int8_t fi_attached;
+};
+
+struct fjkey_softc {
+	struct device		 sc_dev;
+	struct task		 sc_fjkey_tick_task;
+	i2c_tag_t		 sc_tag;
+	i2c_addr_t		 sc_addr;
+
+	struct fjkey_internal	*sc_internal;
+	struct timeout		 sc_timeout;
+	u_int16_t		 sc_oldkeys;
+	char			 sc_enabled;
+	struct device 		*sc_wskbddev;
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+	int			 sc_rawkbd;
+#endif
+};
+
+
+int	fjkey_enable(void *, int);
+void	fjkey_set_leds(void *, int);
+int	fjkey_ioctl(void *, u_long, caddr_t, int, struct proc *);
+
+const struct wskbd_accessops fjkey_accessops = {
+	fjkey_enable,
+	fjkey_set_leds,
+	fjkey_ioctl,
+};
+
+#define KC(n) KS_KEYCODE(n)
+
+static const keysym_t fjkey_keydesc[] = {
+	KC(KEY_APP_A), KS_a,
+	KC(KEY_APP_B), KS_b,
+	KC(KEY_APP_C), KS_c,
+	KC(KEY_APP_D), KS_d,
+};
+
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+#define	RAWKEY_AppA 0xe0
+#define	RAWKEY_AppB 0xe1
+#define	RAWKEY_AppC 0xe2
+#define	RAWKEY_AppD 0xe3
+static const keysym_t fjkey_xt_keymap[] = {
+	/* KC(KEY_RELEASE) */	RAWKEY_Null,
+	/* KC(KEY_REWIND), */	RAWKEY_AppD,
+	/* KC(KEY_FORWARD), */	RAWKEY_AppC,
+	/* KC(KEY_PLAY), */	RAWKEY_AppA,
+	/* KC(KEY_STOP), */	RAWKEY_AppB,
+};
+#endif
+
+static const struct wscons_keydesc fjkey_keydesctab[] = {
+	{KB_US, 0, sizeof(fjkey_keydesc)/sizeof(keysym_t), fjkey_keydesc},
+	{0, 0, 0, 0}
+};
+
+const struct wskbd_mapdata fjkey_keymapdata = {
+	fjkey_keydesctab,
+	KB_US,
+};
+
+int		 fjkey_match(struct device *, void *, void *);
+void		 fjkey_attach(struct device *, struct device *, void *);
+void		 fjkey_tick(void *);
+void		 fjkey_input(struct fjkey_softc *, int, int);
+void		 fjkey_changes(void *arg1, int keys);
+void		 fjkey_refresh(void *);
+u_int8_t	*fjkey_signature(void);
+int		 fjkey_scan_bios(struct fjkey_internal *);
+
+struct fjkey_internal fjkey_internal_data;
+
+struct cfattach fjkey_ca = {
+	sizeof(struct fjkey_softc), fjkey_match, fjkey_attach
+};
+
+struct cfdriver fjkey_cd = {
+	NULL, "fjkey", DV_DULL
+};
+
+int
+fjkey_match(struct device *parent, void *match, void *aux)
+{
+	struct i2c_attach_args *ia = aux;
+
+	if (strcmp(ia->ia_name, "unknown") != 0)
+		return (0);
+
+	if (!fjkey_scan_bios(&fjkey_internal_data))
+		return (0);
+
+	ia->ia_addr = fjkey_internal_data.fi_addr;
+	ia->ia_name = "fjkey";
+	return (1);
+}
+
+void
+fjkey_attach(struct device *parent, struct device *self, void *aux)
+{
+	struct fjkey_softc *sc = (struct fjkey_softc *)self;
+	struct i2c_attach_args *ia = aux;
+	u_int16_t keys;
+	u_int8_t cmd;
+	struct wskbddev_attach_args a;
+
+	printf(": ");
+
+	if (ia->ia_addr == 0) {
+		printf(" not found\n");
+		return;
+	}
+
+	sc->sc_tag = ia->ia_tag;
+	sc->sc_addr = ia->ia_addr;
+	sc->sc_internal = &fjkey_internal_data;
+
+	if (sc->sc_internal->fi_attached) {
+		printf(" already attached\n");
+		return;
+	}
+	sc->sc_internal->fi_attached = 1;
+
+	printf(" type %u meth %u chip %u cmd %u",
+	    sc->sc_internal->fi_type,
+	    sc->sc_internal->fi_meth,
+	    sc->sc_internal->fi_chip,
+	    sc->sc_internal->fi_cmd);
+
+	cmd = sc->sc_internal->fi_cmd;
+	keys = 0;
+	iic_acquire_bus(sc->sc_tag, 0);
+	if (iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, sc->sc_addr,
+	    &cmd, sizeof cmd, &keys, sizeof keys, 0) != 0) {
+		printf(", write error\n");
+		iic_release_bus(sc->sc_tag, 0);
+		return;
+	}
+	iic_release_bus(sc->sc_tag, 0);
+	printf("\n");
+
+	sc->sc_oldkeys = 0;
+	sc->sc_enabled = 0;
+
+	a.console = 0;
+	a.keymap = &fjkey_keymapdata;
+	a.accessops = &fjkey_accessops;
+	a.accesscookie = sc;
+
+	sc->sc_wskbddev = config_found(self, &a, wskbddevprint);
+
+	task_set(&sc->sc_fjkey_tick_task, fjkey_refresh, sc);
+
+	timeout_set(&sc->sc_timeout, fjkey_tick, sc);
+	timeout_add_msec(&sc->sc_timeout, 500);
+}
+
+void
+fjkey_tick(void *arg)
+{
+	struct fjkey_softc *sc = arg;
+
+	task_add(systq, &sc->sc_fjkey_tick_task);
+}
+
+/*
+ * generate wskb keypress event for given key
+ */
+void
+fjkey_input(struct fjkey_softc *sc, int key, int down)
+{
+	u_int type = down ? WSCONS_EVENT_KEY_DOWN : WSCONS_EVENT_KEY_UP;
+	int s;
+
+#ifdef DEBUG
+	if (down)
+		printf("fjkey: %s pressed\n", fjkey_keyname[key]);
+	else
+		printf("fjkey: %s released\n", fjkey_keyname[key]);
+#endif
+
+	if (!sc->sc_wskbddev)
+		return;
+
+	s = spltty();
+
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+	if (sc->sc_rawkbd) {
+		int c;
+		u_char cbuf[2];
+		int ncbuf = 0;
+
+		c = fjkey_xt_keymap[key];
+		if (c & 0x80)
+			cbuf[ncbuf++] = 0xe0;
+		cbuf[ncbuf] = c & 0x7f;
+
+		if (!down)
+			cbuf[ncbuf] |= 0x80;
+		ncbuf++;
+
+		wskbd_rawinput(sc->sc_wskbddev, cbuf, ncbuf);
+	} else
+#endif
+		wskbd_input(sc->sc_wskbddev, type, key);
+
+	splx(s);
+}
+
+/*
+ * check for changed key bits and generate events
+ */
+void
+fjkey_changes(void *arg1, int newkeys)
+{
+	struct fjkey_softc *sc = arg1;
+	int i, inputkeys, count;
+
+	inputkeys = 0;
+
+	if (newkeys == sc->sc_oldkeys)
+		return;
+
+	count = 0;
+	for (i = 0; i < 4; ++i) {
+		if ((newkeys & (1 << i)) != (sc->sc_oldkeys & (1 << i))) {
+			if (newkeys & (1 << i)) {
+				inputkeys |= (1 << i);
+				count++;
+			}
+		}
+	}
+	if (count > 1) {
+		printf("fjkey: muliple keys (new=%d, old=%d)\n", newkeys, sc->sc_oldkeys);
+	}
+
+	if (inputkeys && sc->sc_enabled && count < 3) {
+		for (i = 0; i < 4; ++i) {
+			if (inputkeys & (1 << i)) {
+				fjkey_input(sc, i + 1, 1);
+				fjkey_input(sc, i + 1, 0);
+			}
+		}
+	}
+
+	sc->sc_oldkeys = newkeys;
+}
+
+/*
+ * query i2c sensor for changed key state
+ */
+void
+fjkey_refresh(void *arg1)
+{
+	struct fjkey_softc *sc = arg1;
+	u_int8_t cmd;
+	u_int16_t keys;
+	int res;
+
+	cmd = sc->sc_internal->fi_cmd;
+	keys = 0;
+	res = iic_acquire_bus(sc->sc_tag, 0);
+	if (res != 0)
+		printf("fjkey: iic_acquire_bus = %d\n", res);
+	if (iic_exec(sc->sc_tag, I2C_OP_READ_WITH_STOP, sc->sc_addr,
+	    &cmd, sizeof cmd, &keys, sizeof keys, 0) == 0)
+		fjkey_changes(sc, keys);
+
+	/* clear latch */
+	cmd = sc->sc_internal->fi_cmd;
+	keys = 0;
+	iic_exec(sc->sc_tag, I2C_OP_WRITE_WITH_STOP, sc->sc_addr,
+	    &cmd, sizeof cmd, &keys, sizeof keys, 0);
+
+	iic_release_bus(sc->sc_tag, 0);
+
+	timeout_add_msec(&sc->sc_timeout, 500);
+}
+
+/*
+ * search bios for FJKEYINF signature
+ */
+u_int8_t *
+fjkey_signature()
+{
+	const unsigned char signature[] = "FJKEYINF";
+	u_int8_t *va;
+	u_int8_t *bios, *ebios;
+
+	bios = ISA_HOLE_VADDR(0x0f0000);
+	ebios = ISA_HOLE_VADDR(0x100000);
+	for (va = bios; va < ebios; va += 0x10) {
+		if (memcmp(va, signature, sizeof(signature)-1) == 0) {
+			va += 8; /* skip signature string */
+			return va;
+		}
+	}
+	return NULL;
+}
+
+/*
+ * scan fjkeyinf records for app button function
+ */
+int fjkey_scan_bios(struct fjkey_internal *fi)
+{
+	int i;
+	u_int8_t func, meth, chip, addr;
+	u_int8_t *va;
+
+	va = fjkey_signature();
+
+	if (va == NULL) {
+		printf("fjkey: no signature found\n");
+		return (0);
+	}
+
+	for (i = 0; i < 6; ++i, va+=4) {
+		func = va[0] & 0x7f;
+		meth = va[1];
+		chip = va[2];
+		addr = (va[3] >> 1) & 0x7f;
+
+		if (func == 0)
+			return (0);
+
+		if (func != FJKEY_TYPE_APPBTN && func != FJKEY_TYPE_APPBTN2)
+			continue;
+
+		if (meth != 1 && meth != 2 && meth != 4)
+			continue;
+
+		fi->fi_type = FJKEY_TYPE_APPBTN;
+		fi->fi_meth = meth;
+		fi->fi_chip = chip;
+		fi->fi_addr = addr;
+		if (chip == FJKEY_CHIP_OZ992C) {
+			fi->fi_cmd = 0;
+		} else {
+			fi->fi_cmd = 8;
+		}
+		return (1);
+	}
+	return (0);
+}
+
+int
+fjkey_enable(void *v, int on)
+{
+	struct fjkey_softc *sc = v;
+
+	if (sc->sc_enabled == on)
+		return EBUSY;
+
+	sc->sc_enabled = on;
+	return 0;
+}
+
+void
+fjkey_set_leds(void *v, int leds)
+{
+	return;
+}
+
+int
+fjkey_ioctl(void *v, u_long cmd, caddr_t data, int flag, struct proc *p)
+{
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+	struct fjkey_softc *sc = v;
+#endif
+
+	switch (cmd) {
+	case WSKBDIO_GTYPE:
+		*(int *)data = WSKBD_TYPE_PC_XT;
+		return (0);
+	case WSKBDIO_SETLEDS:
+		return (0);
+#ifdef WSDISPLAY_COMPAT_RAWKBD
+	case WSKBDIO_SETMODE:
+		sc->sc_rawkbd = *(int *)data == WSKBD_RAW;
+		return (0);
+#endif
+	}
+	return -1;
+}
+
Index: share/man/man4/man4.amd64/Makefile
===================================================================
RCS file: /usr/cvs/openbsd/src/share/man/man4/man4.amd64/Makefile,v
retrieving revision 1.16
diff -u -u -r1.16 Makefile
--- share/man/man4/man4.amd64/Makefile	10 Dec 2014 05:42:25 -0000	1.16
+++ share/man/man4/man4.amd64/Makefile	17 Dec 2014 19:47:59 -0000
@@ -1,6 +1,6 @@
 #	$OpenBSD: Makefile,v 1.16 2014/12/10 05:42:25 jsg Exp $
 
-MAN=	amdpcib.4 apm.4 autoconf.4 bios.4 cpu.4 intro.4 ioapic.4 \
+MAN=	amdpcib.4 apm.4 autoconf.4 bios.4 cpu.4 fjkey.4 intro.4 ioapic.4 \
 	mem.4 mpbios.4 nvram.4 mtrr.4 pctr.4 skgpio.4 tcpcib.4
 
 MLINKS+= mem.4 kmem.4
Index: share/man/man4/man4.amd64/fjkey.4
===================================================================
RCS file: share/man/man4/man4.amd64/fjkey.4
diff -N share/man/man4/man4.amd64/fjkey.4
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ share/man/man4/man4.amd64/fjkey.4	20 Apr 2013 07:16:27 -0000
@@ -0,0 +1,102 @@
+.\" $OpenBSD$
+.\"
+.\" Copyright (c) 2011 Ralf Horstmann
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate$
+.Dt FJKEY 4 i386
+.Os
+.Sh NAME
+.Nm fjkey
+.Nd Fujitsu Lifebook application button support
+.Sh SYNOPSIS
+.Cd "fjkey0   at iic?"
+.Cd "wskbd*   at fjkey0"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the application panel buttons of some
+Fujitsu or Fujitsu-Siemens laptops.  Access to the additional keys
+generated by the remote control is through the
+.Xr wskbd 4
+driver.
+.Pp
+In translated mode (when not running X) the keys generated by
+pressing the buttons on the remote control are:
+.Pp
+.Bl -tag -width "xxxxxxxxxxxx" -compact -offset indent
+.It Li Button A
+a
+.It Li Button B
+b
+.It Li Rotate
+c
+.It Li "Fn"
+d
+.El
+.Pp
+In raw mode (when running X) the following keycodes are generated:
+.Pp
+.Bl -tag -width "xxxxxxxxxxxx" -compact -offset indent
+.It Li Button A
+224
+.It Li Button B
+225
+.It Li Rotate
+226
+.It Li "Fn"
+227
+.El
+.Pp
+The button labels in the above tables apply to a Lifebook T4215, they
+might differ for other models.
+
+.Sh EXAMPLES
+Sample
+.Pa ~/.Xmodmap
+configuration file that can be loaded with
+.Xr xmodmap 1 ,
+or automatically when
+.Xr X 1
+starts:
+.Bd -literal -offset indent
+! Map to to extended F-keys
+keycode 224 = R1
+keycode 225 = R2
+keycode 226 = R3
+keycode 227 = R4
+.Ed
+.Pp
+To start applications from within
+.Xr cwm 1
+these
+.Pa ~/.cwmrc
+entries can be used:
+.Bd -literal -offset indent
+bind R1 terminal
+bind R2 "xman"
+bind R3 "xeyes"
+bind R4 "xedit"
+.Ed
+.Sh SEE ALSO
+.Xr xmodmap 1 ,
+.Xr wscons 4 ,
+.Xr wskbd 4 ,
+.Xr cwm 1 ,
+.Xr cmwrc 5
+.Sh HISTORY
+The
+.Nm
+driver never appeared in
+.Ox .
Index: share/man/man4/man4.i386/Makefile
===================================================================
RCS file: /usr/cvs/openbsd/src/share/man/man4/man4.i386/Makefile,v
retrieving revision 1.73
diff -u -u -r1.73 Makefile
--- share/man/man4/man4.i386/Makefile	10 Dec 2014 05:42:25 -0000	1.73
+++ share/man/man4/man4.i386/Makefile	17 Dec 2014 19:47:27 -0000
@@ -3,7 +3,7 @@
 #	Id: Makefile,v 1.4 1995/12/14 05:41:38 deraadt Exp $
 
 MAN=	amdpcib.4 amdmsr.4 apm.4 autoconf.4 bios.4 cpu.4 elansc.4 \
-	esm.4 geodesc.4 glxpcib.4 glxsb.4 gscpcib.4 gscpm.4 gus.4 ie.4 \
+	esm.4 fjkey.4 geodesc.4 glxpcib.4 glxsb.4 gscpcib.4 gscpm.4 gus.4 ie.4 \
 	ichpcib.4 intro.4 ioapic.4 \
 	joy.4 le.4 lms.4 mem.4 mms.4 mpbios.4 mtrr.4 npx.4 nvram.4 \
 	pas.4 pcibios.4 pctr.4 piixpcib.4 sb.4 \
Index: share/man/man4/man4.i386/fjkey.4
===================================================================
RCS file: share/man/man4/man4.i386/fjkey.4
diff -N share/man/man4/man4.i386/fjkey.4
--- /dev/null	1 Jan 1970 00:00:00 -0000
+++ share/man/man4/man4.i386/fjkey.4	20 Apr 2013 07:16:15 -0000
@@ -0,0 +1,102 @@
+.\" $OpenBSD$
+.\"
+.\" Copyright (c) 2011 Ralf Horstmann
+.\"
+.\" Permission to use, copy, modify, and distribute this software for any
+.\" purpose with or without fee is hereby granted, provided that the above
+.\" copyright notice and this permission notice appear in all copies.
+.\"
+.\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
+.\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
+.\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
+.\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
+.\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
+.\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+.\"
+.Dd $Mdocdate$
+.Dt FJKEY 4 i386
+.Os
+.Sh NAME
+.Nm fjkey
+.Nd Fujitsu Lifebook application button support
+.Sh SYNOPSIS
+.Cd "fjkey0   at iic?"
+.Cd "wskbd*   at fjkey0"
+.Sh DESCRIPTION
+The
+.Nm
+driver provides support for the application panel buttons of some
+Fujitsu or Fujitsu-Siemens laptops.  Access to the additional keys
+generated by the remote control is through the
+.Xr wskbd 4
+driver.
+.Pp
+In translated mode (when not running X) the keys generated by
+pressing the buttons on the remote control are:
+.Pp
+.Bl -tag -width "xxxxxxxxxxxx" -compact -offset indent
+.It Li Button A
+a
+.It Li Button B
+b
+.It Li Rotate
+c
+.It Li "Fn"
+d
+.El
+.Pp
+In raw mode (when running X) the following keycodes are generated:
+.Pp
+.Bl -tag -width "xxxxxxxxxxxx" -compact -offset indent
+.It Li Button A
+224
+.It Li Button B
+225
+.It Li Rotate
+226
+.It Li "Fn"
+227
+.El
+.Pp
+The button labels in the above tables apply to a Lifebook T4215, they
+might differ for other models.
+
+.Sh EXAMPLES
+Sample
+.Pa ~/.Xmodmap
+configuration file that can be loaded with
+.Xr xmodmap 1 ,
+or automatically when
+.Xr X 1
+starts:
+.Bd -literal -offset indent
+! Map to to extended F-keys
+keycode 224 = R1
+keycode 225 = R2
+keycode 226 = R3
+keycode 227 = R4
+.Ed
+.Pp
+To start applications from within
+.Xr cwm 1
+these
+.Pa ~/.cwmrc
+entries can be used:
+.Bd -literal -offset indent
+bind R1 terminal
+bind R2 "xman"
+bind R3 "xeyes"
+bind R4 "xedit"
+.Ed
+.Sh SEE ALSO
+.Xr xmodmap 1 ,
+.Xr wscons 4 ,
+.Xr wskbd 4 ,
+.Xr cwm 1 ,
+.Xr cmwrc 5
+.Sh HISTORY
+The
+.Nm
+driver never appeared in
+.Ox .
Index: sys/arch/i386/conf/GENERIC
===================================================================
RCS file: /usr/cvs/openbsd/src/sys/arch/i386/conf/GENERIC,v
retrieving revision 1.793
diff -u -u -r1.793 GENERIC
--- sys/arch/i386/conf/GENERIC	3 Jan 2015 20:39:11 -0000	1.793
+++ sys/arch/i386/conf/GENERIC	4 Jan 2015 18:37:32 -0000
@@ -181,6 +181,9 @@
 wbng*	at iic?				# Winbond W83793G
 nvt*	at iic?				# Novoton W83795G
 
+fjkey0	at iic?	addr 0x0		# Fujitsu Lifebook Keypad
+wskbd*	at fjkey0 mux 1
+
 #isagpio0 at isa? port 0x78		# ISA I/O mapped as GPIO
 #isagpio1 at isa? port 0x80
 
Index: sys/arch/amd64/conf/GENERIC
===================================================================
RCS file: /usr/cvs/openbsd/src/sys/arch/amd64/conf/GENERIC,v
retrieving revision 1.383
diff -u -u -r1.383 GENERIC
--- sys/arch/amd64/conf/GENERIC	3 Jan 2015 21:24:19 -0000	1.383
+++ sys/arch/amd64/conf/GENERIC	3 Jan 2015 23:12:13 -0000
@@ -141,6 +141,9 @@
 wbng*	at iic?			# Winbond W83793G
 nvt*	at iic?			# Novoton W83795G
 
+fjkey0	at iic? addr 0x0	# Fujitsu Lifebook Keypad
+wskbd*	at fjkey0 mux 1
+
 skgpio0 at isa? port 0x680	# Soekris net6501 GPIO and LEDs
 gpio* at skgpio?
 
