Home -> Keyboards -> 122-key keyboards on NT-based Windows

122-key keyboards on NT-based Windows


With the standard keyboard drivers built into Windows, the extra keys on an IBM Host Connected Keyboard (or similar Unicomp 122-key terminal emulator keyboards) will return scancodes. However, the virtual key codes they produce will not be correct.

If you're using the extra keys in a macro program like AutoHotKey, this isn't a problem. But if you want them to return correct VK_ codes as well, or you need GetKeyNameText() to return proper key names, then the keyboard layout DLL needs to be replaced.

The first half of this page provides the new DLLs. The second half explains how to create your own, using the Microsoft Keyboard Layout Creator.


This file contains recompiled US and UK layouts that should support 122-key keyboards.

[ZIP]layouts.zip (508k)

Installing the new layouts

I haven't written instructions for anything later than Windows 2000. The help file supplied with Microsoft Keyboard Layout Creator provides installation instructions for versions of Windows from NT4 up to Vista.

Windows 2000 / NT 4

Install the layout by double-clicking the supplied .MSI file (the one ending in _i386.msi). On NT4, you may have to install the Windows Installer service, using InstMsiW. Once the layout is installed, go to the 'Keyboard' control panel. Under "Input Locales", click "Properties" and select your newly-installed keyboard layout.

Windows NT 3.x

According to the MSKLC documentation, the keyboard layouts it generates cannot be installed on Windows NT 3.x. However, it is possible to install them by hand:


In Windows NT 3.1, there is no support at all for the extra keys on a Host Connected Keyboard; they all register as F19.

In Windows NT 3.5, support was added for function keys F13-F24 on a "KB 3270" keyboard (likely the Key Tronic KB 3270). The Key Tronic keyboards don't use the same scancodes as the IBM Host Connected Keyboard and its derivatives. If you want to get technical, the Windows layout appears to be expecting keyboards where F13-F24 send Set 3 scancodes, not Set 2.

Windows NT 4.0 adds support for a few more 3270-esque keys (such as PA1-PA3), but again using Set 3 scancodes rather than Set 2.

Windows 2000 and later appear to support the same range of keys as NT 4. Since these Windows versions now support scancode remapping through the Registry, it would be possible to reassign the scancodes returned by the function keys at this level. However, it would not be possible to do this with the other 3270 keys such as CrSel, because there are no scancodes in the default table corresponding to these keys.

Creating Keyboard Layout DLLs

The Download section on this page includes new US and UK layout files generated using this process. To replicate the procedure for other keyboard layouts, follow these instructions.

Keyboard layout DLLs are generated by the Microsoft Keyboard Layout Creator, so download and install it.

The setup package can then be installed as described under Installing above.

Known Issues

Unlike the Windows 3.0 driver supplied with the Host Connected Keyboard by IBM, these layouts do not replace the keyboard driver itself. Consequently, trying to get the count of function keys with GetKeyboardType(2) will return 12, not 24.

John Elliott 24 July 2011.