Apple Desktop Bus - mcaple/tmk_keyboard GitHub Wiki

TMK ADB-USB Conveter

This converts Apple ADB keyboard/mouse protocol to USB, you can use it to plug old ADB keyboard/mouse into modern computer.

Griffin iMate

My iMate indicates device version "3.70" in Device descriptor and its PCB has revision mark "2010 Rev 6 (iMate)".

Technical Specifications:

Compatibility:

Driver:

OS 9 Driver Archive:

FAQ:

Test - TODO

multi button mouse support(Extended protocol)

Not confirmed yet.

  • iMate supports Classic2 protocol(200cpi).
  • With iMate Kensington Turbo Mouse sends button1 for all buttons.
  • Kensington Turbo Mouse sends button1 for all buttons even in Extended protocol.(Confirmed with TMK ADB-USB)

Extended keyboard support

iMate itself doesn't support Extended keyboard unfortunately. This means right modifiers always send key code as same as left modifiers on modern OS.

It was supported by Griffin driver and Apple ADB driver probably at the time of OS9 and early OSX.

hot-plug support

No. Mouse is initialized only when iMate is plugged.

Classic mouse and Turbo Mouse works in 200cpi when cold start but in 100cpi when hot-plug.

Power/Keypad =

iMate sends 0x66 and 0x67 for the keys correctly but its Report descriptor declares wrong range of value as 0-101(0x00-0x65) unfortunately. Not sure that it is a stupid bug or intentional design.

In the result Linux and Windows10 don't recognize the keys at least but not confirmed on MacOS. You can't use the keys at all

0x95, 0x06,        //   Report Count (6)
0x75, 0x08,        //   Report Size (8)
0x15, 0x00,        //   Logical Minimum (0)
0x25, 0x65,        //   Logical Maximum (101)
0x05, 0x07,        //   Usage Page (Kbrd/Keypad)
0x19, 0x00,        //   Usage Minimum (0x00)
0x29, 0x65,        //   Usage Maximum (0x65)
0x81, 0x00,        //   Input (Data,Array,Abs,No Wrap,Linear,Preferred State,No Null Position)

Other Quirks

How Griffin driver works

I guess that: Griffin iMate driver just provides a virtual ADB port on OSX(up to 10.3.x)/OS9, which can be used by ADB drivers supplied by vendors. Checking source codes of imate-osx iMate seems to receive vendor-specific request including ADB command at control endpoint0 and reply in IN-interrupt endpoint1(which is used for keyboard in usual operation).

TBD

Battery

iMate works without problem without the coin battery(CR1225).

It is needed only for some old G3(G4) PowerMac/iMac to be powered on from keyboard power key.

https://www.instructables.com/Intro-31/

Newmotion uKey

The USB/ADB Adapter is compatible with Apple's ADB devices such as: keyboards, mice, joysticks, trackballs, and hardware dongles.

https://web.archive.org/web/20010303190438/http://www.newmotion.com.tw/products/ukey.html

Dirvers: https://web.archive.org/web/20010205052600/http://www.newmotion.com.tw/download/index.html

Compatibility list: https://web.archive.org/web/20010218003234/http://www.newmotion.com.tw/support/compatibility/adb.html

version 1.5 fialure: https://web.archive.org/web/20070311231412/http://www.reudo.co.jp/usb2adb/us2a_sup.html

keyboard quirks: https://geekhack.org/index.php?topic=4185.0

Kensington Turbo Mouse

NetBSD driver:

Linux driver:

Configuration Bytes

/*
 * byte 0
 - 0x80 enables EMP output
 - 0x08 seems to map both buttons together
 - 0x04 enables the 2nd button
 - initialized to 0x20 on power up, no idea what that does
 
 * byte 1 assigns what which button does
 - 0x08 - button 1 - 1, button 2 - nothing
 - 0x09 - both buttons - 1
 - 0x0a - butoon 1 - 1, button 2 - toggle 1
 - 0x0b - button 1 - 1, button 2 - nothing
 - 0x0c - button 1 - 1, button 2 - 2
 - 0x0e - button 1 - 1, button 2 - 3
 - 0x0f - button 1 - 1, button 2 - toggle 3
 - 0x10 - button 1 toggle 1, button 2 nothing
 - 0x11 - button 1 - toggle 1, button 2 - 1
 - 0x12 - both toggle 1
 - 0x14 - button 1 toggle 1, button 2 - 2
 - 0x21 - button 1 - 2, button 2 - 1
 - 0x31 - button 1 - 3, button 2 - 1
 * byte 2 - 0x40 on powerup, seems to do nothing
 * byte 3 - 0x01 on powerup, seems to do nothing
 * byte 4 programs a delay for button presses, apparently in 1/100 seconds
 * byte 5 and 6 init to 0xff
 * byte 7 is a simple XOR checksum, writes will only stick if it's valid
          as in, b[7] = (b[0] ^ b[1] ^ ... ^ b[6]) ^ 0xff
 */

