ftp.nice.ch/pub/next/developer/languages/c/gcc.2.7.2.2.N.b.tar.gz#/lib/gcc-lib/m68k-next-nextstep3/2.7.2.2.f.2/include/architecture/adb_kb_map.h

This is adb_kb_map.h in view mode; [Download] [Up]

/* Copyright (c) 1991 NeXT Computer, Inc.  All rights reserved.
 * 
 *	File:	achitecture/adb_kb_map.h
 *
 *	Definition of ADB keyboard scancode conversion mechanism.
 *
 * HISTORY
 * 07-Oct-91  Doug Mitchell at NeXT
 *	Created
 */
 
#ifndef	_ARCHITECTURE_ADB_KB_MAP_
#define _ARCHITECTURE_ADB_KB_MAP_

#import <architecture/ascii_codes.h>
#import <architecture/adb_bus.h>

/*
 * Each key down event maps to an unsigned short. The first 128 possible
 * mapped values are the ASCII character set. Values starting at 0x100 are 
 * non-printing keys, called "super keys", which are interpreted by
 * the keyboard driver directly. 
 */
typedef unsigned short 	adb_key_val_t;

#define ADB_SUPER_BASE		0x100
#define KEY_INVALID		ADB_SUPER_BASE		/* invalid */
#define ADB_RESET		(ADB_SUPER_BASE + 1)	/* apple reset */
#define ADB_POWER		ADB_RESET		/* NeXT power */
#define BRIGHT_UP		(ADB_SUPER_BASE + 2)
#define BRIGHT_DOWN		(ADB_SUPER_BASE + 3)
#define VOLUME_UP		(ADB_SUPER_BASE + 4)
#define VOLUME_DOWN		(ADB_SUPER_BASE + 5)
#define CURS_LEFT		(ADB_SUPER_BASE + 6)	/* cursor keys */
#define CURS_RIGHT		(ADB_SUPER_BASE + 7)
#define CURS_UP			(ADB_SUPER_BASE + 8)
#define CURS_DOWN		(ADB_SUPER_BASE + 9)
#define CTL_LEFT		(ADB_SUPER_BASE + 10)	/* control keys */
#define CTL_RIGHT		(ADB_SUPER_BASE + 11)
#define SHIFT_LEFT		(ADB_SUPER_BASE + 12)	/* shift keys */
#define SHIFT_RIGHT		(ADB_SUPER_BASE + 13)
#define OPTION_LEFT		(ADB_SUPER_BASE + 14) 	/* Apple: option */
#define OPTION_RIGHT		(ADB_SUPER_BASE + 15)
#define ALT_LEFT		OPTION_LEFT		/* NeXT: Alt */
#define ALT_RIGHT		OPTION_RIGHT
#define APPLE_LEFT		(ADB_SUPER_BASE + 16)	/* Apple: Apple */
#define APPLE_RIGHT		(ADB_SUPER_BASE + 17)	
#define CMD_LEFT		APPLE_LEFT		/* NeXT: command */
#define CMD_RIGHT		APPLE_RIGHT
#define CAPS_LOCK		(ADB_SUPER_BASE + 18)
#define ADB_CLEAR		(ADB_SUPER_BASE + 19)
#define KB_INTERRUPT		(ADB_SUPER_BASE + 20)

/*
 * ASCII values for one keycode. Mapping for one keyboard consists of 
 * an array of 128 of these, one for each possible scan code.
 */
typedef struct {
	adb_key_val_t normal;		/* non meta ASCII values*/
	adb_key_val_t shift;
	adb_key_val_t control;
	adb_key_val_t control_shift;	
} adb_key_t;

/*
 * Mapping for a keyboard described by an adbHandlerId.
 * adb_kb_map.key points to an array of NUM_ADB_KEYCODES keycodes.
 */
#define NUM_ADB_KEYCODES	128

typedef struct {
	adbHandlerId		handler_id;
	const adb_key_t		*key;
} adb_kb_map_t;

#endif

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.