MacroKeys
© Cerilica 2026
© Cerilica 2026
Inspired by the Acorn Electron, MacroKeys turns CapsLock into an FN key, allows *KEY definitions for all alphanumeric keys and enables soft-key expansion in the desktop. It also allows Print and Enter keys to be “pressed” in emulators like VirtualRPC.
The current version is 0.03 (01 Jun 2026) [32bit]
The Acorn Electron did not have function keys on its keyboard. Instead, it had an FN key which, when held while pressing a digit key, simulated f0-f9. In addition, FN+A to FN+Z (plus six punctuation keys) inserted soft-key strings into the keyboard buffer, defaulting to BASIC keywords. Sadly, this wasn’t carried over to later 8-bit machines nor to the Archimedes.
The MacroKeys module provides similar functionality for RISC OS. CapsLock becomes FN if held while pressing another key:
FN+0 Print key (f0)
FN+1 - FN+9 f1 -f9
FN+Insert * f10
FN+End/Copy* f11
FN+Left* f12
FN+Right* f13
FN+Down * f14
FN+Up* f15 * subject to *FX4
FN+Return Keypad Enter
FN+A - FN+Z soft keys
FN+`-=[];'#\,./ soft keys
FN+Home soft key f0 (always)
FN+f1 - FN+f12 soft keys f1-f12 (always)
It also extends the *KEY command:
With no parameter, lists all the soft key definitions. These are also written to the Desktop Save file if your OS hasn’t lost that functionality.
Deletes the specified soft key definition.
Sets the specified soft key to the keyboard buffer byte string, in GST format. The keyboard buffer usually uses byte values 128-255 to represent non-alphanumeric keys such as the function keys, so character codes 128-255 must be preceded by a |@ null byte.
0-15 have always existed. MacroKeys reserves 16-127 for further expansion.
144-169 are FN+A to FN+Z (i.e. FN+A soft key is defined in SysVar Key$144)
171-175 are the punctuation keys ; , - . / and 177-183 are the keys # \ ] [ ` = ' in that order.
In addition to numbers, key names can be used such as Print, F12, or any of the above letters and punctuation. e.g. *KEY # I have just pressed the hash key or *KEY Print "I can finally press this in VirtualRPC!|M"
I have a related module called MacroClip that ties this system into the clipboard, but that relies on UniClip so I’ll be releasing that later this year. For some definition of “this”.