linux-8086.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Alan Cox <alan@llwyncelyn.cymru>
To: David O'Shea <dcoshea@gmail.com>
Cc: linux-8086 <linux-8086@vger.kernel.org>
Subject: Re: Applications in general; Emacs
Date: Mon, 19 Jun 2017 14:57:45 +0100	[thread overview]
Message-ID: <20170619145745.7117747f@alans-desktop> (raw)
In-Reply-To: <CAN0DjM3PVFVDoLrpa67Ho2noV5Pd-TBL2RPfqx+Axgiws_cu2Q@mail.gmail.com>

On Sat, 17 Jun 2017 21:56:25 +0930
"David O'Shea" <dcoshea@gmail.com> wrote:

> On Wed, Jun 14, 2017 at 11:09 PM, Alan Cox <gnomes@lxorguk.ukuu.org.uk> wrote:
> > For the enter key check the termios setup carefully and see if you are
> > getting \r and \n confused somewhere ?  
> 
> Yes, it was expecting Ctrl-M but was getting Ctrl-J.  I'm afraid I'm
> not really familiar with this stuff, is this a difference between the
> terminal that ELKS emulates and the terminals that other systems
> emulate?
> 
> I see that the editor calls cfmakeraw(), which the man page on my
> Linux system says disables translation between CR and LF, but that
> doesn't seem to be telling me whether I should get one or the other.

It disables the translation - you get whatever the hardware sends which
is indeed hardware specific.

> Am I getting Ctrl-J because arch/i86/drivers/char/xt_key.c does this
> near the end of keyboard_irq()?

Yes but you might get ctrl-M from a device on a serial port. If you
disable translation you kind of own the problem.
 
> I also noticed that some keys like Home and End don't work, I guess
> that the editor is not receiving the sequence of characters it
> expects.  What is the best way to work out what it's going to receive?

Device specific. Most modern systems use either the VT100 or VT52
standards and applications would use termcap to look up the sequences
expected for key mappings.

>  I'm struggling to find a standard for how key sequences are encoded
> using ANSI, all the documents I could find want to tell me what
> sequences I can *send to* the terminal!  I'm not finding it that easy
> to follow the code in xt_key.c either.

Look up VT100, VT52. The key codes were AFAIK never standardised in ANSI,
so everyone just used the VT codes.

> I notice the editor also gets Ctrl-C and Ctrl-Z.  Should it?

That depends upon the terminal settings. You can opt not to, or to catch
^Z so you can suspend nicely for example.

Alan

      reply	other threads:[~2017-06-19 13:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-06-14  0:04 Applications in general; Emacs David O'Shea
2017-06-14  0:55 ` Alan Cox
2017-06-14 11:34   ` David O'Shea
2017-06-14 13:39     ` Alan Cox
2017-06-17 12:26       ` David O'Shea
2017-06-19 13:57         ` Alan Cox [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170619145745.7117747f@alans-desktop \
    --to=alan@llwyncelyn.cymru \
    --cc=dcoshea@gmail.com \
    --cc=linux-8086@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).