https://github.com/NetBSD/src/blob/8966d5b1cf335756dd9bba3331e84c659bf917e1/sys/dev/adb/adb_ktm.c#L181-L209

Address Resolution

Device Scan

At startup read Register3 from all address of 0 to 15 with device_scan().

Keyboard

Check default address for keyboard 2 in matrix_init().

  1. Get Handler ID and info from Register3 of Address2.
  2. Check the Handler ID 3 to support ISO layout.
  3. Try to set EXTENDED handler on Address2.
  4. Get and check Handler ID from Register7(Appliance) to support media key.

Mouse

Check default address for mouse 3 with mouse_init() every 1 second.

  1. Get Handler ID and info from Register3 of Address3.
  2. Move device to temporary address 15 to setup device.
  3. Get Handler ID and info from Register3 of Address15.
  4. Setup device on the temporary address depending on Handler ID(CLASSIC1/CLASSIC2/EXTENDED/TURBO).
  5. Move device to poll address 10 to read data.

Command

Talk

The ADB Manager sends a Talk command to a device to fetch user input (or other data) from the device. The Talk command requests that a specified device send the contents of a specified device register across the bus. After the device sends the data from the specified register, the ADB Manager places the data into a buffer in RAM, which the ADB Manager makes available for use by device handlers or (in rare cases) applications. In the case of a Talk Register 0 command, the ADB device should respond to the ADB Manager only if it has new data to send.

Listen

The ADB Manager sends a Listen command to a device to instruct it to prepare to receive additional data. The Listen command indicates which data register is to receive the data. After sending a Listen command, the ADB Manager then transfers data from a buffer in RAM to the device. The device must overwrite the existing contents of the specified register with the new data.

Flush

The ADB Manager sends a Flush command to a device to force it to flush any existing user-input data from a specified device register. The device should prepare itself to receive any further input from the user.

SendReset

The ADB Manager uses a SendReset command to force all devices on the bus to reset themselves to their startup states. Each device should clear any of its pending device actions and prepare to accept new ADB commands and user input data immediately. Note that the ADB device does not actually receive the SendReset command but recognizes that it should reset itself when the bus is driven low by the 3 millisecond reset pulse. Your application should never send the SendReset command.

Address

Addr Description
0 Reserved
1 Dongle
2 keyboard
3 Mouse
4 Tablet
5 Reserved
6 Reserved
7 Appliance
8-15 Soft Address

Handler ID

ID Description
FF Self Test
FE Change address if no collision
FD Change address if activated
00 Change address and field

Protocol

Bit Cell

bit cell time: 70-130us
low part of bit0: 60-70% of bit cell
low part of bit1: 30-40% of bit cell

   bit cell time         70us        130us
   --------------------------------------------
   low  part of bit0     42-49       78-91
   high part of bit0     21-28       39-52
   low  part of bit1     21-28       39-52
   high part of bit1     42-49       78-91


bit0:
   70us bit cell:
                 ______
     ____________
     42-49        21-28

   130us bit cell:
                 ______
     ____________
     78-91        39-52

bit1:
   70us bit cell:
           ____________
     ______
     21-28        42-49

   130us bit cell:
           ____________
     ______
     39-52        78-91

from Apple IIgs Hardware Reference Second Edition p.136

Communication

This is a minimum information for keyboard communication.
See "Resources" for detail.

Signaling:
____            __              _____ __                 ____
    ____________  ||||||||||||__     _  |||||||||||||||__

    |800us     |  |7 Command 0|  |   |  |15-63  Data  0|Stopbit(0)
    +Attention |              |  |   +Startbit(1)
               +Startbit(1)   |  +Tlt(140-260us)
                              +stopbit(0)

