Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

zsh & HP Term


I´ve been using zsh with HP-UX for the past two months and I am very impressed  
with it. I've succesfully configured my connection through a vt100 terminal to  
work just the way I wanted.

However, I've run into some problems when trying to configure zsh for use with  
an HP Terminal. In essence, I do not seem to be able to map the arrow keys to  
anything. I have read as much documentation on zsh as I could find, yet if the  
answer was there, it eluded me.  

I even tried the following without success:

    bindkey "$(echotc kl)" backward-char
    bindkey "$(echotc kr)" forward-char
    bindkey "$(echotc ku)" up-line-or-history
    bindkey "$(echotc kd)" down-line-or-history

After a while, I decided to write a mini C program to see what kind of values  
the HP Term sent when pressing the arrowkeys .. :

#include <stdio.h>
int main(void) {
   int c,a;

   for(a=0;a<5;a++) {
     printf("c=%d - %c\n",c,c);

.. and to my amazement, the program could not pick the arrow keys as being  
pressed! This leads me to believe that either the device for the HP term is  
"swallowing" the arrow keys, or that the system just uses a different system to  
comunicate the arrow keys. (maybe the Term sends the current cursor position in  
binary or something).

The reason I say the latter is because if I do an export TERM=tty while my  
terminal is in HP mode, I still cannot detect any arrow key presses with the  
above little hack.

Nontheless, other programs such as HP's own "SAM" (System Administrator Tool)  
and others have no problem detecting the arrow keys and using them to select  
items, etc.

I really welcome any ideas and suggestions, since I've pretty much run into a  
wall here.  

Kind Regards,

Alec Rodriguez

Messages sorted by: Reverse Date, Date, Thread, Author