Skip to content

Sun Keyboard Protocol

hasu@tmk edited this page Jul 22, 2025 · 64 revisions

TMK SUN-USB Converter

Prebuilt converter is available here: https://geekhack.org/index.php?topic=72052.0

Source code

https://github.com/tmk/tmk_keyboard/tree/master/converter/sun_usb

Discussion

https://geekhack.org/index.php?topic=105671.0

Implementation Notes

Open

Interrupts usage

COMPA is used to send data when there is data in send queue.

OCR1B(keyboard)/OCR1C(mouse) is set to TCNT1 + 0.5-bit period and enabled at rising edge of start bit using INT2(keyboard)/INT5(mouse). The COMPB/COMPC interrupt should be triggered at mid of bit period to sample the bit. COMPB/COMPC is disabled at stop bit.

 - - -|----------|----------|---------- - - - - - |----------|---------|---------|- - - - COMPA(send)
0      __________ __________ ________ _ _ _ _ _ _  __________ __________
1 ____/          \__________X________ _ _ _ _ _ _ X__________X__________\_________________ _ _ _ _
      |  start      data0      data1                 data6      data7       stop
      |     |----------|----------|-- - - - - -  - ----|----------|----------| COMPB/COMPC(receive)
      \_ rising edge interrupt

Timer1 CTC mode

COMPA is used for keyboard send COMPB is used for keyboard receive COMPC is used for mouse receive

OCR1A is set once and not updated. OCR1A is used as TOP in CTC mode. OCR1B/OCR1C is configured dynamically when start bit rising edge is captured.(= TCNT1 + 0.5-bit % OCR1A)

                bit period
        - - -|------|------|------|------|------|- - - COMPA
  TOP        *      *      *      *      *      *   OCR1A(keyboard send)
            /|     /|     /|     /|     /|     /|
           / |    * |    * |    * |    * |    * |   OCR1B(keyboard receive)
TCNT1     /  |   /  |   /  |   /  |   /  |   /  |   OCR1C(mouse receive)
         /   |  /   |  /   |  /   |  /   |  /   |
        /    | /    | /    | /    | /    | /    |
       /     |/     |/     |/     |/     |/     |/
    0 ---------------------------------------------
                  |------|------|------|------|- - - COMPB/COMPC

Reference

Software uart implemented using timer

https://github.com/notweerdmonk/avr-software-uart/blob/master/src/uart.c

AVR274: Single-wire Software UART

https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ApplicationNotes/ApplicationNotes/AVR274.pdf

Connector

Modern Type 4 and 5 keyboards uses 8Pin mini DIN.

   ___ ___
  /  |_|  \
 / 8  7  6 \
| 5    4  3 |
 \_ 2   1 _/
   \_____/
 (receptacle)

Wiring:
Pin mini DIN        MCU
----------------------------------
1   GND             GND
2   GND             GND
3   5V
4   Mouse RX        PD4
5   Keyboard RX     PD2
6   Keyboard TX     PD3
7   GND             GND
8   5V              VCC

For ATmega32U4 you will have to use other pin than PD4 for Mouse pin.

Protocol

Signal: Asynchronous, Negative logic, 1200baud, No Flow control

Frame format:

1-Start bit, 8-Data bits, No-Parity, 1-Stop bit

0      ___ ___ ___ ___ ___ ___ ___ ___ ___      
1 ____/   \___X___X___X___X___X___X___X___\_______
        S   0   1   2   3   4   5   6   7   S

AVR USART engine expects positive logic while Sun keyboard signal is negative. To use AVR UART engine you need external inverter in front of RX and TX pin. Otherwise you can use software serial to communicate the keyboard.

This firmware uses software serial by default, so you don't need any inverter. It can be still built with 'make HARDWARE_SERIAL=y' to enable hardware serial if you have inverter. You can use 74LS04 for example.

Commands From System To Keyboard

