You can use hid_listen to see what code set is in use. Terminal keyboards are code set 3. The Code Set can be forced:
force
The force command disables the auto-detection of keyboard type. It is only very rarely needed!
force {set1|set2|set3|set2ext}
Example:
force set2
And Soarer has this to say about terminal keyboards:
Keyboard IDs
This section is mostly only relevant to terminal keyboards. The converter uses the ID to decide between using scan code set 3 for terminal keyboards, or extended scan code set 2 for 'regular' keyboards.
By using hid_listen, you can see what ID your keyboard has by looking at the two bytes read back after the get ID command (wF2 rFA).
The ID and scan code set selected are also printed in a more readable way: v0.996+
Keyboard ID: BFBF
Code Set: 3
Terminal keyboards often have DIP switches on the back panel, or alternatively a pin header on the PCB that you can fit jumpers to, which configure the keyboard's ID code.
The ID is a 16-bit number, but commonly fewer than 16 switches/jumpers are fitted meaning it's not possible to select all of the bits.
The default value with no jumpers fitted, or with all the DIP switches in the 'open' position, is BFBF.
If your terminal keyboard is not operating correctly, it might be because the wrong ID is set on the switches/jumpers. The first byte should not be AB.