Re: mc from minicom

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:

 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
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).

Thomas E. Dickey

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