Bit cells:
            ___
bit0: ______
      65    :35us
         ______
bit1: ___
      35 :65us

bit0 low time: 60-70% of bit cell(42-91us)
bit1 low time: 30-40% of bit cell(21-52us)
bit cell time: 70-130us
[from Apple IIgs Hardware Reference Second Edition]

Criterion for bit0/1:
After 55us if line is low/high then bit is 0/1.

Attention & start bit:
Host asserts low in 560-1040us then places start bit(1).

Tlt(Stop to Start):
Bus stays high in 140-260us then device places start bit(1).

Global reset:
Host asserts low in 2.8-5.2ms. All devices are forced to reset.

Service request from device(Srq):
Device can request to send at commad(Global only?) stop bit.
Requesting device keeps low for 140-260us at stop bit of command.

Service Request

Command:
......._     ______________________    ___ ............_     -------
        |   |                      |  |   |             |   |
Command |   |                      |  |   | Data bytes  |   |
........|___|  |     140-260       |__|   |_............|___|
        |stop0 | Tlt Stop-to-Start |start1|             |stop0 |

Command without data:
......._     __________________________
        |   |
Command |   |
........|___|  |     140-260       |
        |stop0 | Tlt Stop-to-Start |

Service Request:
......._                     ______    ___ ............_     -------
        |     140-260       |      |  |   |             |   |
Command |  Service Request  |      |  |   | Data bytes  |   |
........|___________________|      |__|   |_............|___|
        |stop0 |                   |start1|             |stop0 |
......._                     __________
        |     140-260       |
Command |  Service Request  |
........|___________________|
        |stop0 |

/*
This can be happened?
......._     ______________________    ___ ............_                   -----
        |   |                      |  |   |             |    140-260      |
Command |   |                      |  |   | Data bytes  | Service Request |
........|___|  |     140-260       |__|   |_............|_________________|
        |stop0 | Tlt Stop-to-Start |start1|             |stop0 |
*/
    
"Service requests are issued by the devices during a very specific time at the
end of the reception of the command packet.
If a device in need of service issues a service request, it must do so within
the 65 µs of the Stop Bit’s low time and maintain the line low for a total of 300 µs."

"A device sends a Service Request signal by holding the bus low during the low
portion of the stop bit of any command or data transaction. The device must lengthen
the stop by a minimum of 140 uS beyond its normal duration, as shown in Figure 8-15."

http://ww1.microchip.com/downloads/en/AppNotes/00591b.pdf

Commands

ADB command is 1byte and consists of 4bit-address, 2bit-command
type and 2bit-register. The commands are always sent by Host.

Command format:
7 6 5 4 3 2 1 0
| | | |------------ address
        | |-------- command type
            | |---- register

bits                commands
------------------------------------------------------
- - - - 0 0 0 0     Send Reset(reset all devices)
A A A A 0 0 0 1     Flush(reset a device)
- - - - 0 0 1 0     Reserved
- - - - 0 0 1 1     Reserved
- - - - 0 1 - -     Reserved
A A A A 1 0 R R     Listen(write to a device)
A A A A 1 1 R R     Talk(read from a device)

The command to read keycodes from keyboard is 0x2C which
consist of keyboard address 2 and Talk against register 0.

Address:
2:  keyboard
3:  mice

Registers:
0: application(keyboard uses this to store its data.)
1: application
2: application(keyboard uses this for LEDs and state of modifiers)
3: status and command

Keyboard Data(Register0)

This 16bit data can contains two keycodes and two released flags.
First keycode is palced in upper byte. When one keyocode is sent,
lower byte is 0xFF.
Release flag is 1 when key is released.

1514 . . . . . 8 7 6 . . . . . 0
 | | | | | | | | | +-+-+-+-+-+-+-   Keycode2
 | | | | | | | | +---------------   Released2(1 when the key is released)
 | +-+-+-+-+-+-+-----------------   Keycode1
 +-------------------------------   Released1(1 when the key is released)

Keycodes:
Scancode consists of 7bit keycode and 1bit release flag.
Device can send two keycodes at once. If just one keycode is sent
keycode1 contains it and keyocode2 is 0xFF.

