📄 keymap.5
字号:
.TH KEYMAP 5.SH NAMEkeymap \- keyboard maps.SH SYNOPSIS.B /etc/keymap.SH DESCRIPTION.B /etc/keymap is the compressed mapping from keyboard scan codes to ASCII.It is made from a keymap source file consisting of MAP_COLS columns(MINIX assigns the value 6 to MAX_COLS, corresponding to key pressed,key+SHIFT, key+LEFT_ALT, key+RIGHT_ALT, key+ALT+SHIFT and key+CTRL) and NR_SCAN_CODES rows (MINIX assigns the value 0x80 to NR_SCAN_CODES, corresponding to the number of scan codes to be provided by the keyboard),and each element is 2 bytes in length (see u16_t in type definitions). The low order byte corresponds to the character represented by the scan code, and the high order byte corresponds to the special meaning (when CAPS LOCK has effect, if it is a function key, etc.), which is converted tobinary keymap format using the.BR genmap utility. .PP.SS "Types (general): <sys/types.h>"<sys/types.h> defines the.B u8_tand.B u16_ttypes, corresponding to 8 and 16 bit values..SS "Macros: <minix/keymap.h>".TP.BI "C(" c ") - Control"Maps to control code.TP.BI "A(" c ") - Alt"Sets the eight bit.TP.BI "CA(" c ") - Control-Alt"Short for.BI "A(C(" c "))".TP.BI "L(" c ") - Caps Lock"Adds Caps Lock effect.PPThese macros are used in a keymap source file to help define keys. Soinstead of writing.B 032to put a CTRL-Z in the map you write.BR "C('Z')" .The.BI "L(" c ")"macro is used in column 0 to tell that the Caps Lock key is active for thiskey. (Caps Lock should only have effect on letters.).SS "Definitions: <minix/keymap.h>"<minix/keymap.h> contains a large number of definitions for special keys,like function keys, and keys on the numeric keypad. They are:.PPEscape key and modifiers:.BR EXT ,.BR CTRL ,.BR SHIFT ,.BR ALT ..PPNumeric keypad keys:.BR HOME ,.BR END ,.BR UP ,.BR DOWN ,.BR LEFT ,.BR RIGHT ,.BR PGUP ,.BR PGDN ,.BR MID " (numeric '5'),".BR PLUS ,.BR INSRT ..PPALT + numpad key:.BR AHOME ,.BR AEND ", ...,".BR AINSRT ..PPCTRL + numpad:.BR CHOME ,.BR CEND ", ...,".BR CINSRT ..PPLock keys:.BR CALOCK " (Caps Lock),".BR NLOCK " (Num Lock),".BR SLOCK " (Scroll Lock).".PPFunction keys:.BR F1 ", ...,".BR F12 ..PPALT - function key:.BR AF1 ", ...,".BR AF12 ..PPCTRL - function key:.BR CF1 ", ...,".BR CF12 ..PPSHIFT - function key:.BR SF1 ", ...,".BR SF12 ..PPALT - SHIFT - function key:.BR ASF1 ", ...,".BR ASF12 ..PPThere is one key definition that isn't a key at all:.BR EXTKEY .This keycode is sent by the keyboard as an indicator that the next keycodeis special. For instance both ALT keys have the same keycode, but the rightALT key is sent by the keyboard preceded by the EXTKEY keycode. The same istrue for the '/' key on the numeric pad versus the other '/' key on the USkeyboard. (On other keyboards this key may have a different symbol.) Thekeyboard driver knows that a different key is presses if it is preceded byEXTKEY..SS "Creating/changing keyboard mapping"You can create your own keyboard mapping by copying one of the existingkeymap source files (Standard Minix:.BR kernel/keymaps/*.src ,Minix-vmd:.BR kernel/ibm/keymaps/*.src )and modifying the desired keys. Once this has been done, you need torecompile the genmap.c file, either by adding a new entry to the Makefile,or by running the following commands:.PP.RS.ft Bcc -DKEYSRC=\e"\fIkeymap\fP.src\e" genmap.c.ft P.RE.PPAfter this, the .BR keymap file can be generated by running:.PP.RS.BI "a.out > " keymap .map.RE.PPThe keymap can be loaded in the keyboard driver by:.PP.RS.BI "loadkeys " keymap .map.RE.PPIt is wise to first run.B loadkeyson one of the maps in.B /usr/lib/keymapsso that you can easily revert back to a known keymap with a few taps on theup-arrow key and pressing return. You will otherwise have to fix the keymapwith a faulty keymap loaded into the keyboard driver, which is no fun..PPWhen the keymap is to your satisfaction you can copy it to.B /etc/keymapto have it loaded automatically at reboot..SH FILES.TP 15.B /etc/keymapDefault keymap file.SH "SEE ALSO".B loadkeys (1)..SH AUTHORVictor A. Rodriguez - El bit Fantasma (Bit-Man@Tasa.Com.AR)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -