Re: OT What does RET (Enter) do and how does it do it ??



On Sat, 2007-08-25 at 17:39 -0500, Aaron Konstam wrote:
On Sat, 2007-08-25 at 17:24 -0500, Mikkel L. Ellertson wrote:
Aaron Konstam wrote:

It seems to me that there is a point that is being missed. What you type
on the keyboard is just a continuous stream of characters. A line feed
which you get in Linux when you hit return is just a character like any
other. When you hit a g the letter g is printed. When a text editor is
analyzes the line feed it knows to go to the next line. When the shell
sees the line feed it knows it is to treat everything on the line up to
the line feed as a command. No magic is involved and it is really very
simple.

It is on an even lower level that that - when you hit a g, a g may
or may not be printed, depending on what is being done with the
input. (For example, if I am playing a movie with mplayer, f toggles
full screen mode, but is never printed.) Now, there are some
libraries that make thing easy for the programmer. The reason that
the editing keys work the same in so many programs is that they are
using the readline library routines. (man readline)

You also have all the terminal control characters that can come into
play, depending on the interface and settings. (man stty)

Mikkel
Ok, I went too far. Whatever program contols processing the keyboard
input uses anything typed in the way it wants to use it. The point is
that lf is not unique in that regard.
--
Except the keyboard produces 0x0d for the enter key (carriage return or
C/R). The Unix or Linux software translates that to linefeed (0x0A).
Some systems use (0x0d) to terminate lines, some use (0x0a 0x0d), some
use (0x0d 0x0a) and some use these with the msb set. These are stored
in the true literal text files, such as those produced by ed, edline or
vi. Other word processors may treat them differently. Some use 0x0a to
terminate a line, 0x0d or 0x8a to terminate a paragraph, and some use
one of the embedded device controls of the ASCII set to control the
paragraph or set editor appearance tools (such as the tab ruler,
margins, header, footer, page number and so forth). How keys are
handled are functions primarily of convention, where most of the
conventions in English came from typewriters, just as the convoluted
keyboard did.

Other conventions came from early word processors, and some came from
user experience, where the choice of how to access menues and controls
led to simpler key combinations for common actions.

Yet other conventions came from the unique capabilities of computers,
such as the control keys, which allow accessing the serial bus control
commands (note that the serial port on your computer is actually a bus
for controlling peripherals as well as an input medium).

Still more came from advances in technology, like the command key or
the function keys, and lately the keys for controlling sound or other
dedicated keys. Again, these grew out of the need for common actions to
be accessed in a simpler manner by the user.

Keyboards, continue to evolve, and new means and standards are probably
going to emerge over time, as language, and systems use continues to
evolve. Even the mouse was originally designed to evoke key strokes for
its actions, and while mouse technology has evolved, the serial bus and
its operation is still the medium of communication that has set the
standard, although the mouse itself is now either connected wirelessly,
by light or by usb. The mouse has grown buttons, scroll wheels
accelerometers, feedback, and eliminated the ball, but the
communications system is still "standard" to the serial port
capabilities. At least in most cases.

Key mapping using a piece of middleware allows systems cross
functionality, simplifies some operations and can even be set to
interpret key stroke combinations to create more complex functions, as
well as add the ability to create more accessibility for our handicapped
users, or enhanced capability for those with great artistic bent in some
unforeseen direction.

All of this is due to hackers, who looked at what was, saw what could
be and then worked to fill the gap. OK, not all hackers are good guys,
but most are. We benefit every day from them, from Mr. Diesel, to Mr.
Ford, to Dr. Robert Godard. Even Tesla was a hacker and proud of it.

Regards,
Les H

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: How can I stop controls from executing default keyboard and mouse behavior?
    ... > acted upon even if the Ctrl keys were also being pressed. ... so that control is badly written. ... not react to the keyboard when they don't have the focus. ... > The general problem is controls executing built-in behavior that I ...
    (alt.comp.lang.borland-delphi)
  • Re: FC3 i18n question
    ... I bought myself a German keyboard ... with all 105 keys, ... Under KDE, in the control centre, ...
    (Fedora)
  • Re: Random non-binding survey on naming
    ... using keyboard keys to cut ... the break-even point is at about five characters. ... The most direct is click on the beginning, drag to the end, control -X, go to the point I want the text to be placed, control -V, done. ... And I won't KNOW the "string at the end", "string at the beginning", or "string where I want to insert". ...
    (rec.arts.sf.composition)
  • Re: FC3 i18n question
    ... I bought myself a German keyboard ... >with all 105 keys, ... >the second for shifted, the third for control, the ...
    (Fedora)
  • Re: "Larrabee" GPU design question.
    ... it is used to copy selected characters in Windows. ... involve a keyboard directly connected to a CPU, ... keyboard as keys that generate ASCII control characters, ... when people connect to host computers over, say, dial-up modems. ...
    (comp.arch)