Power switch:
You can read the state from PSW line(active low) however
the switch has a special scancode 0x7F7F, so you can
also read from Data line. It uses 0xFFFF for release scancode.

Keyboard LEDs & state of keys(Register2)

This register hold current state of three LEDs and nine keys.
The state of LEDs can be changed by sending Listen command.

1514 . . . . . . 7 6 5 . 3 2 1 0
 | | | | | | | | | | | | | | | +-   LED1(NumLock)
 | | | | | | | | | | | | | | +---   LED2(CapsLock)
 | | | | | | | | | | | | | +-----   LED3(ScrollLock)
 | | | | | | | | | | +-+-+-------   Reserved
 | | | | | | | | | +-------------   ScrollLock
 | | | | | | | | +---------------   NumLock
 | | | | | | | +-----------------   Apple/Command
 | | | | | | +-------------------   Option
 | | | | | +---------------------   Shift
 | | | | +-----------------------   Control
 | | | +-------------------------   Reset/Power
 | | +---------------------------   CapsLock
 | +-----------------------------   Delete
 +-------------------------------   Reserved

Address, Handler ID and bits(Register3)

1514131211 . . 8 7 . . . . . . 0
 | | | | | | | | | | | | | | | |
 | | | | | | | | +-+-+-+-+-+-+-+-   Handler ID
 | | | | +-+-+-+-----------------   Address
 | | | +-------------------------   0
 | | +---------------------------   Service request enable(1 = enabled)
 | +-----------------------------   Exceptional event(alwyas 1 if not used)
 +-------------------------------   0

Keyboard Handle ID

Apple Standard Keyboard M0116:      0x01
Apple Extended Keyboard M0115:      0x02
Apple Extended Keyboard II M3501:   0x02
Apple Adjustable Keybaord:          0x10

http://lxr.free-electrons.com/source/drivers/macintosh/adbhid.c?v=4.4#L802

Scan codes

Click

Unimap Default Mapping

Click
,---.   .---------------. ,---------------. ,---------------. ,-----------.             ,---.
|Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|             |F24|
`---'   `---------------' `---------------' `---------------' `-----------'             `---'
,-----------------------------------------------------------. ,-----------. ,---------------. ,---.
|  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  =|  /|  *| |VUp|
|-----------------------------------------------------------| |-----------| |---------------| |---|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|End|PgD| |  7|  8|  9|  -| |VDn|
|-----------------------------------------------------------| `-----------' |---------------| |---|
|CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  #| Ret|               |  4|  5|  6|  +| |Mut|
|-----------------------------------------------------------|     ,---.     |---------------| `---'
|Shif|  <|  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
|-----------------------------------------------------------| ,-----------. |-----------|Ent| ,---.
|Ctrl |Alt |Gui  |        Space            |Gui* |Alt |Ctrl | |Lef|Dow|Rig| |      0|  .|   | |F13|
`-----------------------------------------------------------' `-----------' `---------------' `---'

,---.   .---------------. ,---------------. ,---------------. ,-----------.             ,---.
| 35|   | 7A| 78| 63| 76| | 60| 61| 62| 64| | 65| 6D| 67| 6F| | 69| 6B| 71|             | 7F|
`---'   `---------------' `---------------' `---------------' `-----------'             `---'
,-----------------------------------------------------------. ,-----------. ,---------------. ,---.
| 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|   33  | | 72| 73| 74| | 47| 51| 4B| 43| | 48|
|-----------------------------------------------------------| |-----------| |---------------| |---|
|  30 | 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E|  2A | | 75| 77| 79| | 59| 5B| 5C| 4E| | 49|
|-----------------------------------------------------------| `-----------' |---------------| |---|
|  39  | 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 70| 24 |               | 56| 57| 58| 45| | 4A|
|-----------------------------------------------------------|     ,---.     |---------------| `---'
| 38 | 0A| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C|    7B    |     | 3E|     | 53| 54| 55|   |
|-----------------------------------------------------------| ,-----------. |-----------| 4C| ,---.
|  36 | 3A |  37 |           31            |  37 | 7C |  7D | | 3B| 3D| 3C| |    52 | 41|   | | 42|
`-----------------------------------------------------------' `-----------' `---------------' `---'
Not used: F14, F15, F21, F22, KP_EQUAL
Not mapped: 0x46, 0x4D, 0x6C, 0x70 

Apple Extended Keyboard M0115:

Click

https://deskthority.net/wiki/images/1/1a/Apple_M0115_top.jpg

,---.   .---------------. ,---------------. ,---------------. ,-----------.             ,---.
|Esc|   |F1 |F2 |F3 |F4 | |F5 |F6 |F7 |F8 | |F9 |F10|F11|F12| |PrS|ScL|Pau|             |Pwr|
`---'   `---------------' `---------------' `---------------' `-----------'             `---'
,-----------------------------------------------------------. ,-----------. ,---------------.
|  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Backspa| |Ins|Hom|PgU| |NmL|  =|  /|  *|
|-----------------------------------------------------------| |-----------| |---------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \  | |Del|End|PgD| |  7|  8|  9|  -|
|-----------------------------------------------------------| `-----------' |---------------|
|CapsLo|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|               |  4|  5|  6|  +|
|-----------------------------------------------------------|     ,---.     |---------------|
|Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  ,|  /|Shift     |     |Up |     |  1|  2|  3|   |
|-----------------------------------------------------------| ,-----------. |-----------|Ent|
|Ctrl |Opt | Cmd |        Space            | Cmd |Opt |Ctrl | |Lef|Dow|Rig| |      0|  .|   |
`-----------------------------------------------------------' `-----------' `---------------'
                   
,---.   .---------------. ,---------------. ,---------------. ,-----------.             ,---.
| 35|   | 7A| 78| 63| 76| | 60| 61| 62| 64| | 65| 6D| 67| 6F| | 69| 6B| 71|             | 7F|
`---'   `---------------' `---------------' `---------------' `-----------'             `---'
,-----------------------------------------------------------. ,-----------. ,---------------.
| 32| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|   33  | | 72| 73| 74| | 47| 51| 4B| 43|
|-----------------------------------------------------------| |-----------| |---------------|
|  30 | 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E|  2A | | 75| 77| 79| | 59| 5B| 5C| 4E|
|-----------------------------------------------------------| `-----------' |---------------|
|  39  | 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27|   24   |               | 56| 57| 58| 45|
|-----------------------------------------------------------|     ,---.     |---------------|
|   38   | 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C|    7B    |     | 3E|     | 53| 54| 55|   |
|-----------------------------------------------------------| ,-----------. |-----------| 4C|
|  36 | 3A |  37 |           31            |  37 | 7C |  7D | | 3B| 3D| 3C| |    52 | 41|   |
`-----------------------------------------------------------' `-----------' `---------------'
* Power key scan code 7F7F is translated into 7F by TMK converter

Apple Extended Keyboard II ISO specific keys:

Click

https://user-images.githubusercontent.com/6669125/32100612-b973cdb0-bb14-11e7-86de-0794e77eec66.png

,-----------------------------------------------------------.
| 0A |   |   |   |   |   |   |   |   |   |   |   |   |      |
|-----------------------------------------------------------|
|      |   |   |   |   |   |   |   |   |   |   |   |   |    |
|-------------------------------------------------------` 24|
|       |   |   |   |   |   |   |   |   |   |   |   | 2A|   |
|-----------------------------------------------------------|
|  38 | 32|   |   |   |   |   |   |   |   |   |   |         |
|-----------------------------------------------------------|
|     |    |     |                         |     |    |     |
`-----------------------------------------------------------'
* For Apple ISO keyboard 0A and 32 are swapped
    https://github.com/tmk/tmk_keyboard/issues/35
* For Apple ISO keyboard 2A is translated to 70
* Default mapping on Unimap
    32->0A: NONUS_BACKSLASH
    0A->32: GRAVE
    2A->70: NONUS_HASH

Apple Adjustable Keyboard Media keys:

Click

https://deskthority.net/wiki/images/6/64/Apple_Adjustable_front.JPG

Scan codes from Appliance address 7 are translated onto Unimap:
    48: Volume Up   (03 before translation)
    49: Volume Down (02 before translation)
    4A: Mute        (01 before translation)
    42: Mic         (00 before translation)

Apple M0116:

Click

