Hi All,
This is a utf-8 file produced with Microsoft Word 2000 on Windows 98. Wordpad
only does utf-16. Windows 98 Notepad does not do Unicode at all. I'm going to
send you this message using copy&paste into the Yahoo webmail form to see what
happens. I've attached the original.
Tschss.
Elvis
NaiveKeymap.xml
A keymap is essentially a list of keys. It translates (or maps) keycodes to
charcodes. The keycodes represent keys on the keyboard and must be enumerated
somewhere.
A keymap is also a list(=set) of other keymaps, each keymap containing a list
of keycode to charcode translations. The character set can be given for each
(key)map; it doesnt have to be Unicode, or utf-8.
For example:
<keymap>
<map name="english" key="ShiftAltF1">...</map>
<map name="russian" key="ShiftAltF2">...</map>
<map name="greek" key="ShiftAltF3" charset="utf-8">
<key name="V">ω</key> --small omega=U03C9
<key name="SemiColon">
<key name="W">ώ</key></key> --small omega with tonos=U03CE
<key name="ShiftV">Ω</key> --capital omega=U03A9
<key name="SemiColon">
<key name="ShiftV">Ώ</key></key> --capital omega with tonos=U038F
<key name="F1">Καλημέρα
κόσμε</key> --the string, kalhmera kosme
<key name="CtrlAltDelete" action="reboot"></key>
</map>
</keymap>
I have arbitrarily reserved AltF1, AltF2, AltF3 for VC1, VC2, VC3 etc. --these
keys are not part of the VC keymap. You could use the ShiftAltF<n> to switch
between maps within a keymap.
Characters are written in utf-8, because this is xml, but you could also use
the Unicode number format like this:
<key name="Q" char="U+1FF6"></key>
'compose' key sequences are just nested character definitions.
enum actions {characters, strings, switching keymaps, booting the machine,
etc.};
There is no distinction between characters and strings. String actions are like
character actions, just normal content.
Emulating a Graphical Terminal
What tty mode is rawer than RAW?
It would have to be "bit-mapped" mode, or tty=null. Just pull out the ldterm
all together and put in a graphical hardware emulator.
How much of the X Protocol can be moved to a kernel-space stream, so that
virtual consoles can share the same graphics interface (including fonts,
keyboard events, and mouse) that X Windows system uses?
DOS programmers will be familiar with the traditional graphical PC interface,
but I am not one of them.
For graphical virtual terminals to work, you would only need the graphics
interface, not the windows, because the notion of a 'window' is fundamentally
different to a VC, which does not share its virtual display with many
applications. (That is what X, running in a VC, is for, to multiplex the VC.)
Character mode VCs would be built on top of the graphics emulator.
/* Nave_Keyboard.h */
// Sorry about the mistake
namespace mod {enum {shift=0x8000, ctrl=0x4000, alt=0x2000}; } // <--
Correction
namespace event {enum {make=0x0, brk=0x0080}; }
namespace key {enum {ESC=0x01, k1=0x02, k2=0x03, k3=0x04, k4=0x05, k5=0x06,
k6=0x07, k7=0x08, k8=0x09, k9=0x0a, k0=0x0b, minus=0x0c, equal=0x0d,
BS=0x0e, tab=0x0f, Q=0x10, W=0x11, E=0x12, R=0x13, T=0x14, Y=0x15,
U=0x16, I=0x17};}
const int q_make = key::Q | event::make;
const int q_break = key::Q | event::brk;
const int q_key = q_make;
const int q_shift = mod::shift | q_key;
const int q_ctrl = mod::ctrl | q_key;
const int q_alt = mod::alt | q_key;
const int q_ctrl_alt = mod::ctrl | mod::alt | q_key;
Composite Keys
The <Q> key can be represented by the make code(=0x10 | 0x00). <Shift-Q> is a
composite key being composed of <Shift> and <Q> keys (=0x8000 | 0x0010).
<Ctrl-Alt-Q> = 0x4000 | 0x2000 | 0x0010; better
The keyboard driver translates real keyboard scancodes into integer-valued
"composite keys", which are more easily mapped to (utf-8) characters.
Users can change keyboard map in midstream(=line) by using an <Alt> key
combination, so you can't replace a keyboard map as a module in a Stream.
A composite keycode would contain bits set corresponding to the state of the
keyboard.
X Keyboard events (unlike console scan codes) contain not only <make>, <break>
events, but they also pass along the state of the keyboard determined by the
modifier keys down at the time.
Applications not interested in <break> events can ignore them, but they have to
look at the entire keycode to determine the value of the key. (Keycode is part
of scancode.)
Events are translated into characters by a conversion function. This function
must look at a sequence of "dead" keys before outputting an accented character.
All keys are "dead" keys until they emit a character.
Traditional terminals send ascii characters to the tty driver in the host, so
the keyboard logic (=event processing) is part of the terminal.
__________________________________
Do you Yahoo!?
Yahoo! Mail is new and improved - Check it out!
http://promotions.yahoo.com/new_mail
Hi All,
This is a utf-8 file produced with Microsoft Word 2000 on Windows 98. Wordpad only
does utf-16. Windows 98 Notepad does not do Unicode at all. I'm going to send you this
message using copy&paste into the Yahoo webmail form to see what happens. I've
attached the original.
Tschüss.
Elvis
NaiveKeymap.xml
A keymap is essentially a list of keys. It translates (or maps) keycodes to charcodes.
The keycodes represent keys on the keyboard and must be enumerated somewhere.
A keymap is also a list(=set) of other keymaps, each keymap containing a list of
keycode to charcode translations. The character set can be given for each (key)map; it
doesn't have to be Unicode, or utf-8.
For example:
<keymap>
<map name="english" key="ShiftAltF1">...</map>
<map name="russian" key="ShiftAltF2">...</map>
<map name="greek" key="ShiftAltF3" charset="utf-8">
<key name="V">ω</key> --small omega=U03C9
<key name="SemiColon">
<key name="W">ώ</key></key> --small omega with tonos=U03CE
<key name="ShiftV">Ω</key> --capital omega=U03A9
<key name="SemiColon">
<key name="ShiftV">Ώ</key></key> --capital omega with tonos=U038F
<key name="F1">Καλημέρα κόσμε</key> --the string, kalhmera kosme
<key name="CtrlAltDelete" action="reboot"></key>
</map>
</keymap>
I have arbitrarily reserved AltF1, AltF2, AltF3 for VC1, VC2, VC3 etc. --these keys
are not part of the VC keymap. You could use the ShiftAltF<n> to switch between maps
within a keymap.
Characters are written in utf-8, because this is xml, but you could also use the
Unicode number format like this:
<key name="Q" char="U+1FF6"></key>
'compose' key sequences are just nested character definitions.
enum actions {characters, strings, switching keymaps, booting the machine, etc.};
There is no distinction between characters and strings. String actions are like
character actions, just normal content.
Emulating a Graphical Terminal
What tty mode is rawer than RAW?
It would have to be "bit-mapped" mode, or tty=null. Just pull out the ldterm all
together and put in a graphical hardware emulator.
How much of the X Protocol can be moved to a kernel-space stream, so that virtual
consoles can share the same graphics interface (including fonts, keyboard events, and
mouse) that X Windows system uses?
DOS programmers will be familiar with the traditional graphical PC interface, but I am
not one of them.
For graphical virtual terminals to work, you would only need the graphics interface,
not the windows, because the notion of a 'window' is fundamentally different to a VC,
which does not share its virtual display with many applications. (That is what X,
running in a VC, is for, to multiplex the VC.)
Character mode VCs would be built on top of the graphics emulator.
/* Naïve_Keyboard.h */
// Sorry about the mistake
namespace mod {enum {shift=0x8000, ctrl=0x4000, alt=0x2000}; } // <-- Correction
namespace event {enum {make=0x0, brk=0x0080}; }
namespace key {enum {ESC=0x01, k1=0x02, k2=0x03, k3=0x04, k4=0x05, k5=0x06,
k6=0x07, k7=0x08, k8=0x09, k9=0x0a, k0=0x0b, minus=0x0c, equal=0x0d,
BS=0x0e, tab=0x0f, Q=0x10, W=0x11, E=0x12, R=0x13, T=0x14, Y=0x15,
U=0x16, I=0x17};}
const int q_make = key::Q | event::make;
const int q_break = key::Q | event::brk;
const int q_key = q_make;
const int q_shift = mod::shift | q_key;
const int q_ctrl = mod::ctrl | q_key;
const int q_alt = mod::alt | q_key;
const int q_ctrl_alt = mod::ctrl | mod::alt | q_key;
Composite Keys
The <Q> key can be represented by the make code(=0x10 | 0x00). <Shift-Q> is a
composite key being composed of <Shift> and <Q> keys (=0x8000 | 0x0010).
<Ctrl-Alt-Q> = 0x4000 | 0x2000 | 0x0010; <-- better
The keyboard driver translates real keyboard scancodes into integer-valued "composite
keys", which are more easily mapped to (utf-8) characters.
Users can change keyboard map in midstream(=line) by using an <Alt> key combination,
so you can't replace a keyboard map as a module in a Stream.
A composite keycode would contain bits set corresponding to the state of the keyboard.
X Keyboard events (unlike console scan codes) contain not only <make>, <break> events,
but they also pass along the state of the keyboard determined by the modifier keys
down at the time.
Applications not interested in <break> events can ignore them, but they have to look
at the entire keycode to determine the value of the key. (Keycode is part of scancode.)
Events are translated into characters by a conversion function. This function must
look at a sequence of "dead" keys before outputting an accented character.
All keys are "dead" keys until they emit a character.
Traditional terminals send ascii characters to the tty driver in the host, so the
keyboard logic (=event processing) is part of the terminal.