Operating System - HP-UX
1823986 Members
4400 Online
109667 Solutions
New Discussion юеВ

Configuring Functions Keys on HP-UX

 
Pablo Salazar
Advisor

Configuring Functions Keys on HP-UX

Hi to all admins,

I have a Bar Code Reader that they are connected to UNIX. But, need it to use Functions Key (f1, F2, etc).

How i do the configurations for this Functions?

REgards...
Saber lo que uno busca, es vivir con la conviccion de saber lo que uno es.
7 REPLIES 7
A. Clay Stephenson
Acclaimed Contributor

Re: Configuring Functions Keys on HP-UX

The key sequences returned by the function keys are terminal dependent.

If you need to know what they are then do an untic (for the current TERM setting) or untic vt100 to specify a vt100. You then look at the kf1= , kf2= , ... for each function key.

If you want to query the terminfo database for each sequence, you do something like this (assuming TERM is set and exported):

KF1=$(tput kf1)
KF2=$(tput kf2)

${KF1} will not contain the key sequences of F1.

Typically what you are trying to do is beyond the scope of simple scripting and requires the curses library.
If it ain't broke, I can fix that.
Pablo Salazar
Advisor

Re: Configuring Functions Keys on HP-UX

Well, Thanks for you response.

The applications which is installed on the Server have other Funtions Keys activated and it is working fine!!!.

Just the Function Key F5 isn't working, i don't know how to do to this Key work.

This Key by default is a BREAK, i press the key and do it some like ENTER, open a new line on the prompt of UNIX.

This is because, stty is configured to -ignbrk by default.

If i deactive this key (stty ignbrk) and i press the key F5, nothing happen. :S

Any idea, about the configure this Key for a particular applications or function???

Regards...

Pablo Salazar
Saber lo que uno busca, es vivir con la conviccion de saber lo que uno es.
Bill Hassell
Honored Contributor

Re: Configuring Functions Keys on HP-UX

BREAK will be a big problem to resolve. It is not a character at all and therefore cannot be loaded into a function key. BREAK is actually an illegal line condition for a serial line that can be detected by serial I/O card hardware. It sounds as if the software is performing the softkey load already so there isn't muchy you can do except to contact the manufacturer of the software to get a fix for HP-UX.


Bill Hassell, sysadmin
Pablo Salazar
Advisor

Re: Configuring Functions Keys on HP-UX

Hi..

The development people send the key secuence for F5 defined on the application "\1BOT".

So, any idea about the configure this secuence on the Key F5???

Regards...

Pablo Salazar
Saber lo que uno busca, es vivir con la conviccion de saber lo que uno es.
A. Clay Stephenson
Acclaimed Contributor

Re: Configuring Functions Keys on HP-UX

Again, the key sequence sent by a function key
has absolutely nothing to do with the OS (unless this is a workstation or other directly attached keyboard). It is determined solely by the terminal. If you tell us what king of terminal this is (or emulator) we might be able to tell you how to reprogram F5 or at least define a programmable function key.
If it ain't broke, I can fix that.
Bill Hassell
Honored Contributor

Re: Configuring Functions Keys on HP-UX

You wrote: F5 defined on the application "\1BOT".

The only fix for this is to rewrite the application. Perhaps it was never intended (or tested) to work correctly on HP-UX. There is nothing you can do since the keys are programmed by \1BOT, not by HP-UX.

As a general note: programming serial interface devices require a great deal of effort when porting between different flavors of Unix.


Bill Hassell, sysadmin
Pablo Salazar
Advisor

Re: Configuring Functions Keys on HP-UX

This issue was resolved with a configuration on script for Barcode reader.
Saber lo que uno busca, es vivir con la conviccion de saber lo que uno es.