https://deskthority.net/wiki/images/7/75/Apple_M0116_full.jpg

                   ,--------.
                   |  Power |
                   `--------'
,---------------------------------------------------------.  ,---------------.
|Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Delet|  |Clr|  =|  /|  *|
|---------------------------------------------------------|  |---------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|   |  |  7|  8|  9|  +|
|-----------------------------------------------------'   |  |---------------|
|Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|Return|  |  4|  5|  6|  -|
|---------------------------------------------------------|  |---------------|
|Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|   Shift|  |  1|  2|  3|   |
|---------------------------------------------------------|  |-----------|Ent|
|Cap|Opt| Cmd  |  `|    Space         |  \|Lef|Rig|Dow|Up |  |      0|  ,|   |
`---------------------------------------------------------'  `---------------'

                   ,--------.
                   |   7F7F |
                   `--------'
,---------------------------------------------------------.  ,---------------.
| 35| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|   33|  | 47| 51| 4B| 43|
|---------------------------------------------------------|  |---------------|
|  30 | 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 2A|  | 59| 5B| 5C| 45|
|---------------------------------------------------------|  |---------------|
|  36  | 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27|  24  |  | 56| 57| 58| 4E|
|---------------------------------------------------------|  |---------------|
|   38   | 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C|   7B   |  | 53| 54| 55|   |
|---------------------------------------------------------|  |-----------| 4C|
| 39| 3A|  37  | 32|      31          | 2A| 3B| 3C| 3D| 3E|  |    52 | 41|   |
`---------------------------------------------------------'  `---------------'

Apple M0118:

Click

https://deskthority.net/wiki/images/e/e3/Apple_M0118_top.jpg

https://i.imgur.com/pJ9WoLk.jpg

                   ,--------.
                   |  Power |
                   `--------'
,---------------------------------------------------------.  ,---------------.
|Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|Delet|  |Clr|  =|  /|  *|
|---------------------------------------------------------|  |---------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|Rtn|  |  7|  8|  9|  +|
|------------------------------------------------------`  |  |---------------|
|CaspsL|  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  \|  |  |  4|  5|  6|  -|
|---------------------------------------------------------|  |---------------|
|Shif|  `|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Shif|Up |  |  1|  2|  3|   |
|---------------------------------------------------------|  |-----------|Ent|
|Ctrl| Opt | Cmd  |     Space          | Cmd  |Lef|Rig|Dow|  |      0|  ,|   |
`---------------------------------------------------------'  `---------------'

                   ,--------.
                   |   7F7F |
                   `--------'
,---------------------------------------------------------.  ,---------------.
| 35| 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|   33|  | 47| 51| 4B| 43|
|---------------------------------------------------------|  |---------------|
|  30 | 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 24|  | 59| 5B| 5C| 45|
|------------------------------------------------------`  |  |---------------|
|  39  | 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 2A|  |  | 56| 57| 58| 4E|
|---------------------------------------------------------|  |---------------|
| 38 | 32| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C| 7B | 3E|  | 53| 54| 55|   |
|---------------------------------------------------------|  |-----------| 4C|
| 36 | 3A  |   37 |         31         |   37 | 3B| 3C| 3D|  |    52 | 41|   |
`---------------------------------------------------------'  `---------------'
* Default mapping on Unimap
    32->0A: NONUS_BACKSLASH
    2A->70: NONUS_HASH

NeXT ANSI:

Click

https://deskthority.net/wiki/images/8/87/NeXT_ADB_keyboard.jpg

