Keyboard Connectors

This page covers various keyboard-related physical interfaces such as connectors/plugs, modular cable sockets, PCB header pins, and cable wire colour coding. General connectors and cable sockets are organised into sections containing just that specific type of plug or socket, whereas the rest are organised into sections dedicated to their host keyboard.

Contents

Plug & socket identification

Note

The introduction dates given are approximate for their introduction on IBM and family keyboards, not when the connector itself was introduced in general.

DB-25 male plug

A screwable D-subminiature plug used by IBM 3270 and 5280 compatible terminal keyboards that transmitted scancodes in parallelised bits and had a clicker assembly or a buzzer. This includes the 327X-75, 327X-87 and 327X-OC type Model Bs, all IBM 5280-series Model Bs, and Type 1 104-key Model F Converged Keyboards. The amount of pins actually present could vary between exact keyboard series.

DA-15 male plug

A screwable D-subminiature plug used by various IBM terminal keyboards such as 3101, 525X-82, 6580 type Model Bs and 31XX-75 and 31XX-87 type Model Fs that transmitted scancodes in serialised bits but required more pins than later typical DIN plugs provided (ie, for specific command lines, a clicker assembly or a buzzer). It was also used by IBM 5291 Model 2 Model F keyboards for a special host-drives-capsense connectivity.

5-pin 180° DIN male plug

The standard DIN plug for all XT and AT keyboards. Only 4 pins are needed for a standard AT-compatible keyboard connection, but XT-compatible keyboards may use the remaining pin as a RESET pin.

5-pin 240° DIN male plug (w/ metal jacket)

The DIN plug used by IBM 3179, 3180, 3193, 3205 & 3290 Model 2 terminal and 3270 PC keyboards (Type 2 104-key and most 122-key Model F Converged Keyboards and Type 1 122-key Model M Converged Keyboards). This was the first of two compatible DIN-5-240 plugs, with a straight metal screwable jacket.

DE-9 male plug

A screwable D-subminiature plug used for some keyboards such as IBM 4704-family keyboards and some TEMPESTed Model F variants. It's also used an interface for RS232 serial and thus also used by various early PC mice.

6-pin Modular male plug

The 6-pin modular-style plug used by IBM 5155 Portable Personal Computer and 3153 InfoWindow keyboards. It's the same modular plug used for RJ-11, RJ-14 and RJ-25 (but they're not used in the same way thus are incompatible) and sometimes erronously referred to as any of these.

5-pin 240° DIN male plug (w/ plastic jacket)

The DIN plug used by IBM 3161, 3162, 3163, 3164, 3191, 3192, 3196, 3197 and 3206 terminal keyboards (most pre-1987 Model M Enhanced Terminal Keyboards and Type 2 122-key Model M Converged Keyboards). This was the second of two compatible DIN-5-240 plugs, with a right-angle plastic jacket.

6-pin SDL female port

A modular cable socket used by many Model M keyboard variants. It always supports a AT-compatible keyboard connection but may also support a PS/2 or RS232 serial mouse connection (eg, for Models M4-1, M5-1 and M5-2) or a speaker connection (for RS/6000 keyboards) as well.

8-pin SDL female port

A modular cable socket used by many IBM POS keyboards. It's been used for an RS485 SIO keyboard connection (IBM 4680 and pre-USB 4690 series) and PS/2 keyboard and mouse connections (Model M-e PS/2 ANPOS and CANPOS Keyboards).

6-pin (3x2) unique AMP male plug

A presently unidentified AMP-made plug used by IBM RT PC keyboards. They are designed to carry a 4-pin serial connection just like XT, AT and PS/2 based keyboards, but the two remaining pins are used for a speaker connection.

6-pin Mini-DIN male plug

The standard mini-DIN plug for all PS/2 keyboards. Only 4 pins are needed for a standard AT-compatible keyboard connection, so versions of the plug lacking two of the pins are known. Some IBM laptop numeric keypads and POS keyboards may use all the pins to include a PS/2 mouse (passthrough or otherwise) connection as well. IBM RS/6000 keyboards may use the remaining 2 pins for a speaker connection.

