A/UX: ASCII Codes Returned By Function Keys Under Command Shell


How can I find out what ASCII codes are returned by the function keys under
the command shell?

Follow these steps:

1) Open a vi window; type vi testfkey and press Enter

2) To begin entering data, press Escape i

3) In the window, press Control-v followed by the function key.

4) To quit vi and save the file, press Escape ZZ Enter

5) With the function key keystroke captured, run od on the document to
find out the ASCII/hex codes. For example, to see the contents of the
file in hex, type od -h testfkey and press Enter.

Other od flags include:

* a to display bytes under their ASCII names

* d, l, or i to display bytes in decimal

* h to display bytes in hex

Article Change History:
17 Jun 1993 - Revised to add more detail to steps.
31 Aug 1992 - Reviewed for technical accuracy.


Published Date: Feb 18, 2012