Re: mc from minicom





On Sun, 28 Nov 2010, Thomas Dickey wrote:

On Mon, 29 Nov 2010, Eric Gillespie wrote:

On 29 November 2010 07:53, Thomas Dickey <dickey his com> wrote:

On Sun, 28 Nov 2010, Kevin Wilson wrote:

 Hi,
 I am trying to use mc on a machine to which I am connected via minicom
(serial  connection).
MC opens ok, but the keys are not functioning well.


minicom acts as a terminal emulator - sort of like a vt100, with color
(and odd line-drawing).  That probably means it doesn't have function
keys - vt100's don't have home/end, etc.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
...
If you can, try this: export TERM=vt220; then start mc. That probably has
support for more keys. I'm not entirely sure of that.

well... looking at the source for version 2.4, in src/wkeys.c it does
have some limited ability to match keys from the terminal description.
But it's limited.  Here are the (termcap) names it looks for:

static const char *func_key[] = {
  "", "k1", "k2", "k3", "k4", "k5", "k6", "k7", "k8", "k9", "k0",
  "kh", "kP", "ku", "kl", "kr", "kd", "kH", "kN", "kI", "kD",
  "F1", "F2", NULL };

That is (more/less) function-keys 1-10, cursor-keys and the editing-keypad.
The names would be documented in terminfo(5).

But it's limited: it doesn't really know about application-mode.

(minicom was originally designed to just use the Linux terminal description,
modify it a little to make it act like a vt100, and has probably a number of
assumptions about that, still embedded in the code).

Hi,

There are a couple of old tricks which might or might not help, given the 
circumstances. Understand, these are not guaranteed.

1. Esc followed by a number (from the regular keys at the top of the 
QWERTY keyboard) can often be used to substitute for the corresponding Fn 
key, at least for F1 through F10, with Esc 0 giving F10. This is an old 
trick indeed, which was intended to work in situations where the keyboard 
does not even have any function keys on it or where some of the function 
keys already have different meanings reserved.

2. The "Learn keys" setup option might possibly also be helpful.

Theodore Kilgore



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]