Before explaining difference between Linux version and others,
I'll show,you may know, some difference between UNIX and DOS
which I found in porting work.
- FileName.
. No DriveID under UNIX.
. Directory separator is "/". It is "\" under DOS.
. Case sensitive filename. Command name is usualy by lower case.
. "." and ".." is allowed as filename char.
Bash(Linux shell) interpret "!" and it should not be used.
. "*" and "?" is allowed as filename char,but shell expand it.
Command "rm *" to delete filename * will delete all member.
. "~" means home directory.
. Wildcard "*.*" dose not match to filename embedding no ".".
- File operation.
. 0x1a(Ctrl+z) is not EndOfFile ID.(it can be read beyond EOFID).
. File and Dir has permission.
And,when a dir has t-bit on it is protected from rename/unlink
by other than root or owner.
Files in a dir with x-bit off is not shown.
Permission setting of mkdir is controled by umask setting.
So another chmod may required.
Permission of file on DOS partition mounted cannot be changed.
. File timestamp unit is second.(Dos is by 2 seconds).
. Cd command without operand means cd ~(change to home dir).
#ifdef XXE
(following about keyboard are irrelevant to gxe)
#else
- Keyboard.
. DOS feedback pair of scancode/charcode,UNIX translate keycode
and returns Escape seq string for extended key like as F1,Ins...
(Under X, another translation is done,but terminal emulator like as
xterm generate Esc string corresponding to the X key event.)
For ex, \x1b[2~ by Insert key.
Following descriotion is for Console mode only.See (4) for X mode.
Strings are set on Terminfo Database(/usr/lib/terminfo) determined
by TERM env-var,but it shows just how program like as shell pgm
understand those strings.Key and string mapping is set by
loadkeys cmd. Mapping file is in /usr/lib/kbd/keytables.
Usualy key generate the string defined on Terminfo.
Loadkeys cmd may be used to chnage this mapping.
. Mapping file identify left and right Alt key.
. "dumpkeys" cmd shows current mapping.
Output of dumpkeys is also used for input of loadkeys.
Sample output format of dumpkeys is as following.
(It is my understanding and it may have error)
1) keymaps 0-2,4-6,8-9,12
2) alt_is_meta
3) keycode 1 = Escape F83
4) control keycode 1 = F84
5) shift alt keycode 1 = Meta_Escape
6) keycode 60 = F2 F14 Console_14 F2
7) alt keycode 60 = Console_2
8) control alt keycode 60 = Console_2
:
:
:
9) string F1 = "\033[[A"
string F2 = "\033[[B"
string F3 = "\033[[C"
:
1) Mapping index.
It specify correspondance of each columns with shift key.
Each digit is constructed with 0:Normal,1:Shift,2:AltGR(Alt-R),
4:Ctrl,8:Alt(Alt-L),16:Shift-L,32:Shift-R,64:Ctrl-L,128:Ctrl-R.
Samle line specify column left of "=" is sequecialy
Normal(0),Shift(1),AltGR(2),Ctrl(4),Shift+Ctrl(5),AltGR+Ctrl(6),
Alt(8),Shift+Alt(9),Ctrl+Alt(12) each.
2) Alt+x(char key) generate Meta-x char.
Meta-x is determined by setmetamode setting.
That is Esc+x or 0x80|x. For example,Alt+a is 0x1b61 or 0xe1.
3) This is Function name assigned to a keycode.
Keycode value is shown by showkey cmd.
This example is that keycode 1 is for Escape and for F83
with Shift+. F83's meaning is determined by each application.
Mapping file can only define strings generated by the key
combination. 9) is sample string definition.
4),5),7),8)
Another format of Shift key combination.
6) F14 is assigned to Shift+F2. AltGR+F2 is for Console14,
but max number of console supported is limitted.
7) Alt(Alt-L)+F2 is assigned to console2,that is,Alt+F2 switch
screen to another console.
9) Strings are defined for each Fxx.
. Combination with Alt key is sometimes intercepted by operating
system itself or shell.
. xe,at the initialization,assigns strings to functions using API
like as loadkey command do.
Esc string assingnment is allowed only for Fnn key.
xe assign Fnn to key combination(Shift/Ctrl/Alt) which is used by xe.
String assigned to Fnn is set to xe format which is constructed by
scancode, charcode and modifier key ID, that is \x1B~+scancode+charcoe+shiftid.
See (9)-(a) for mapping of key combination and scan+char code.
ex) F48 is assigned to Alt+F12 with \x1b~8C003.
F48 is function name assigned by xe to Alt+keycode 88.
\x1b~ is id of string by xe. 8C00 is scancode+charcode for Alt+F12
defined on PCDOS.
Shif id is 0:No shift, 1:Shift+, 2:Ctrl+, 3:Alt+.
These are set also by Linux command "loadkeys".
Under kon(Kanji ON console),assign API is not avail.
So use "loadkeys xej106.map" for xe before enter to kon.
For compatibility with other application,strings defined on
terminfo is not changed and accepted.
For ex,"^[[[A" is usualy assinged to F1 by terminfo library
(/usr/lib/terminfo/l/linux), and xe accept it.
See (9)-(b) for defualt translation accepted by xe.
#endif
- Screen.
#ifdef XXE
. gxe allow background color change by color-dialog from Setup pulldown
menu. Foreground colors are changed by gxe option 0 on top menu.
#else
. curses routine support color control.
Linux may not support background highlight.
. There is no method to change cursor shape in curses library.
#endif
- Other miscellaneous.
. Use "-" as command flag paramete(Dos use "/"),
and allow parm with value,for ex,by both "-o fnm1" and "-ofnm1" fmt.