8-pin Modular male plug

The 8-pin modular-style plug used by IBM 3151, 347X InfoWindow and 348X InfoWindow II terminal keyboards (most 1987-onwards Model M Enhanced Terminal Keyboards and Type 3 122-key Model M Converged Keyboards). It's the same modular plug used for RJ-45 and ethernet (but they're not used in the same way and thus are incompatible) and sometimes erroneously referred to as either.

8-pin Mini-DIN male plug

The mini-DIN plug used by the Apple Newton MessagePad Keyboard (X0044) for a serial connection (despite also being one of the plugs for Apple LocalTalk, they're not used in the same way thus are incompatible).

Type A USB male plug

The standard host-side plug for USB devices including keyboards. The plastic part inside used for polarisation can be coloured, and if so, it might indicate the cable and/or device is USB 1.x compatible (white), USB 2.0 (black), or USB 3.x (blue).

4-pin (4x1) IDC-style male plug

The keyboard-side plug from modular cables used for USB-compatible IBM/TGCS RPOS and "pre-MPOS" (ANPOS w/ IPD) keyboards. It's essentially a standard 2.54mm-pitch connector with a jacket to allow it to secure into a socket and has two release levers.

12V PoweredUSB male plug

A specialised USB plug that extends the standard Type A plug with extra pins for increased power delivery and has a release lever. As PoweredUSB was offered in a range of voltages, the teal colour on this one indicates it's rated for 12V. It was an option for USB-compatible IBM/TGCS RPOS, "pre-MPOS" (ANPOS w/ IPD) and MPOS keyboard cables.

12-pin (6x2) IDC-style male plug

The keyboard-side plug from modular cables used for all IBM/TGCS MPOS keyboards. It's essentially a standard 2.54mm-pitch connector with a jacket to allow it to secure into a socket and has a release lever.

6-pin staggered pogo USB male interface

A contact-based USB interface used by Lenovo ThinkPad X1 Tablet Thin Keyboards Gen 1 (TP00082K1) and 2 (TP00082K3). For a secure connection, the keyboard must be magnetically attached to its host tablet.

6-pin straight pogo USB male interface

A contact-based USB interface used by the Lenovo ThinkPad X1 Tablet Gen 3 Thin Keyboard (TP00089K1). For a secure connection, the keyboard must be magnetically attached to its host tablet.

8-pin straight pogo USB male interface

A contact-based USB interface used by the Lenovo ThinkPad X12 Detachable Gen 1 Folio Keyboard ("X12 Folio"). For a secure connection, the keyboard must be magnetically attached to its host tablet.

Type A Lockable USB female port

A modular cable socket used by the Unicomp Mini Model M. It's designed to clamp on an inserted cable to provide mechanical security and can be released by pushing the tab above the port.

DIN/Mini-DIN socket pinouts

Host-side

Modular-style socket pinouts

Host-side

Device-side

SDL socket pinouts

Device-side

IDC-style socket pinouts

Device-side

D-subminiature socket pinouts

Host-side

Pogo-based interface pinouts

Device-side

Modular cable end-to-end mappings

These tables describe the pin translation between one end of a modular keyboard cable to another (in all present cases, a form of SDL to PS/2).

6-pin SDL to single PS/2

The single plug PS/2 cables most Model Ms that have an SDL socket use.

SDL end pin PS/2 end pin PS/2 end function
1 - N/C
2 1 DATA
3 3 GND
4 5 CLOCK
5 4 +5V
6 - N/C

6-pin SDL to dual PS/2

The Y-split PS/2 cables Model Ms that have an SDL socket and an integrated pointing device such as the Models M4-1, M5-1 and M5-2 use.

SDL end pin PS/2 plug PS/2 end pin PS/2 end function
1 Mouse 5 CLOCK (mouse)
2 Keyboard 1 DATA (keyboard)
3 Both 3 GND
4 Keyboard 5 CLOCK (keyboard)
5 Both 4 +5V
6 Mouse 1 DATA (mouse)

8-pin SDL to PS/2

The single plug PS/2 cables that the IBM PS/2 ANPOS Keyboard w/ IPD and IBM CANPOS Keyboard use.

SDL end pin PS/2 end pin PS/2 end function
1 5 CLOCK
2 3 GND
3 4 +5V
4 2 -
5 6 -
6 3 GND
7 4 +5V
8 1 DATA

532X Datamaster Model F

The 5322 keyboard assembly is the integrated keyboard for the original desk-top IBM 5322 System/23 Datamaster, whereas the 5324 keyboard module is the discrete (separated) keyboard for the slightly later floor-top 5234 Datamaster. The Keyboard Adapter Card refers to a daughterboard present inside the latter. The 5324 keyboard-to-motherboard connection has two cables - the external cable between the Keyboard Adapter Card and the connector on the outside of the computer, and the internal cable from that connector to the motherboard.

5322/5324 assembly header

This header is present on both keyboards' main PCB. On 5322 keyboard assemblies, this header is used by a cable that goes straight to the host Datamaster's motherboard. For 5324 keyboard modules, the Keyboard Adapter Card is directly connected to this header.

1
Scancode Bit 0
2
+5V
3
Scancode Bit 1
4
GND
5
Scancode Bit 2
6
Scancode Bit 3
7
Scancode Bit 4
8
Scancode Bit 5
9
Data Strobe
10
Scancode Bit 6
11
X
12
Program Reset
13
14
Data Strobe

5322 motherboard header

This header is on the 5322's motherboard (CPU planar board) and is the other end of the cable between it and the keyboard assembly.

B1
Program Reset
B2
B3
Data Strobe
B4
Scancode Bit 6
B5
Scancode Bit 5
B6
Scancode Bit 4
B7
Scancode Bit 3
B8
Scancode Bit 2
A1
X
A2
Delay Strobe
A3
X
A4
X
A5
Scancode Bit 0
A6
+5V
A7
Scancode Bit 1
A8
GND

5324 Keyboard Adapter Card header

This header is on the 5324 keyboard module's Keyboard Adapter Card for the external cable. The "Return" pins appear to be connected to Ground when they reach the internal cable. The functions of A15, A16, B15 and B16 (if any were intended) are unlabelled in IBM's documentation.

B1
Data Strobe
B2
B3
Scancode Bit 6
B4
Scancode Bit 5
B5
Scancode Bit 4
B6
Scancode Bit 3
B7
Scancode Bit 2
B8
Scancode Bit 1
B9
Scancode Bit 0
B10
X
B11
Delay Strobe
B12
Program Reset
B13
X
B14
+12V
B15
B16
A1
Return
A2
Return
A3
Return
A4
Return
A5
Return
A6
Return
A7
Return
A8
Return
A9
Return
A10
Return
A11
Return
A12
Return
A13
Return
A14
Return
A15
A16

5324 motherboard header

This header is on the 5324's motherboard (CPU planar board) and is the other end of the internal cable between it and the outside connector for hooking up the external cable.

B1
Program Reset
B2
B3
Data Strobe
B4
Scancode Bit 6
B5
Scancode Bit 5
B6
Scancode Bit 4
B7
Scancode Bit 3
B8
Scancode Bit 2
A1
X
A2
Delay Strobe
A3
+12V
A4
X
A5
Scancode Bit 0
A6
X
A7
Scancode Bit 1
A8
GND

5150/5155/5160 XT Model F

The IBM Personal Computer Keyboard (aka, the Model F/XT) exist in two electrical variaties - Types I and II. Type 1 are typically very early examples that include a reset pin, have a metal jacketed DIN plug and have a two-board internal controller. Type 2s lack a reset pin, have a plastic jacketed DIN plug and have a single controller card. Type 2s seem to be far more common than Type 1. All 5155 Portable PC Keyboards are based on Type 2.

Type 1 mainboard header

X
Clock
Data
GND
Reset
+5V
X
X
X
X
X
X
X
X

Type 2 mainboard header

X
Clock
Data
GND
X
+5V
X
X
X
X
X
X
X
X

Type 2 Wire colour coding key

Colour Header Plug (180° DIN)
Brown +5V 5
Red GND 4
White Data 2
Black Clock 1
Silver N/A (grounding screw) -

5291/5292 Model F

Mainboard header

Orientation: position the host board as such that this header is to the left side of said board.

10
Count 64
9
Count 32
8
Count 16
7
X
6
X
5
X
4
Count 8
3
Count 4
2
1
Count 2
11
Key Down
12
GND
13
+5V
14
X
15
X
16
X
17
Count 1
18
GND
19
Strobe
20
GND

Header to Soarer's Controller mapping

Note that this keyboard's header pinout has three GND pins - you only need to use one of the pins and you're free to use any one of them.

Header Teensy 2.0 Arduino Micro Pro Micro
Count 2 B1 SCK 15
Count 4 B2 MOSI 16
Count 8 B3 MISO 14
Count 16 B4 D8 8
Count 32 B5 D9 9
Count 64 B6 D10 10
Key Down D0 D3 (SCL) 3
GND GND GND GND
+5V VCC +5V VCC
Count 1 B0 RXLED RXLED
Strobe D1 D2 (SDA) 2

Type 2 104-key, 122-key and 5170 AT Model F & 315X/316X/319X/InfoWindow 10X-key or 122-key Model M

Mainboard header

Note

The cable header pins may be apart of a much larger array of pins. If this is the case, the missing pin indicated below can be used to recognise where to connect the cable or converter solution.

X
+5V
Clock
GND
Data

Lexmark or Unicomp 101/102-key fixed cable Model M

Mainboard header

+5V
Clock
GND
Data

Wire colour coding key

Note: this has only been verified with Lexmark made examples (1992-1996).

Colour Header Plug (PS/2)
Black +5V 4
Red Clock 5
White GND 3
Yellow Data 1
Silver N/A (grounding screw) -

P/N 69H8533 5535-ZPP Numeric Keypad

Mainboard header

Key: K - keyboard pin, M - mouse pin

1
X
2
X
3
X
4
1: DATA (M)
5
2: DATA (K)
6
3: GND
7
4: +5V
8
5: CLOCK (M)
9
6: CLOCK (K)
10
PE

Wire colour coding key

Colour Header Plug (PS/2)
Yellow 4 1
Green 5 2
Blue 6 3
Red 7 4
White 8 5
Black 9 6
Black 10 PE

Reference photos

P/N 40N6377 4820 SurePoint Keypad

Mainboard connectors

Note: JP4 silkscreening has 0 to 1 as its range, which for the sake of readability, I've replaced with a scale of 1 to 10 respectively going forward.

Mainboard header

Orientation: use silk-screening on the PCB itself or the absent pin 17 as reference.

Note: pin 15 is shared between JP4 pin 1 and magnetic stripe reader shield (SHD).

1
9 (JP3)
3
7 (JP3)
5
4 (JP3)
7
6 (JP3)
9
1 (JP3)
11
3 (JP2)
13
2 (JP2)
15
1 (JP4) & SHD
17
19
5 (JP4)
21
7 (JP4)
23
9 (JP4)
2
8 (JP3)
4
3 (JP3)
6
5 (JP3)
8
2 (JP3)
10
1 (JP3)
12
4 (JP2)
14
1 (JP2)
16
2 (JP4)
18
4 (JP4)
20
6 (JP4)
22
8 (JP4)
24
10 (JP4)

Wire colour coding key (JP4)

Colour JP4 pin
Black 1
Brown 2
Orange 4
Yellow 5
Green 6
Blue 7
Purple 8
Grey 9
White 10

Sources