Dealing with Unicomp PC 122's shifted F13-F24 keys row

It's fairly well known that Unicomp's PC 122 keyboards can come with F13 to F24 keys that do not output unique scancodes, instead, acting like shifted F1 to F12 keys. This can be annoying if you wish to simply remap these keys for your own usage. This guide will explore what options you have and how you can work around this issue.

Applicable keyboards

Note that not all Unicomp 122-key Model Ms are PC 122. Unicomp also makes terminal and terminal emulator 122-key keyboards (self-branded and sold to other companies such as Affirmative Computer Products) that should not have shifted F keys. PC 122s are strictly the keyboards Unicomp sells on their website that are targeted to PC use only.

What you need


Getting around this with AutoHotkey

Provided you do not need shifted F keys for other purposes, a possible solution on Windows with both USB and PS/2 keyboards is to use AutoHotkey to write a remap targeting shifted F keys. This is easy as you simply use the key name of the F key that resides below a particular F13-F24 key you want to remap and add + just before it indicates your code should trigger when shift is also being held.

+F1::MsgBox You pressed F13. +F2::MsgBox You pressed F14. +F3::MsgBox You pressed F15. +F4::MsgBox You pressed F16. +F5::MsgBox You pressed F17. +F6::MsgBox You pressed F18. +F7::MsgBox You pressed F19. +F8::MsgBox You pressed F20. +F9::MsgBox You pressed F21. +F10::MsgBox You pressed F22. +F11::MsgBox You pressed F23. +F12::MsgBox You pressed F24.

I used a message box output as my example above, but you can safely remove everything after the :: and add your own code in.

To use the code snippet provided, you'll need to create an AutoHotkey script to put it in. Once AutoHotkey is installed, right-click an empty area of your Windows desktop, hover over "New", and then click "AutoHotkey Script" to create the file, then open the file in your favourite text editor and paste the code in and save. Once done, simply double-click the script file to run the code. If you then wish to make this script run every time Windows starts up, simply compile the script via right-clicking the script file and clicking "Compile Script", and then follow steps 3 and 4 from these instructions from Microsoft on how to make an app run on startup. For a list of possible keys you can use for your remap, see AutoHotkey's List of Keys.

Getting around this with Soarer's Converter

Provided you do not need shifted F keys for other purposes, a possible solution on all operating systems with PS/2 keyboards is to use Soarer's Converter to write some macros targeting shifted F keys. To do this, you can create a macro for each F key with SHIFT written after the target key name to indicate your code should trigger when shift is also being held.

 macroblock   macro F1 SHIFT    PRESS F13   endmacro   macro F2 SHIFT    PRESS F14   endmacro   macro F3 SHIFT    PRESS F15   endmacro   macro F4 SHIFT    PRESS F16   endmacro   macro F5 SHIFT    PRESS F17   endmacro   macro F6 SHIFT    PRESS F18   endmacro   macro F7 SHIFT    PRESS F19   endmacro   macro F8 SHIFT    PRESS F20   endmacro   macro F9 SHIFT    PRESS F21   endmacro   macro F10 SHIFT    PRESS F22   endmacro   macro F11 SHIFT    PRESS F23   endmacro   macro F12 SHIFT    PRESS F24   endmacro  endblock

With the code above, there are three ways you can use it to do what you want.

  1. You can simply write a remapblock to target F13 to F24 keys now since the code above by default outputs the proper keycodes expected from those keys. This is ideal if you plan to reuse your F13 to F24 remaps for other 122-key or extended layout keyboards you may have, thus wanting to separate the code into its own file and bring them in via an include.
  2. You can directly change the keycodes in the PRESS Fxx statements to do a quick remap without making additional code structures. If you don't need to reuse your F13-F24 remaps for other keyboards, this is a good enough option.
  3. You can remove the PRESS Fxx codes and write your own macro code directly. If you're after something more complex than simple remaps, take this course of action.

To use the Soarer's Converter code provided, you'll need to create a .sc to put it in. To do so, simply create an empty file with your favourite text editor, paste the code above in, and then save it with the .sc extension at the end of the file's name. See my Soarer's 101 tutorial for instructions on downloading and using the needed flashing tools. For a list of possible keys you can use for your remap or macros, open the codes.html page in the "docs" folder that would have been bundled with the same zip file that contained the flashing tools.

Fixing this with a new controller

If you want to fix the issue instead of going around it (especially if you need to use shifted F keys) and are confident with DIY, you'll need to deal with the controller itself. Unicomp can sell you a controller (they call it a logic card) that has firmware that solves this issue. As posted by u/UnbridledHedonism in January 2021 on r/ModelM, you can order a controller with this firmware by ordering three Customization Fee items and using the following as the text field:

"Replacement logic card for [insert_part_no] loaded with Single Usage Code firmware."

...where "insert_part_no" is the part number of your specific PC 122. If you're unsure about anything, you can contact Unicomp's support - they're usually very helpful.

Another option is procuring and fitting your own custom controller, which could be useful if you want to enhance your keyboard with the capabilities of QMK such as built-in customisation at the same time. u/_pandrew's (aka, purdeaandrei) open-source OverNumpad Controller is designed to be a drop-in QMK compatible replacement controller for fourth-generation Model Ms such as modern Unicomp PC 122 keyboards that you can order yourself from PCB manufacturer JLCPCB (depending on component availability).