[syslinux] keystrokes
Ady
ady-sf at hotmail.com
Sat Sep 6 11:50:04 PDT 2014
> Ady <ady-sf at hotmail.com> writes:
>
> >> On Sat, Sep 6, 2014 at 8:18 AM, Ady <ady-sf at hotmail.com> wrote:
> >>
> >>> What actions are _supposed_ to be triggered by each of:
> >>>
> >>> [Ctrl-J]
> >>> [Ctrl-M]
> >>>
> >>> in the Syslinux command line in version 6.03-pre20?
> >>
> >> They should do nothing special but either might be interpreted like
> >> an <enter>.
> >
> > Well, for a common user, "nothing special" doesn't seem exactly the
> > same as "<enter>".
> >
> > I had already seen [Ctrl+J] being the same as [Enter] in "cli.c", but
> > I couldn't find the meaning (or intention of) [Ctrl+M].
>
> get_key() returns 13 (ASCII CR, \r) for Enter, just like for Ctrl-M.
> Ctrl-J is LF (\n). Either or both is used to terminate lines under
> different operating systems, so it makes sense to handle them the same.
>
> > [Ctrl+M] _seems_ to be behaving as [Enter], but since it is not in
> > "cli.c", I decided to post here in the mailing list.
>
> See above> Ctrl-M _is_ Enter, in some sense.
> --
> Regards,
> Feri.
Please forgive my ignorance (I am not a developer). Where in the
Syslinux code we can find that [Ctrl-M] is "CR"?
For example, in "./com32/elflink/ldlinux/cli.c", line 219, we can
see:
case KEY_ENTER:
case KEY_CTRL('J'):
ret = cmdline;
done = true;
break;
So I can see that [Ctrl-J] has the same effect as [Enter] in the
Syslinux CLI.
But I can't find [Ctrl-M], or rather, I don't know how to find it.
As with other keystroke combinations that are not listed or
mentioned, I would had expected for [Ctrl-M] to do "nothing".
So, where in the Syslinux source code the effect of [Ctrl-M] is
defined as to be "CR" (or [Enter], or whatever)?
TIA,
Ady.
More information about the Syslinux
mailing list