0x01 Reset
        Keyboard responds with following byte sequence:
        Success: 0xFF 0x04
        Fail:    0x7E 0x01
0x02 Bell On
0x03 Bell Off
0x0A Click On
0x0B Click Off
0x0E LED
        followed by LED status byte:
        bit: 3       2       1       0
        LED: CapsLk  ScrLk   Compose NumLk
0x0F Layout(DIP switch)
        Keyboard responds with 0xFE 0xXX
        bit: 7 6 5 4 3 2 1 0
        DIP: x 2 3 4 5 6 7 8(DIP-SW1 is always 0 on Type-5)
  • Type-5 keyboard including SHORT TYPE at least starts sending key events without Reset command.
  • SHORT TYPE KEYBOARD has no DIP switch and replies fixed value 0x22 as layout.

Commands From Keyboard To System

0xFF sent after power up
0x7F Idle(no keys are pressed)
0xFE Layout(DIP switch) Response
0xFF 0x04 Reset Response(success)
0x7E 0x01 Reset Response(failure)

Mouse Protocol

Signal: Asynchronous, Negative logic, 1200baud, No Flow control

Frame format:

1-Start bit, 8-Data bits, No-Parity, 1-Stop bit

0      ___ ___ ___ ___ ___ ___ ___ ___ ___      
1 ____/   \___X___X___X___X___X___X___X___\_______
        S   0   1   2   3   4   5   6   7   S

Data Format:

Bit  |  7  6  5  4  3  2  1  0
-----+------------------------
Byte1|  1  0  0  0  0  L  M  R
Byte2| x7 x6 x5 x4 x3 x2 x1 x0
Byte3| y7 y6 y5 y4 y3 y2 y1 y0
Byte4| X7 X6 X5 X4 X3 X2 X1 X0
Byte5| Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0

X/Y indicates movement recorded after x/y movement occured. In the end you can get total mouse movement by adding like x+X/y+Y.

Sun mouse protcol is compatible with MouseSystems 5-byte mouse protocol.

http://www.bitsavers.org/pdf/mouseSystems/300771-001_Mouse_Systems_Optical_Mouse_Technical_Reference_Models_M2_and_M3_1985.pdf

Confirmed with ball mouse COMPACT 1 model made by Logitech(FCCID:DZLNSUN1).

3-byte format

Tadpole Sparcbook 3GX uses 3-byte format. It is a laptop computer with integrated pointing device. TMK converter won't support this format.

Bit  |  7  6  5  4  3  2  1  0
-----+------------------------
Byte1|  1  x  0  0  1  L  M  R
Byte2| x7 x6 x5 x4 x3 x2 x1 x0
Byte3| y7 y6 y5 y4 y3 y2 y1 y0

Mouse support in TMK Sun Converter

The converter revision 2.8 or later has mouse suport.

For revision 2.7 or sooner you have to conect two pads with small wire like this pic.

Scan codes

Type-5

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

,-------.  ,---,  ,---------------. ,---------------. ,---------------.   ,-----------. ,---------------.
|  Help |  |   |  | F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12|   |PrS|ScL|Pau| |Mut|VoD|VoU|Pwr|
`-------'  `---'  `---------------' `---------------' `---------------'   `-----------' `---------------'
,-------.  ,-----------------------------------------------------------.  ,-----------. ,---------------.
|Stp|Agn|  |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|  `|  |Ins|Hom|PgU| |NmL|  /|  *|  -|
|-------|  |-----------------------------------------------------------|  |------------ |---------------|
|Prp|Und|  |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]| Bspc|  |Del|End|PgD| |  7|  8|  9|   |
|-------|  |-----------------------------------------------------------|  `-----------' |-----------|  +|
|Frt|Cpy|  |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|                |  4|  5|  6|   |
|-------|  |-----------------------------------------------------------|      ,---.     |-----------|---|
|Opn|Pst|  |Shft| +\|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| RO| Shift|      | Up|     |  1|  2|  3|   |
|-------|  |-----------------------------------------------------------|  .-----------. |-----------|Ent|
|Fnd|Cut|  |Caps  |Alt|Met|Kaku|        Space    |Henk|Niho|Met|Cmp|Alt|  |Lef|Dow|Rig| |     0 |  .|   |
`-------'  `-----------------------------------------------------------'  `-----------' `---------------'

Type-4

,-------.  ,-----------------------------------------------------------.  ,---------------.
| 01| 03|  | 05| 06| 08| 0A| 0C| 0E| 10| 11| 12| 07| 09| 0B| 58|   | 42|  | 15| 16| 17| 62|
|-------|  |-----------------------------------------------------------|  |---------------|
| 19| 1A|  | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29|   2B  |  |*2D| 2E| 2F| 47|
|-------|  |-----------------------------------------------------------|  |---------------|
| 31| 33|  |  35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41|     |  | 44| 45| 46|   |
|-------|  |------------------------------------------------------\ 59 |  |-----------| 7D|
| 48| 49|  |  4C  | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57| 2A|    |  | 5B| 5C| 5D|   |
|-------|  |-----------------------------------------------------------|  |-----------|---|
| 5F| 61|  | 63 |+7C| 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D|  6E  |*6F|  | 70| 71| 72|   |
|-------|  |-----------------------------------------------------------|  |-----------| 5A|
|  76   |  | 77| 13| 78|           79                      | 7A| 43| 0D|  |   5E  | 32|   |
`-------'  `-----------------------------------------------------------'  `---------------'

,-------.  ,-----------------------------------------------------------.  ,---------------.
|Stp|Agn|  | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|  \|   |Del|  |Pau|PrS|ScL|NmL|
|-------|  |-----------------------------------------------------------|  |---------------|
|Prp|Und|  |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  Bspc |  |  =|  /|  *|  -|
|-------|  |-----------------------------------------------------------|  |---------------|
|Frt|Cpy|  |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]|     |  |  7|  8|  9|   |
|-------|  |------------------------------------------------------\ Ret|  |-----------|  +|
|Opn|Pst|  |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  `|    |  |  4|  5|  6|   |
|-------|  |-----------------------------------------------------------|  |-----------|---|
|Fnd|Cut|  |Shft| +\|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| Shift| LF|  |  1|  2|  3|   |
|-------|  |-----------------------------------------------------------|  |-----------|Ent|
|  Help |  |Cap|Alt|Met|             Space                 |Met|Cmp|Alt|  |     0 |  .|   |
`-------'  `-----------------------------------------------------------'  `---------------'

Type-3

,-------.  ,-----------------------------------------------------------.  ,-----------.
| 01| 03|  | 05| 06|     08|     0A|     0C|     0E|     10| 11| 12| 2B|  | 15| 16| 17|
|-------|  |-----------------------------------------------------------|  |-----------|
| 19| 1A|  | 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A|  | 2D| 2E| 2F|
|-------|  |-----------------------------------------------------------|  |-----------|
| 31| 33|  |  35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 42  |  | 44| 45| 46|
|-------|  |-----------------------------------------------------------|  |-----------|
| 48| 49|  |  4C  | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57|   59   |  | 5B| 5C| 5D|
|-------|  |-----------------------------------------------------------|  |-----------|
| 5F| 61|  |   63   | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D|    6E| 6F|  | 70| 71| 72|
`-------'  |-----------------------------------------------------------|  `-----------'
           | 77 | 78  |               79                  | 7A  |   13 |
           `-----------------------------------------------------------'

,-------.  ,-----------------------------------------------------------.  ,-----------.
| L1| L2|  | F1| F2|   F3  |   F4  |   F5  |   F6  |   F7  | F8| F9| BS|  | R1| R2| R3|
|-------|  |-----------------------------------------------------------|  |-----------|
| L3| L4|  |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|  `|  | R4| R5| R6|
|-------|  |-----------------------------------------------------------|  |-----------|
| L5| L6|  | Tab |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]| Del |  | R7| R8| R9|
|-------|  |-----------------------------------------------------------|  |-----------|
| L7| L8|  | Ctrl |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '| Return |  |R10|R11|R12|
|-------|  |-----------------------------------------------------------|  |-----------|
| L9|L10|  | Shift  |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| Shift| LF|  |R13|R14|R15|
`-------'  |-----------------------------------------------------------|  `-----------'
           |Caps| Left|             Space                 |Right|  Alt |
           `-----------------------------------------------------------'

CTCSP SHORT TYPE KEYBOARD

,---,  ,-----------------.,-----------. ,---.   ,-----------.
| 01|  |05|06|08|0A|0C|0E|| 61| 49| 33| | 30|   | 2C| 34| 60|
`---'  |10|11|12|07|09|0B|`-----------' `---'   | 42| 4A| 7B|
       `-----------------'                      `-----------'
,-----------------------------------------------------------.
| 1D| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 2A|
|-----------------------------------------------------------|
|  35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 2B  |
|-----------------------------------------------------------|
|  4C  | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57|   59   |
|-----------------------------------------------------------|
| 63 |+7C| 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D| 0D|14| 6E|
|-----------------------------------------------------------|
|  77  | 13   | 78|        79       | 7A| 43| 62| 18||1B| 1C|
`-----------------------------------------------------------'

,---,  ,-----------------.,-----------. ,---.   ,-----------.
|Stp|  |F1|F2|F3|F4|F5|F6||Cut|Pst|Cpy| |Pwr|   |Ins|Hom|PgU|
`---'  |F7|F8|F9|10|11|12|`-----------' `---'   |Del|End|PgD|
       `-----------------'                      `-----------'
,-----------------------------------------------------------.
|Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|  `| 
|-----------------------------------------------------------|
|Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]| Bspc|
|-----------------------------------------------------------|
|Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|
|-----------------------------------------------------------|
|Shft| +\|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|Alt|Up|Shf|
|-----------------------------------------------------------|
|Caps  |Alt   |Met|      Space      |Met|Cmp|Num|Lft||Dn|Rig|
`-----------------------------------------------------------'

Integrix

Not fully compatible to Sun computers.

,-------.  ,----,  ,---------------. ,---------------. ,---------------.                ,---------------.
|  76   |  | 1D |  | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B|                | 15| 16| 17| 62|
`-------'  `----'  `---------------' `---------------' `---------------'                `---------------'
,-------.  ,-----------------------------------------------------------.  ,-----------. ,---------------.
| 01| 03|  | 2A| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29| 58| 42|  | 02| 04| 0F| | 2D| 2E| 2F| 47|
|-------|  |-----------------------------------------------------------|  |------------ |---------------|
| 19| 1A|  |  35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| 2B  |  | 14| 18| 1B| | 44| 45| 46|   |  
|-------|  |-----------------------------------------------------------|  `-----------' |-----------| 7D|
| 31| 33|  |  4C  | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57|   59   |                | 5B| 5C| 5D|   |  
|-------|  |-----------------------------------------------------------|      ,---.     |-----------|---|
| 48| 49|  | 63 |+7C| 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D|  6E  | 6F|      | 34|     | 70| 71| 72|   |  
|-------|  |-----------------------------------------------------------|  .-----------. |-----------| 5A|
| 5F| 61|  | 77 | 13| 78 |    |       79         |    |   | 7A | 43| 0D|  | 73| 74| 75| |   5E  | 32|   |  
`-------'  `-----------------------------------------------------------'  `-----------' `---------------'

