Re: Shift enter produces dot on command line



Hello,

On Mon, 1 Nov 2004, Pavel Tsekov wrote:

> Hello,
>
> On Mon, 1 Nov 2004, Leonard den Ottolander wrote:
>
> > I see something odd when entering a shift-enter on the command line. A
> > dot appears which seems not to be interpreted. Also the other characters
> > that are typed afterwards are discarded.
>
> What is Shift+Enter supposed to do ? Under what kind of terminal do you
> run MC when this happens ? Maybe you terminal generates an escape sequnce
> for Shift + Enter and it must be filled in the list of keystrokes that
> should be ignored.

Shift + Enter is passed to the command prompt widget. And is processed for
some obscure reason by that code:

cb_ret_t
input_callback (WInput *in, widget_msg_t msg, int parm)
{
    int v;

    switch (msg) {
    case WIDGET_KEY:
        if (parm == XCTRL ('q')) {
            quote = 1;
            v = handle_char (in, mi_getch ());
            quote = 0;
            return v;
        }

        /* Keys we want others to handle */
        if (parm == KEY_UP || parm == KEY_DOWN || parm == ESC_CHAR
            || parm == KEY_F (10) || parm == XCTRL ('g') || parm == '\n')
            return MSG_NOT_HANDLED;

>        /* When pasting multiline text, insert literal Enter */
>        if ((parm & ~KEY_M_MASK) == '\n') {
>            quote = 1;
>            v = handle_char (in, '\n');
>            quote = 0;
>            return v;
>        }

        return handle_char (in, parm);


So you got the '.' because the '\n' is non-printable char. I don't know
what Shift + Enter has to do with pasting though ?!



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