Thursday 26 May 2022

Spring Cleaning the CPC Keyboard

Again, written on Amstrad, mistakes and all:

After experimenting with writing on Amstrad and the Tasword, I felt something could be done to the keyboard. It's not that the keys didn't work, but they tended to get stuck.

As a remedy, I decided to open the keyboard, have a look inside and clean anything that might look suspicious. Old keyboards do need some care.

On removing the keyboard module, I realised how much more impressive this is than the Sinclair membrane system. The membrane is hidden inside a very protected environment, where very little or no dust can interfere.

After carefully peeling the keyboard layer from the metal base, the parts become revealed. On top of the metal base there is the membrane, and on top of that lies the black plastic frame for holding the keys.

At this point, there is almost nothing to do, as the insides of the keyboard module are surprisingly clean. Just a light dusting off is enough. Then I can get into removing the keys.

Each of the key has two or maximum of two "hooks" which have to be carefully pressed inwards to make the key fall off. Fortunately my fingernails are of the correct length here, I could remove the keys rather easily.


I left the more difficult looking wide keys last, as they also have a tiny metal rod to balance the keypress. These keys I removed one at a time, cleaned them and their surroundings, and put them back immediately. This way I wouldn't get confused with parts.

With the Return keys I noticed one of the "hooks" were missing. However I am almost certain I did not break it myself. Putting it back together the key felt ok, it doesn't really need both of them.

Then began the tedious process of cleaning each of the keys and generally fiddling about. I didn't have a master plan here, I felt it ought to be enough if I clean everything with somewhat moist Q-tips. Although with them I have to take care not to leave the tiny pieces of fabric the Q-tips tend to leave.

Just to feel I'd done something I strecthed the large spings a little before putting them back into place. Experimentally I also filed the keyboard holes a little in the hope this would prevent them getting less stuck.

Then everything is put back together, everything's fine? Not really at first. To my horror, a single key, the key F did not function at all. There were also some problem with space key producing two spaces more often than one!

Having a single key non-functioning meant the problem was not in the matrix, as this would result in a cluster of non-functional keys. So I pushed the key with some more force, and I heard a not very reassuring "SNAP". Fortunately this was the snapping together of the final hook between the plastic case and the metal plate. For some reason I had neglected to check if they are really properly all together.

I also gave the keyboard a sort of bash-around, bit like a guitarist does to strings after changing them. This seemed to help a little and the nuisances were mostly behind. I still feel something is off with the space bar, but at least it doesn't double-space anymore.

As a test I wrote the above text and this paragraph with the Tasword. Although not everything is perfect and I have not yet become used to the keyboard, it's already better for typing and I can perhaps dare say it could be better than a Sinclair QL keyboard after all.

I felt more encouraged to do this now that I got my HxC floppy emulator write problems resolved. The writes simply failed before I disconnected the internal floppy drive entirely. So, now I don't have to resort to photographing the screen but instead had to find a way to get the file to the Linux enviroment, a much more interesting task.

End of part written on Amstrad.


Back to Normality


I was so eager to transmit the above text to Linux, I did not check it and so there are a few typos.

The photograph below shows the plastic hook of the return key was already broken before I removed the key. Left from the center and a little down. Nice!

After some more typing I felt I could still open the keyboard one more time and improve some individual keys. At least the keys no longer become stuck in normal typing.

Getting the file back to Linux was easier than I thought. The HxCFloppyEmulator GUI version helped me convert the .hfe file into an Amstrad .dsk image.

Possibly because the image had not originated from iDSK, that program did not recognize it. Luckily I already had compiled the alternative sector-cpc. This did the job:

./sector-cpc --file blogpost.dsk extract post2.txt

This digs out the file post2.txt from the blogpost.dsk image file and saves it on the Linux filesystem.

Looking at the text there were some idiosyncrasies. Although I had written everything as paragraphs, pressing return only at the end, the file had 0x0D and 0x0A (Carriage Return and Line Feed) after every visible "line":


The spaces that Tasword had visually inserted to help center the columns are actually included as characters! For this one case, I manually formatted the paragraphs and used find-replace to destroy the double and triple spaces, before copy-pasting the results to Blogger.

The image above also shows the garbage at the end of the text proper, partly a leftover of earlier editing. Whether this was something the sector-cpc produced when exporting the file, I'm not sure.

These issues can probably be adjusted in the Tasword settings, should I continue with my 8-bit writing career in the future. Alternatively I could write a program or script for tidying the text files.

No comments:

Post a Comment