,-------.  ,----,  ,---------------. ,---------------. ,---------------.                ,---------------.
| Help  |  |ESC |  | F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12|                |Pau|PrS|ScL|NmL|
`-------'  `----'  `---------------' `---------------' `---------------'                `---------------'
,-------.  ,-----------------------------------------------------------.  ,-----------. ,---------------.
|Stp|Agn|  |  `|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|Del|  |Ins|Hom|PgU| |  =|  /|  *|  -| 
|-------|  |-----------------------------------------------------------|  |-----------| |---------------|
|Prp|Und|  |Tab  |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]| Bspc|  |Del|End|PgD| |  7|  8|  9|   |  
|-------|  |-----------------------------------------------------------|  `-----------' |-----------|  +| 
|Frt|Cpy|  |Ctrl  |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '|  Return|                |  4|  5|  6|   |  
|-------|  |-----------------------------------------------------------|      ,---.     |-----------|---|
|Opn|Pst|  |Shft| +\|  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /| Shift| LF|      | Up|     |  1|  2|  3|   |  
|-------|  |-----------------------------------------------------------|  .-----------. |-----------|Ent|
|Fnd|Cut|  |Caps|Alt|Meta|    |      Space       |    |   |Meta|Cmp|Alt|  |Lef|Dow|Rig| |      0|  .|   |  
`-------'  `-----------------------------------------------------------'  `-----------' `---------------'

Layout ID

DIP-SW configures Layout ID returned to Layout command(0x0F).

bit: 7 6 5 4 3 2 1 0
DIP: 1 2 3 4 5 6 7 8
     0 0 1 0 0 0 1 0(0x22 Unix Layout)

UNIX Layout keyboard should be configured as 0x22 with DIP-SW. Otherwise, \ key is not registered and some keys are swapped.

N860-8701-T110 with DIP-SW: 00000000

,-------.  ,---,  ,---------------. ,---------------. ,---------------.   ,-----------. ,---------------.
|  76   |  |-1D|  | 05| 06| 08| 0A| | 0C| 0E| 10| 11| | 12| 07| 09| 0B|   | 16| 17| 15| | 2D| 02| 04| 30|
`-------'  `---'  `---------------' `---------------' `---------------'   `-----------' `---------------'
,-------.  ,-----------------------------------------------------------.  ,-----------. ,---------------.
| 01| 03|  |-2A| 1E| 1F| 20| 21| 22| 23| 24| 25| 26| 27| 28| 29|-xx|-2B|  | 2C| 34| 60| | 62| 2E| 2F| 47|
|-------|  |-----------------------------------------------------------|  |------------ |---------------|
| 19| 1A|  |  35 | 36| 37| 38| 39| 3A| 3B| 3C| 3D| 3E| 3F| 40| 41| -58 |  | 42| 4A| 7B| | 44| 45| 46|   |
|-------|  |-----------------------------------------------------------|  `-----------' |-----------| 7D|
| 31| 33|  | -77  | 4D| 4E| 4F| 50| 51| 52| 53| 54| 55| 56| 57|   59   |                | 5B| 5C| 5D|   |
|-------|  |-----------------------------------------------------------|      ,---.     |-----------|---|
| 48| 49|  |   63   | 64| 65| 66| 67| 68| 69| 6A| 6B| 6C| 6D|  6E      |      | 14|     | 70| 71| 72|   |
|-------|  |-----------------------------------------------------------|  .-----------. |-----------| 5A|
| 5F| 61|  | -4C  | 13| 78|           79                   | 7A| 43| 0D|  | 18| 1B| 1C| |   5E  | 32|   |
`-------'  `-----------------------------------------------------------'  `-----------' `---------------'

