Functions keys not working within terminal

0 votes
asked Aug 5, 2010 by Saquib (150 points)
edited Apr 8, 2011

We launch the control from within our application, which then allows users to run a CHUI application within the control. However, function keys which are used with the CHUI application are not working within the control, in certain scenarios.

  • in our dev environment, we are connecting to a Red Hat server, and the function keys work fine
  • our customer has HP-UX and once connected the function keys do not work.

We have tried setting the attribute sshFunctionKeysMode to the all possible values but no joy.

Please advise resolution.

1 Answer

0 votes
answered Aug 5, 2010 by Lukas Matyska (56,670 points)
edited Apr 8, 2011
Best answer

Problem with function keys is that there is no standard at all and every server can have own set of function keys. I've just found another set when googling "hp-ux function keys"...

Are you able to handle function keys correctly using PuTTY?

I can advise you 2 ways:

  1. Use another terminal type by setting terminalControl1.Options.TerminalName = "vt100" before you bind the TerminalControl (default value is xterm). It may result to using different function keys set by the remote end.
  2. Use another client which can handle the CHUI application function keys. Then start command "cat -v", type all function keys (this should print escape sequences of the function keys), then hit the CTRL+D to exit the "cat -v" command, finally send us the result of the "cat -v" command. We will add new FunctionKeysMode to the component and send you the current build.


Support for HP-UX function keys was released as build 4060 in February 2011.

To use new function keys specify TerminalControl.Options.FunctionKeysMode = FunctionKeysMode.HpUx; before you call the terminalControl1.Bind(client); method.

commented Aug 5, 2010 by Saquib (150 points)
Many thanks for the prompt response. Tried the suggestion and unfortunately still does not work. The function keys and their escape sequence are listed below: F1 = ^[[17~ F2 = ^[[18~ F3 = ^[[19~ F4 = ^[[20~ F5 = ^[[21~ F6 = ^[[23~ F7 = ^[[24~ F8 = ^[[25~ F9 = ^[[26~ F10 = ^[[28~ F11 = ^[[29~ F12 = ^[[31~
commented Aug 5, 2010 by Lukas Matyska (56,670 points)
Can you also provide codes for Insert, Delete, Home, End, PageUp, PageDown, LeftArrow, RightArrow, UpArrow and DownArrow please? And variants with the CTRL, ALT and SHIFT modifiers if it changes the sequences. Thank you.
commented Aug 6, 2010 by Saquib (150 points)
Hi further keys as requested below: Insert = ^[[2~ Home = ^[[1~ PageUp = ^[OQ PageDown = ^[OS End = ^[[4~ Delete = ^[[3~ Up = ^[[A Down = ^[[B Left = ^[[D Right = ^[[C Ctrl-F1 = ^[[23~ Ctrl-F2 = ^[[24~ Ctrl-F3 = ^[[25~ Ctrl-F4 = ^[[26~ Ctrl-F5 = ^[[28~ Ctrl-F6 = ^[[29~ Ctrl-F7 = ^[[31~ Ctrl-F8 = ^[[32~ Ctrl-F9 = ^[[33~ Ctrl-F10 = ^[[34~ Ctrl-F11 = ^[[23~ Ctrl-F12 = ^[[24~ Any idea when we can expect a new build and this will be sent to us? Regards and thanks for your assistance so far.
commented Aug 6, 2010 by Lukas Matyska (56,670 points)
I am going to add new FunctionKeys right now. Can you please send me (at your order details, so I am able to build correct packages for you?
commented Aug 6, 2010 by Saquib (150 points)
Email sent, thanks.