We have a lot of old PC's running Windows XP for the sole purpose of running a terminal emulator. Desperately want to get away from Windows XP, so have tried Ubuntu with Xterm and linux Mint with Putty, but can't seem to map the F5 key to how we need it to work with our red hat server

I'm trying to map the F5 key to send a string of \e[M or \033[M on Xterm for Ubuntu. Have modified the .Xresources file as follows:-

*xterm.translations: #override <key>f5: string("\033[M")

Have tried many modifications of the above too, but nothing seems to work. The other option is using Putty on Linux mint, but can't seem to map the keys in Putty either. Any help or is very much appreciated!


The basic problem with

*xterm.translations: #override <key>f5: string("\033[M")

is that it attempts to modify the wrong level in the widget hierarchy. The xterm part refers to the instance name (the program which is being run). Under that, xterm has one or more levels before reaching the translations resource:

  • some configurations have a level for a menu-bar (offhand, Cygwin and Gentoo do this), and
  • all configurations have a level with the vt100 widget (class name "VT100", or instance name "vt100").

The translations resource is a feature of the X Toolkit library, and for it to work as intended, has to be applied to the widget used for input.

This should work better, using an asterisk to handle the intermediate levels:

*xterm*translations: #override <key>f5: string("\033[M")

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.