,-------.  ,---,  ,---------------. ,---------------. ,---------------.   ,-----------. ,---------------.
|  Help |  |   |  | F1| F2| F3| F4| | F5| F6| F7| F8| | F9|F10|F11|F12|   |PrS|ScL|Pau| |Mut|VoD|VoU|Pwr|
`-------'  `---'  `---------------' `---------------' `---------------'   `-----------' `---------------'
,-------.  ,-----------------------------------------------------------.  ,-----------. ,---------------.
|Stp|Agn|  |Esc|  1|  2|  3|  4|  5|  6|  7|  8|  9|  0|  -|  =|  \|  `|  |Ins|Hom|PgU| |NmL|  /|  *|  -|
|-------|  |-----------------------------------------------------------|  |------------ |---------------|
|Prp|Und|  | Tab |  Q|  W|  E|  R|  T|  Y|  U|  I|  O|  P|  [|  ]| Bspc|  |Del|End|PgD| |  7|  8|  9|   |
|-------|  |-----------------------------------------------------------|  `-----------' |-----------|  +|
|Frt|Cpy|  | Ctrl |  A|  S|  D|  F|  G|  H|  J|  K|  L|  ;|  '| Return |                |  4|  5|  6|   |
|-------|  |-----------------------------------------------------------|      ,---.     |-----------|---|
|Opn|Pst|  | Shift |  Z|  X|  C|  V|  B|  N|  M|  ,|  .|  /|    Shift  |      | 14|     |  1|  2|  3|   |
|-------|  |-----------------------------------------------------------|  .-----------. |-----------|Ent|
|Fnd|Cut|  |Caps  |Alt|Met|          Space                 |Met|Com|Alt|  | 18| 1B| 1C| |     0 |  .|   |
`-------'  `-----------------------------------------------------------'  `-----------' `---------------'
  • different scan codes: -

\ is not registered with other than Layout 22h

USB HID usages for Sun

,-------.  ,---,    ,-------.  ,---,
|  Help |  |   |    |   75  |  | ??|
`-------'  `---'    `-------'  `---'
,-------.           ,-------.
|Stp|Agn|           | 78| 79|
|-------|           |-------|
|Prp|Und|           | 76| 7A|
|-------|           |-------|
|Frt|Cpy|           | 77| 7C|
|-------|           |-------|
|Opn|Pst|           | 74| 7D|
|-------|           |-------|
|Fnd|Cut|           | 7E| 7B|
`-------'           `-------'

,---------------.   ,---------------.
|Mut|VoD|VoU|Pwr|   | 7F| 81| 80| 66|
`---------------'   `---------------'

https://kentie.net/article/sunkbd/sun%20keys.txt

name sun code usb code usb name
Blank - - -
help 0x76 0x75 help
stop 0x01 0x78 stop
again 0x03 0x79 again
props 0x19 0x76 menu
undo 0x1A 0x7A undo
front 0x31 0x77 select
copy 0x33 0x7C copy
open 0x48 0x74 execute
paste 0x49 0x7D paste
find 0x5F 0x7E find
cut 0x61 0x7B cut
mute 0x2D 0x7F mute
vol down 0x02 0x81 volume down
vol up 0x04 0x80 volume up
power 0x30 0x66 power

Blank key located between Help and F1 on Sun USB keyboard is not confirmed. Let me know if you know HID usage the key uses.

Keyboard Return

0x9E Keyboard Return is refered in this file. which key?

https://github.com/illumos/illumos-gate/blob/12dabefaaaccfb35350ebc99220facfd6866d6be/usr/src/cmd/loadkeys/type_6/reset#L188

Resources

SPARC Keyboard Specification

https://archive.org/details/bitsavers_sunsparcSPationVer11999_166667/

Sun keyboard to USB Converter

http://kentie.net/article/sunkbd/page2.htm

Type 3

https://web.archive.org/web/20190815152626/blog.daveastels.com.s3-website-us-west-2.amazonaws.com/2014/12/27/type-3-keyboard.html

CTCSP SHORT TYPE KEYBOARD(Type 5)

http://imgur.com/a/QIv6p

suniversal

https://codeberg.org/xelalexv/suniversal

mouse converter

http://www.rosenau-ka.de/ps2sun/

SUN Type5 keyboard USB converter

with Japanese layout support http://shikasan.net/sunkey/sunkey_e.html

Clone this wiki locally