pateros@ecse.rpi.edu (Chuck Pateros) (02/13/91)
When I use the 3000's console windows (F1, etc.) and login to another Unix system (Sun), the terminal seems to act a lot like a vt100 terminal, except the arrow keys don't work in vi. Is there a way to either make the consoles act JUST like vt100s, or can I somehow tell the remote machine how to handle my console window (amiga) terminal? Thanks Chuck Pateros pateros@ecse.rpi.edu
jap@convex.cl.msu.edu (Joe Porkka) (02/14/91)
pateros@ecse.rpi.edu (Chuck Pateros) writes: >Is there a way to either make the consoles act JUST like vt100s, >or can I somehow tell the remote machine how to handle my console >window (amiga) terminal? You can teach VI to recognize your arrow keys. Fisrt, determine what each arrow key produces. (1) Now, setup a files called ".exrc" in your home directory, in it put stuff like map j (downarrow) map k (uparrow) map h (leftarrow) map l (rightarrow) (1) To determine what your arrow keys are can be easy, if their not mapped funny. In VI use the following keysequence <ESC> i ^v (arrowkey) The ^v (control-v) is to let you insert a control character. Usually the first char of a special key, like arrows, in an esc. On the keyboard I'm on now, the result of doing the above for uparrow is: map k Ox The up arrow being an esc, O, x I think VT100 arrows are esc, [, A B C and D
skrenta@cbmvax.commodore.com (Rich Skrenta) (02/14/91)
In article <QL+&Q^_@rpi.edu> pateros@ecse.rpi.edu (Chuck Pateros) writes: >When I use the 3000's console windows (F1, etc.) and login >to another Unix system (Sun), the terminal seems to act a lot >like a vt100 terminal, except the arrow keys don't work in >vi. "ansi" is a better terminal choice for the Amiga Unix consoles. You could also infocmp out your terminfo description for "amiga" from your 3000 and send it to the remote system. Rich -- Rich Skrenta skrenta@cbmvax.commodore.com
pateros@ecse.rpi.edu (Chuck Pateros) (02/14/91)
Thanks to everyone, especially Scott Hess, for help on my Amiga - Sun problem. The problem was that when I remotely logged in to the Sun from an Amiga console window, I couldn't use my arrow keys in vi. I did the following change to /etc/termcap on the Sun: Old /etc/termcap entry: # rough draft of Amiga termcap by Mike Meyer #AA|amiga|Amiga ANSI:\ # :co#80:li#25:am:do=\E[B:ce=\E[K:cd=\E[J:\ # :cl=\E[H\E[J:ku=\E[A:kd=\E[B:kl=\E[C:kr=\E[D:kb=^H:\ # :al=\E[L:dl=\E[M:le=^H:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ # :ce=\E[K:ho=\E[H:dc=\E[P:ic=\E[@:\ # :so=\E[2m:se=\E[m:us=\E[4m:ue=\E[m:mr=\E[7m:mb=\E[7;2m:me=\E[m: New /etc/termcap entry: AA|amiga|Amiga ANSI:\ :co#80:li#50:am:do=\E[B:ce=\E[K:cd=\E[J:\ :cl=\E[H\E[J:ku=^[A:kd=^[B:kr=^[C:kl=^[D:kb=^H:\ :al=\E[L:dl=\E[M:le=^H:cm=\E[%i%d;%dH:nd=\E[C:up=\E[A:\ :ce=\E[K:ho=\E[H:dc=\E[P:ic=\E[@:\ :so=\E[2m:se=\E[m:us=\E[4m:ue=\E[m:mr=\E[7m:mb=\E[7;2m:me=\E[m: The line number variable (li#25) has changed to 50 because of the (nice!) size of the console window, and I changed the ku,kd,kr and kl variables from \E[A, \E[B, \E[D and \E[C to ^[A, ^[B, ^[C and ^[D respectively. Note that besides the change from \E to ^, I also needed to switch the letters for kr and kl. I don't know where we originally even got this termcap entry. I tried ftp'ing the /etc/termcap entry from the Amiga to the Sun, but that resulted in bizarre terminal behavior. I was going to try changing the other \E's to ^'s, but now the screen seems to work fine ... Thanks again for all the help, and what the hell is an xtermm, and why don't other machines seem to like it?! :-) Chuck pateros@ecse.rpi.edu
ag@amix.commodore.com (Keith Gabryelski) (02/15/91)
In article <1991Feb13.191725.19719@msuinfo.cl.msu.edu> jap@convex.cl.msu.edu (Joe Porkka) writes: >(1) To determine what your arrow keys are can be easy, if their not >mapped funny. In VI use the following keysequence ><ESC> i ^v (arrowkey) There is a program called `octopus' in /usr/public/bin that will display key typed. Here is sample output: binary oct dec hex asc sym text 10011011 233 155 9b ~^[ Meta-Control-Open Square Bracket 01000001 101 65 41 A A Capital-Letter-A 10011011 233 155 9b ~^[ Meta-Control-Open Square Bracket 01000100 104 68 44 D D Capital-Letter-D 10011011 233 155 9b ~^[ Meta-Control-Open Square Bracket 01000010 102 66 42 B B Capital-Letter-B 10011011 233 155 9b ~^[ Meta-Control-Open Square Bracket 01000011 103 67 43 C C Capital-Letter-C 00000100 4 4 4 eot ^D End of Transmission Quit (y or n)? Yes. I typed the arrow keys in the following sequence UP, LEFT, DOWN, RIGHT. Octopus says that: UP 0x9B A DOWN 0x9B D LEFT 0x9B B RIGHT 0x9B C Amiga Unix has per screen keymaps that can be modified by the user. The format of these keymaps are not documented at this time (because they will change). Use `sioc' to get or set the current keymap. Some defaults are in /usr/amiga/lin/kmap. see ``man sioc'' and ``man kmap'' for more information. Pax, Keith I've never kissed a bear I've never kissed a goon but I can shake a chicken in the middle of the room -- ag@amix.commodore.com Keith Gabryelski ...!cbmvax!amix!ag
crash@ckctpa.UUCP (Frank J. Edwards) (02/15/91)
In article <QL+&Q^_@rpi.edu> pateros@ecse.rpi.edu (Chuck Pateros) writes: >When I use the 3000's console windows (F1, etc.) and login >to another Unix system (Sun), the terminal seems to act a lot >like a vt100 terminal, except the arrow keys don't work in >vi. What?! "Arrow keys" in vi?! That's heresy!!! Actually, the problem is in the keymapping done for the Amiga console device(s). Check the /usr/amiga/lib/kmap directory for other (provided) keymaps. They can be changed with: $ sioc setkmap <fname> or $ sioc setdefkmap <fname> You really shouldn't be using the arrow keys, ya' know? Most implementations of vi don't set the mappings properly for using the arrow keys in INPUT mode (not vi's fault -- I'm not sure they _can_ be set properly). I'm using /usr/amiga/lib/kmap/usa0 for the program I'm porting which prefers vt100-compatible. >Thanks Your welcome. Good Luck! >Chuck Pateros >pateros@ecse.rpi.edu -- Frank J. Edwards | "I did make up my own mind -- there 2677 Arjay Court | simply WASN'T ANY OTHER choice!" Palm Harbor, FL 34684-4504 | -- Me Phone (813) 786-3675 (voice) | Only Amiga Makes It Possible...