[BACK]Return to jmcu_kbdmap.h CVS log [TXT][DIR] Up to [local] / sys / arch / jornada / dev

File: [local] / sys / arch / jornada / dev / jmcu_kbdmap.h (download)

Revision 1.2, Sun May 11 09:26:11 2008 UTC (16 years ago) by nbrk
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +57 -2 lines

Sync up my latest modifications related to OpenBSD/jornada.
At this point PCMCIA is not done (this is primary goal since it's only
expansion bus for SA-1110) but some other chip subsystems rather work.
One of most recent problems sit in ported NetBSD pcic driver. It cause memory
abort passing odd addr to bus_space_write_2 (APB transactions are word-wide,
but I try to emulate 2-bytes accesses in bus_space_map for sa1111).
Other problematic/untested areas: sacic, saic. UART driver is a stub and not
really useful.
But even with this problems I have overdone my plans with this porting effort.

/*
 * $Id: jmcu_kbdmap.h,v 1.2 2008/05/11 09:26:11 nbrk Exp $
 */
#define KC(n) KS_KEYCODE(n)
#include <dev/wscons/wskbdraw.h>


static const keysym_t jmcukbd_keydesc_us[] = {
	KC(0x11),	KS_1,
	KC(0x12),	KS_2,
	KC(0x13),	KS_3,
	KC(0x14),	KS_4,
	KC(0x15),	KS_5,
	KC(0x16),	KS_6,
	KC(0x17),	KS_7,
	KC(0x18),	KS_8,
	KC(0x19),	KS_9,
	KC(0x1a),	KS_0,
	KC(0x1b),	KS_minus,
	KC(0x1c),	KS_equal,

	KC(0x21),	KS_q,
	KC(0x22),	KS_w,
	KC(0x23),	KS_e,
	KC(0x24),	KS_r,
	KC(0x25),	KS_t,
	KC(0x26),	KS_y,
	KC(0x27),	KS_u,
	KC(0x28),	KS_i,
	KC(0x29),	KS_o,
	KC(0x2a),	KS_p,
	KC(0x2b),	KS_backslash,
	KC(0x2c),	KS_BackSpace,

	KC(0x31),	KS_a,
	KC(0x32),	KS_s,
	KC(0x33),	KS_d,
	KC(0x34),	KS_f,
	KC(0x35),	KS_g,
	KC(0x36),	KS_h,
	KC(0x37),	KS_j,
	KC(0x38),	KS_k,
	KC(0x39),	KS_l,
	KC(0x3a),	KS_semicolon,

	KC(0x41),	KS_z,
	KC(0x42),	KS_x,
	KC(0x43),	KS_c,
	KC(0x44),	KS_v,
	KC(0x45),	KS_b,
	KC(0x46),	KS_n,
	KC(0x47),	KS_m,
	KC(0x48),	KS_comma,

	KC(0x49),	KS_colon,
	KC(0x4b),	KS_period,
	KC(0x4c),	KS_Return,

	/* TODO: all other and functional buttons */
	KC(0x74),	KS_space,
	KC(0x78),	KS_slash,

	KC(0x51),	KS_Tab,
	KC(0x53),	KS_Shift_L,
	KC(0x5a),	KS_KP_Up,
};


#define KBD_MAP(name, base, map) \
			{ name, base, sizeof(map)/sizeof(keysym_t), map }

static const struct wscons_keydesc jmcukbd_keydesctab[] = {
        KBD_MAP(KB_US,                  0,      jmcukbd_keydesc_us),
        {0, 0, 0, 0}
};

#undef KBD_MAP
#undef KC