When I bought an IBM 1397000 recently (
writeup), it came with a driver disk for Windows 3.0. Among other things, this driver makes the keys return the correct VK_ codes, and
GetKeyNameText() can convert the scancodes it sends back to key names.
I've now come up with two
layout DLLs (UK and US) which do the same on NT-based Windows versions, as far back as Windows NT 3.1. If you want to construct a layout DLL in a different language, the page also gives instructions for how to create these DLLs using the Microsoft Keyboard Layout Creator.
Note: This is for terminal
emulation keyboards using Scancode Set 2 -- not terminal boards using Set 3. Examples are the IBM 1397000 and the Affirmative 1227T.