Re: Applications in general; Emacs

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

 



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

> On Wed, Jun 14, 2017 at 11:09 PM, Alan Cox <gnomes@xxxxxxxxxxxxxxxxxxx> 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
--
To unsubscribe from this list: send the line "unsubscribe linux-8086" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Kernel]     [Linux ia64]     [DCCP]     [Linux for ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux