Sign in

Post by @3DirkJS@mstdn.social

rqm
rqm
@rqm
20h Public en

Fixing a Sun Type 7 Keyboard

Recently, not quite sure why, I decided to start looking for a Sun keyboard. Originally I was on the hunt for a keyboard that would have vim bindings printed on the keycaps, but as I was browsing around, I stumbled on a great deal on eBay -- fraction of the price, but there was no USB cable. That's a relatively easy fix, so I got one.

The keyboard arrived in good shape, and apart from the insane amount of fluff in it and the faded / yellowed plastic of the keyboard it was in decent shape. Yes, the cable was cut. But it was easily accessible: two screws on the bottom and further three underneath the top keyboard cover.

Once undoing the two longer screws on the bottom I popped off the top keyboard cover; this is held on with tabs and if you work your way around the left, bottom, and right side, it hinges at the top.

I decided the first job would be cleaning. I used a soft brush to get rid of the debris under the keys after opening (but not fully disassembling) the keyboard, and then took cotton wool balls dipped in rubbing alcohol to the surface to clean. This took a while but it worked OK.

Next was connecting up the USB cable. On the PCB the USB connector is probably some kind of a standard SMD connector, with standard USB cables coming off it: black, white, green, red. These are GND, D-, D+, 5V, usually. There is a fifth ground cable going to the USB cable, which is the "shield ground".

I disconnected the USB connector to the PCB and chopped up a USB connector. My initial plan was to use a USBC female to USBA 3.0 male connector's USBC end. But USB3.0 has, I think, 8 pins rather than 4, and while it should be possible to only hook up the 4 "standard" USB lines, I did not have much success with this.

Otherwise the soldering job was fine, although with these thin cables, rather than stripping them, I took to melting back just enough of the cable sleeve on each to expose a workable amount of wire. Just apply some hot solder on the tip of the soldering iron and it works well.

Second attempt involved cannibalising an old MiniUSB cable I really had no use for anymore. This has the "correct" amount of wires and this time it worked! I was delighted.

OpenBSD recognised it really well as a Sun Type 7 USB keyboard:

uhidev1 at uhub1 port 4 configuration 1 interface 0 "Fujitsu Component Sun USB Keyboard" rev 2.00/1.05 addr 4

Then I fired up xev to see whether the most exciting bits, the extra "Stop" and "Again" keys do something.

And they do! xev reports the following mappings by default:

Left hand extra column of keys:

-Help: DEAD.

  • Stop: keycode 145 (keysym 0xff69, Cancel)
  • Again: keycode 146 (keysym 0xff66, Redo)
  • Props: keycode 147 (keysym 0x1005ff70, SunProps)
  • Undo: keycode 148 (keysym 0xff65, Undo)
  • Front: keycode 149 (keysym 0x1005ff71, SunFront)
  • Copy: keycode 150 (keysym 0x1008ff2f, XF86Sleep) *
  • Open: keycode 151 (keysym 0x1005ff73, SunOpen)
  • Paste: keycode 152 (keysym 0x1005ff74, SunPaste)
  • Find: keycode 153 (keysym 0x1008ff17, XF86AudioNext) *
  • Cut: keycode 154 (keysym 0x1005ff75, SunCut)

Top right hand extra row of keys (above numpad):

  • keycode 160 (keysym 0x1008ff12, XF86AudioMute)
  • keycode 174 (keysym 0x1008ff11, XF86AudioLowerVolume)
  • keycode 176 (keysym 0x1008ff13, XF86AudioRaiseVolume)
  • keycode 222 (keysym 0x1008ff2a, XF86PowerOff)

Bottom row:

  • Compose: Menu

So as you can see, it mostly works okay. There are two funky key mappings by default, "Copy" doesn't copy but wants to put the computer to sleep; "Find" wants to skip to the next playing song. But these should be remappable.

The "Paste" and "Cut" keys do what one expects them to under X11, this is really really neat. I really like not having to press "Ctrl-Shift-V" for "paste" but ... "Paste".

The Compose key will be remapped as a Compose key I think, this is doable with xmodmap and .XCompose I think. I want to dig into whether, similar to SunPaste, there ought to be a SunCopy key that I could map to Copy.

For "Front" I want to set up a custom macro; for 9+Front I want to launch drawterm. 😆

Pity that "Help" doesn't do anything. It simply doesn't register as a keystroke. But you can't have it all -- besides, I haven't come up with anything funny to map it to.

#unix #OpenBSD #sun #solaris #retrocomputing

Replying to @rqm
3DirkJS
3DirkJS
@3DirkJS @mstdn.social
5h Public

@rqm the help key should.open man of course!

1 like