
european
0: 7  6  5  4  3  2  1  0
1: ;  ]  [  \  =  -  9  8
2: B  A  '  /  .  ,  `  '
3: J  I  H  G  F  E  D  C
4: R  Q  P  O  N  M  L  K  
5: Z  Y  X  W  V  U  T  S
6: f3 f2 f1 co cl gr ct sh
7: rt sl bs st ta es f5 f4
8: ri do up le dl in hm sp

--------------------------------------------------------------------------------

=========================================================================


3. KEYBOARD INTERFACE

Altough the MSX2 keyboard has the same design as that of the MSX1, it is more 
convenient to use because of the Romand-to-kana translation available for 
kana input. This chapter describes the keyboard interface of the MSX2.

Descriptions of the key aarangement are based on the Japanese keyboard 
standard; note that data is slightly different for the international MSX 
versions.


3.1 Key Scanning

MSX uses the key matrices as shown in Figure 5.16, Figure 5.17 and Figure 
5.17B. The key status can be obtained in real time by examining this key 
matrix and is available for reading input.

Scanning the key matrix is done by the following BIOS routine.


* SNSMAT (0141H/MAIN) ................. reads the specified line of the
					key matrix

Input:		A <-- key matrix line to be read (0 to 10)
Output: 	A <-- status of the specified line of the key matrix
		      (when pressed, the bit of the key is 0)
Function:	specifies a line of the key matrix shown in Figure 5.16,
		Figure 5.17 or Figure 5.17B and stores its status in the
		A register. The bit corresponding with the key being pressed
		is "0", and "1" for the key not being pressed.


   Figure 5.16	MSX USA version key matrix

MSB								       LSB
	7	6	5	4	3	2	1	0
    -----------------------------------------------------------------
 0  |	B   |	L   |	    |	/   |	1   |	S   |	X   |	,   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 1  |	V   |	J   |	=   |	`   |	Q   |	A   |	C   |	N   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 2  |	G   |	8   |	0   |	]   |	W   |	F   |	Z   |	M   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 3  |	T   |	I   |	~   |	;   |	2   |	D   |	U   |	\   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 4  |	6   |	K   |	P   |	'   |   3   |   R   |   7   |   H   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 5  |	5   |	0   |	9   |	[   |	4   |	E   |	Y   |	.   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 6  |	F3  |	F2  |	F1  | CODE  | CAPS  | GRAPH | CTRL  | SHIFT |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 7  | RETURN| SELECT|	BS  | STOP  |  TAB  |  ESC  |	F5  |	F4  |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 8  | RIGHT | DOWN  |	UP  | LEFT  |  DEL  |  INS  | HOME  | SPACE |
    -----------------------------------------------------------------

    [TEN KEY]
    -----------------------------------------------------------------
 9  |	4   |	3   |	2   |	1   |	0   | option| option| option|
    |-------+-------+-------+-------+-------+-------+-------+-------|
10  |	.   |	,   |	-   |	9   |	8   |	7   |	6   |	5   |
    -----------------------------------------------------------------


   Figure 5.17	MSX International version key matrix

MSB								       LSB
	7	6	5	4	3	2	1	0
    -----------------------------------------------------------------
 0  |	B   |	L   |deadkey|	/   |	1   |	S   |	X   |	,   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 1  |	V   |	J   |	^   |	]   |	Q   |	A   |	C   |	N   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 2  |	G   |	8   |	0   |	[   |	W   |	F   |	Z   |	M   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 3  |	T   |	I   |	~   |	;   |	2   |	D   |	U   |	\   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 4  |	6   |	K   |	P   |	:   |	3   |	R   |	7   |	H   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 5  |	5   |	0   |	9   |	@   |	4   |	E   |	Y   |	.   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 6  |	F3  |	F2  |	F1  | CODE  | CAPS  | GRAPH | CTRL  | SHIFT |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 7  | RETURN| SELECT|	BS  | STOP  |  TAB  |  ESC  |	F5  |	F4  |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 8  | RIGHT | DOWN  |	UP  | LEFT  |  DEL  |  INS  | HOME  | SPACE |
    -----------------------------------------------------------------

    [TEN KEY]
    -----------------------------------------------------------------
 9  |	4   |	3   |	2   |	1   |	0   | option| option| option|
    |-------+-------+-------+-------+-------+-------+-------+-------|
10  |	.   |	,   |	-   |	9   |	8   |	7   |	6   |	5   |
    -----------------------------------------------------------------


   Figure 5.17B  MSX European version key matrix

MSB								       LSB
	7	6	5	4	3	2	1	0
    -----------------------------------------------------------------
 0  |	7   |	6   |	5   |	4   |	3   |	2   |	1   |	0   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 1  |	;   |	]   |	[   |	\   |	=   |	-   |	9   |	8   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 2  |	B   |	A   | accent|	/   |	.   |	,   |	`   |	'   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 3  |	J   |	I   |	H   |	G   |	F   |	E   |	D   |	C   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 4  |	R   |	Q   |	P   |	O   |	N   |	M   |	L   |	K   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 5  |	Z   |	Y   |	X   |	W   |	V   |	U   |	T   |	S   |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 6  |	F3  |	F2  |	F1  | CODE  | CAPS  | GRAPH | CTRL  | SHIFT |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 7  | RETURN| SELECT|	BS  | STOP  |  TAB  |  ESC  |	F5  |	F4  |
    |-------+-------+-------+-------+-------+-------+-------+-------|
 8  | RIGHT | DOWN  |	UP  | LEFT  |  DEL  |  INS  | HOME  | SPACE |
    -----------------------------------------------------------------

    [TEN KEY]
    -----------------------------------------------------------------
 9  |	4   |	3   |	2   |	1   |	0   | option| option| option|
    |-------+-------+-------+-------+-------+-------+-------+-------|
10  |	.   |	,   |	-   |	9   |	8   |	7   |	6   |	5   |
    -----------------------------------------------------------------
