Keyboard

From BeebWiki
Revision as of 15:51, 23 February 2017 by Ctr (talk | contribs) (Keyboard Scan Codes: Added scan code matrix)
Jump to: navigation, search


The keyboard is attached to the slow bus and accessed by the system VIA. There are 74 keys including BREAK. 73 keys and 8 keyboard links are wired in a 10 × 8 matrix; the two SHIFT keys are connected to one cell and cannot be told apart. The BREAK key is on a separate circuit and resets the computer.

All keys except CTRL and SHIFT cause an interrupt when pressed, which makes the BBC scan the keyboard to identify the key(s) that are held down.

The keyboard has an unusual bit-paired layout, unlike the typewriter-paired layout that is standard on British PCs. Pressing SHIFT or CTRL neatly adds or subtracts a power of two from the ASCII value of the base character, except for the singleton characters space, 0, @, _, £ and DELETE. The layout is shown in Chapter 1 of the User Guide.

There is a circuit diagram of the keyboard on page 489 of The Advanced User Guide.

BBC Micro keyboard types
8bs.com Type[1] Seen on Key legends Key sound PCB colour Chassis plate Key switches Space bar support DIP switch orientation
Type 1 B, ? Large Flat Beige Narrow margins, lip at front White, round body, square-edged shoulder, cross head Plastic tabs and wire rod (concealed) East-west (under DELETE)
Type 2 B, B+ Small Echoing Tawny brown Wide margins, deep skirt Black, square body, chamfered shoulder, cross head Wire rod support North-south
Type 3  ? Large Flat Tawny brown Wide margins, shallow skirt Dark grey, deep bevelled shoulder, square cup head Plastic guides? North-south
Type 4  ? Large Echoing Beige Narrow margins, lip at front Black, square body, chamfered shoulder, cross head Wire rod support East-west (between SHIFT and DELETE)

-- beardo 00:01, 18 October 2007 (BST)

Keyboard Scan Codes

The number under each key is the scan code in hexadecimal.

f0

&20
f1

&71
f2

&72
f3

&73
f4

&14
f5

&74
f6

&75
f7

&16
f8

&76
f9

&77
BREAK

ESCAPE

&70
!
1

&30
"
2

&31
#
3

&11
$
4

&12
%
5

&13
&
6

&34
'
7

&24
(
8

&15
)
9

&26
Ø

&27
=
-

&17
~
^

&18
|
\

&78

&19

&79
TAB

&60
Q

&10
W

&21
E

&22
R

&33
T

&23
Y

&44
U

&35
I

&25
O

&36
P

&37
@

&47
{
[

&38
£

&28

&39

&29
CAPS LOCK

&40
CTRL

&01
A

&41
S

&51
D

&32
F

&43
G

&53
H

&54
J

&45
K

&46
L

&56
+
;

&57
*
:

&48
}
]

&58
RETURN

&49
SHIFT LOCK

&50
SHIFT

&00
Z

&61
X

&42
C

&52
V

&63
B

&64
N

&55
M

&65
<
,

&66
>
.

&67
?
/

&68
SHIFT

&00
DELETE

&59
COPY

&69
SPACE

&62
bit 7

&02
bit 6

&03
bit 5

&04
bit 4

&05
bit 3

&06
bit 2

&07
bit 1

&08
bit 0

&09

Scan Code Matrix

Columns 10 to 12 contain the Master keypad scan codes.

Note that rows 0 and 7 are swapped.

C0C1C2C3C4C5C6C7C8C9C10C11C12
R7
ESCAPE

&70
f1

&71
f2

&72
f3

&73
f5

&74
f6

&75
f8

&76
f9

&77
|
\

&78

&79
4

&7A
5

&7B
2

&7C
R1
Q

&10
#
3

&11
$
4

&12
%
5

&13
f4

&14
(
8

&15
f7

&16
=
-

&17
~
^

&18

&19
6

&1A
7

&1B
R2
f0

&20
W

&21
E

&22
T

&23
'
7

&24
I

&25
)
9

&26
Ø

&27
£

&28

&29
8

&2A
9

&2B
R3
!
1

&30
"
2

&31
D

&32
R

&33
&
6

&34
U

&35
O

&36
P

&37
{
[

&38

&39
+

&3A
-

&3B
RETURN

&3C
R4
CAPS LOCK

&40
A

&41
X

&42
F

&43
Y

&44
J

&45
K

&46
@

&47
*
:

&48
RETURN

&49
/

&4A
DELETE

&4B
.

&4C
R5
SHIFT LOCK

&50
S

&51
C

&52
G

&53
H

&54
N

&55
L

&56
+
;

&57
}
]

&58
DELETE

&59
#

&5A
*

&5B
,

&5C
R6
TAB

&60
Z

&61
SPACE

&62
V

&63
B

&64
M

&65
<
,

&66
>
.

&67
?
/

&68
COPY

&69
Ø

&6A
1

&6B
3

&6C
R0
SHIFT

&00
CTRL

&01
bit 7

&02
bit 6

&03
bit 5

&04
bit 4

&05
bit 3

&06
bit 2

&07
bit 1

&08
bit 0

&09