,-----------------------------------------------------------.   -   -   -   ,---------------.
| Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  ß|  '| BSpc | |Hom|Pwr|PgU| |NmL|  /|  *|  -|
|-----------------------------------------------------------|   -   -   -   |---------------|
| Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|  \ | |End|   |PgD| |  7|  8|  9|  +|
|-----------------------------------------------------------|   -       -   |-----------|   |
| Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '| Return|               |  4|  5|  6|   |
|-----------------------------------------------------------|     ,---.     |---------------|
| Shift   |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|    Shift|     |Up |     |  1|  2|  3|   |
|-----------------------------------------------------------| ,-----------. |-----------|Ent|
|Caps| Alt | Help|        Space            | Help| Alt |  ` | |Lef|Dow|Rig| |      0|  ,|   |
`-----------------------------------------------------------' `-----------' `---------------'
                   |_Command_____________|

,-----------------------------------------------------------.   -   -   -   ,---------------.
| 35 | 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|  33  | | 73| ??| 74| | 51| 4B| 43| 4E|
|-----------------------------------------------------------|   -   -   -   |---------------|
|  30  | 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 2A | | 77|   | 79| | 59| 5B| 5C|   |
|-----------------------------------------------------------|   -       -   |-----------| 45|
|   36  | 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27|  24   |               | 56| 57| 58|   |
|-----------------------------------------------------------|     ,---.     |---------------|
|    38   | 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C|   7B    |     | 3E|     | 53| 54| 55|   |
|-----------------------------------------------------------| ,-----------. |-----------| 4C|
| 39 |  3A |  72 |           31            |  72 |  7C | 32 | | 3B| 3D| 3C| |     52| 41|   |
`-----------------------------------------------------------' `-----------' `---------------'
                   |_________37__________|

NeXT German:

Click

https://i.imgur.com/N0Z8LgE.jpg

https://geekhack.org/index.php?topic=14290.msg2998949#msg2998949

,-----------------------------------------------------------.   -   -   -   ,---------------.
| Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  ß|  '| BSpc | |Hom|Pwr|PgU| |NmL|  /|  *|  -|
|-----------------------------------------------------------|   -   -   -   |---------------|
| Tab  |  Q|  W|  E|  R|  T|  Z|  U|  I|  O|  P|  Ü|  +| Ret| |End|   |PgD| |  7|  8|  9|  +|
|-------------------------------------------------------`   |   -       -   |-----------|   |
| Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  Ö|  Ä|  #|   |               |  4|  5|  6|   |
|-----------------------------------------------------------|     ,---.     |---------------|
| Shft|  <|  Y|  X|  C|  V|  B|  N|  M|  ,|  .|  -|    Shift|     |Up |     |  1|  2|  3|   |
|-----------------------------------------------------------| ,-----------. |-----------|Ent|
|Caps| Alt | [i] |        Space            | [i] | Alt |   \| |Lef|Dow|Rig| |      0|  ,|   |
`-----------------------------------------------------------' `-----------' `---------------'
                   |_Command_____________|

,-----------------------------------------------------------.   -   -   -   ,---------------.
| 35 | 12| 13| 14| 15| 17| 16| 1A| 1C| 19| 1D| 1B| 18|  33  | | 73| ??| 74| | 47| 51| 4B| 43|
|-----------------------------------------------------------|   -   -   -   |---------------|
|  30  | 0C| 0D| 0E| 0F| 10| 11| 20| 22| 1F| 23| 21| 1E| 24 | | 77|   | 79| | 59| 5B| 5C|   |
|-------------------------------------------------------`   |   -       -   |-----------| 45|
|   36  | 00| 01| 02| 03| 05| 04| 26| 28| 25| 29| 27| 2A|   |               | 56| 57| 58|   |
|-----------------------------------------------------------|     ,---.     |---------------|
|  38 | 0A| 06| 07| 08| 09| 0B| 2D| 2E| 2B| 2F| 2C|   7B    |     | 3E|     | 53| 54| 55|   |
|-----------------------------------------------------------| ,-----------. |-----------| 4C|
| 39 |  3A |  72 |           31            |  72 |  7C | 32 | | 3B| 3D| 3C| |     52| 41|   |
`-----------------------------------------------------------' `-----------' `---------------'
                   |_________37__________|
* No need to swap 0A and 32 for NeXT

Hardware

Pinouts

ADB female socket from the front:
  ,--_--.
 / o4 3o \      1: DATA
| o2   1o |     2: PSW(Power SW)
 -  ===  -      3: VCC
  `-___-'       4: GND

Resources

ADB - The Untold Story: Space Aliens Ate My Mouse

ADB Manager

Service request(5-17)

Apple IIgs Hardware Reference

1989 Second Edition [Chapter 6 p.121]

21 Nov, 1986 [Chapter 7 p.141]

ADB Keycode

ADB Signaling

ADB Overview & History

Microchip Application Note: ADB device(with code for PIC16C)

AVR ATtiny2131 ADB to PS/2 converter(Japanese)

⚠️ **GitHub.com Fallback** ⚠️