Scroll to navigation

DUMPKEYMAP(1) General Commands Manual DUMPKEYMAP(1)

̾??

dumpkeymap - .keymapping ?ե????????????Ѥ˥????פ???

????

dumpkeymap [options] [-] [file...]

????

dumpkeymap ?ϡ????ޥ??ɹԤǻ??ꤵ?줿 Apple/NeXT ?? .keymapping ?ե??????????Ƥ??ƥ?????ɽ???ǽ??Ϥ??롣 ?ե????뤬???ꤵ???Ƥ??餺?????ĥ????????ޥ????? Apple ?ޤ??? NeXT ??ư??Ƥ????????ˤϡ?WindowServer ?? AppKit ?????߻??Ѥ??Ƥ??? ???????????Ƥ????Ϥ????롣

???ץ?????

?ץ????????γ??פȥ??ץ??????ΤޤȤ???ɽ?????롣
.keymapping ?ե????뤬???????֤ǻ??äƤ??????֤ξܤ?????????ɽ?????롣 ??????Ʊ?????Ƥϡ????Υޥ˥奢???ڡ????Ρ֥??????????ƤˤĤ??Ƥ??????? ?????˺ܤäƤ??롣
.keymapping ?ե???????ʬ?䤷???Ȥ??? dumpkeymap ?????????????Ϥ???????ɽ?????롣 ??????Ʊ?????Ƥϡ????Υޥ˥奢???ڡ????Ρֽ??ϤˤĤ??Ƥ??????? ?????˺ܤäƤ??롣
???????????Ƥ˴ط??????Ƽ??ե????뤪???ӥǥ??쥯?ȥ??ΤޤȤ???ɽ?????롣 ??????Ʊ?????Ƥϡ????Υޥ˥奢???ڡ????Ρ֥ե??????פ????˺ܤäƤ??롣
dumpkeymap ?????Ϥ??륨?顼???å??????ΰ?????ɽ?????롣 ??????Ʊ?????Ƥϡ????Υޥ˥奢???ڡ????Ρֿ??ǡפ????˺ܤäƤ??롣
dumpkeymap ?ΥС????????ֹ????ݾڤ˴ؤ?????????ɽ?????롣
- --
???????ꥹ?ȤΥ??ץ??????????򤽤λ????ǻߤ??롣 ???????ꥹ?Ȥ? `-' ?? `--' ???????????ȡ??????ʹߤΰ??????? ???Ȥ? `-' ?ǻϤޤäƤ??Ƥ??ե?????̾?Ȥ??ư??????롣

???????????ƤˤĤ??Ƥ?????

?ʹߤ????Ǥϡ????????????ƥ꥽?????????Υե????ޥåȤ? ?ҤȤİʾ??????γ??????Ƥ????񤹤? .keymapping ?ե??????Υե????ޥåȤ??ܺ٤????????롣

???ȥǡ???

?????Ǥ??????Ǥϡ????η??????򤺤äȻ??Ѥ???:

typedef unsigned char byte;
typedef unsigned short word;
typedef unsigned long dword;

?????˲ä??ơ?????Ū?ʿ??ͤ?ɽ???????˷????? `number' ???Ȥ??? `number' ???μºݤ??礭???? 1 ?Х??Ȥޤ??? 2 ?Х??ȤǤ??ꡢ?????礭???? ???????????ƤؤΥǡ????γ?Ǽ?Τ??????ˤ??ä??Ѥ??롣 ?ۤȤ??ɤΥ??????????ƤǤ? byte ???????ο??ͤ??Ȥ?????word ???????? ?ͤ????ѤǤ??롣

???????????ƥե??????˥ޥ????Х??Ȥ??ͤ???Ǽ?????????硢 ?Х??Ƚ??ϥӥå??????ǥ??????Ǥ??롣

???????????ƥե??????ȥǥХ???????????

???????????ƥե??????ϥޥ??å??ʥ??С??ǻϤޤꡢ???θ??? ?ǥХ?????ͭ?Υ??????????Ƥ򼨤??ѿ???³????

struct KeyMappingFile {
    char magic_number[4];    // `KYM1'
    DeviceMapping maps[...]; // ???????Ƥ򼨤??ѿ?
};

struct DeviceMapping {
    dword interface;  // ???󥿥ե??????η?
    dword handler_id; // ???󥿥ե??????Υ??ַ?
    dword map_size;   // ?ֳ??????ơ?(????)?ΥХ??ȿ?
    KeyMapping map; 
};

`interface' ???ͤϥ????ܡ??ɥǥХ????μ?????ɽ??( Intel PC, ADB, NeXT, Sun Type5 ??)?????????????̡? NX_EVS_DEVICE_INTERFACE_ADB, NX_EVS_DEVICE_INTERFACE_ACE, ?ʤɤ??????????????ǻ??ꤵ???롣?????????????ϡ?MacOS/X ?? Darwin ?Ǥ? IOHIDTypes.h ???????????Ƥ??ꡢMacOS/X Server ?? OpenStep, NextStep ?Ǥ? ev_types.h ???????????Ƥ??롣

`handler_id' ???ͤϡ?`interface' ???ޤ??ϰϤ??椫???????? ?????ܡ??????֤򼨤??? ?㤨?С?Intel PC ?Ѥ? 101 ?????ܡ???( NX_EVS_DEVICE_INTERFACE_ACE??)?ϡ?`handler_id' ?? `0' ?Ǥ??롣 102 ?????ܡ??ɤξ????ˤϡ??????ͤ? `1' ?Ǥ??롣

`interface' ?? `handler_id' ???ȹ礻?ˤ??ꡢ???γ??????Ƥ?Ŭ?Ѥ????? ?????ܡ??ɤΥϡ??ɥ?????????̩?˻????Ǥ??롣 ?????ܡ??????֤??ӥ??奢??Ū??ɽ???????ץ????????Ǥϡ? .keymapping ?ե??????˽񤫤??Ƥ??? `interface' ?????? `handler_id' ?ȡ? ?ơ??? .keyboard ?ե??????˽񤫤??Ƥ??? `interface' ?????? `handler_id' ???ͤ? ???٤ƥ????ܡ??ɤ????ꤹ?뤳?ȡ?

???????????ƤˤĤ??Ƥ?????

???????????Ƥϡ????ƤΥ??????󥳡??ɤȤ????˳??????Ƥ????뵡ǽ?? ?????????????롣 KeyMapping ??¤?Τϡ? KeyMappingFile ?????? DeviceMapping ??¤?Τ˻????????롣 WindowServer ?? AppKit ?????????Υ??????????Ƥϡ? KeyMapping ??¤?Τˤ??äƤ⼨?????롣 ?ޤ???ľ?? NXGetKeyMapping() ???Ƥӡ????δؿ????֤? NXKeyMapping ??¤?Τ? `mapping' ?????ФȤ??Ƥ⻲?ȤǤ??롣

struct KeyMapping {
    word number_size;           // 0=1 ?Х???, ?󥼥?=2 ?Х???
    number num_modifier_groups; // ?????ҤΥ??롼??

ModifierGroup modifier_groups[...]; number num_scan_codes; // ???????󥳡??ɤΥ??롼?? ScanGroup scan_table[...]; number num_sequence_lists; // ???????󥹤Υꥹ?? Sequence sequence_lists[...]; number num_special_keys; // ?ü쥭?? SpecialKey special_key[...]; };

`number_size' ?ϡ??Ĥ??Τ??٤Ƥο???(???????????????? `number' ???????Ǽ???????)???礭?????Х???ñ?̤Ǽ????? ?????ͤ? 0 ?ξ????ϡ??Ĥ??ο??ͤϳ? 1 ?Х??Ȥ??Ĥ?ɽ?????롣 0 ?Ǥʤ??????ϡ??Ĥ??ο??ͤϤ??줾?? 1 ???(2 ?Х???)???Ĥ?ɽ?????롣

?????ҥ??롼??

?????ҥ??롼?פϡ????????󥳡??ɤϽ????Ҥη?( shift, control ?ʤ?)?˥ޥåפ????????Ƥ? ???????󥳡??ɤ????????롣

enum Modifier {

ALPHALOCK = 0,
SHIFT,
CONTROL,
ALTERNATE,
COMMAND,
KEYPAD,
HELP };

struct ModifierGroup {
    number modifier;        // ??????????
    number num_scan_codes; 
    number scan_codes[...]; // ???????󥳡??ɤ򼨤??ѿ?
};

???? scan_codes[] ?ˤϡ????ꤵ?줿?????Ҥ˥ޥåפ????????Ƥ? ???????󥳡??ɤΰ???????Ǽ?????롣 shift, command, alternate ?ʤɤν????Ҥϡ??դ??Ĥΰۤʤ륹?????󥳡??ɤ??̡??˥ޥåפ????? ???Ȥ?¿???? ?ʤ??ʤ顢???????ν????Ҥϥ????ܡ??ɤα?¦?Ⱥ?¦??ξ???ˤ??뤳?Ȥ? ¿???????Ǥ??롣

???????󥰥롼??

???ꤵ?줿?????ܡ??ɤ??????????ơ??Υ??????󥳡??ɤ??Ф??ƤҤȤĤ? ScanGroup ??¸?ߤ??롣 ???θĿ??? KeyMapping::num_scan_codes ?????????롣 ?ǽ??Υ??????󥰥롼?פϥϡ??ɥ??????Υ??????󥳡??? 0 ??ɽ???? ???Υ??????󥰥롼?פϥ??????󥳡??? 1 ??ɽ?????ʹߤ?Ʊ?ͤǤ??롣

enum ModifierMask {
    ALPHALOCK_MASK       = 1 << 0,
    SHIFT_MASK           = 1 << 1,
    CONTROL_MASK         = 1 << 2,
    ALTERNATE_MASK       = 1 << 3,
    CARRIAGE_RETURN_MASK = 1 << 4
};
#define NOT_BOUND 0xff

struct ScanGroup {
    number mask; 
    Character characters[...]; 
};

?ƥ??????󥳡??ɤˤĤ??ơ??ɤν????ҤȤ??ȹ礻??ʸ???????????????Τ??? `mask' ?ˤ??ä??????????롣 `mask' ?? NOT_BOUND (0xff)?ʤ??С????Υ??????󥳡??ɤ?ʸ?????ޤä????????????? characters[] ??????Ĺ???? 0 ?Ȥʤ롣 ?????ʳ??ξ????ˤϡ????줾???ν????ҤȤ??ȹ礻???Ф??ƤҤȤĤ? Character ?쥳???ɤ? characters[] ?????˳?Ǽ?????롣

characters[] ?˳?Ǽ?????Ƥ????쥳???ɤο??? (1 << bits_set_in_mask) ?η׻??ǵ????????롣 ?Ĥޤꡢmask ?? 0 ?ʤ??? 0 ?ĤΥӥåȤ????ꤵ?졢???????ä? characters[] ?ˤϥ쥳???ɤ??ҤȤĤ????ޤޤ??ʤ??? `mask' ?? (SHIFT_MASK | CONTROL_MASK), ?ʤ??Фդ??ĤΥӥåȤ????ꤵ?????Τǡ?characters[] ?ˤ? 4 ?Ĥ? ?쥳???ɤ??ޤޤ??롣

?ǽ??Υ쥳???ɤϾ??ˡ??ɤν????Ҥ?ͭ???Ǥʤ????ˤ??Υ????????????? ʸ????ɽ???? ?Ĥ??Υ쥳???ɤϡ??Ƽ??ν????Ҥ??Ȥ߹??碌???ݤ???????????ʸ???? ɽ???? shift ?ޥ????? control ?ޥ????????ꤵ???Ƥ????????Ѥ????ȡ??쥳???? 2 ?? shift ?????Ҥ?ͭ???ʾ?????ʸ????ɽ?????쥳???? 3 ?? control ?????Ҥ?ͭ???ʾ?????ʸ????ɽ?????쥳???? 4 ?? shift ?????Ҥ? control ?????Ҥ?ξ????ͭ???ʾ?????ʸ????ɽ????

?ü??ʾ????Ȥ??ơ? ALPHALOCK_MASK ?? SHIFT_MASK ??ɽ???? ???????? ALPHALOCK_MASK ?? `mask' ?ˤ??????????ʤ??? ???ξ????ˤϡ? shift ?????Ҥ? alpha-lock ?????ҤǤ?Ʊ??ʸ?????????????뤬??characters[] ?????ˤϰ????????ФƤ? ???Ф褤??

CARRIAGE_RETURN_MASK ?ϼºݤˤϽ?????????ɽ???Ƥ??ʤ??? ???Υޥ????ϡ? ?????å??å??꥿????(????) ???????ü??ʲ??۵?????Ϳ???????륹?????󥳡??ɤ򼨤??????˻Ȥ????롣 ???̡????Υޥ????? ScanGroup ?쥳????????ñ?ȤǸ????졢???θ??ˤ? Character ?쥳???ɤȤ??? Ctrl-M ?? Ctrl-C ?Τդ??Ĥ??????֤????롣 ???Υե饰?ϻ???Ū?????ξ??֤????äƤ????ꡢ?????٥??Υ????ܡ??ɥɥ饤?? ???ü??ʰ????򤷤??ꤹ?뤳?Ȥ????뤬???????ʳ??????Ӥ????Ǥ??롣

ʸ??

???줾???? Character ?쥳???ɤϡ????Υ??????????줿?Ȥ?????????????ʸ???򼨤??? ?ޤ???????ʸ?????ޤ?ʸ???????򼨤??? ?褯?Τ??줿ʸ???????Ȥ??Ƥ? `ASCII' ?? `Symbol' ?????롣 ʸ???????ϡ? FUNCTION_KEY ?? KEY_SEQUENCE ?Ȥ??ä??᥿?ͤ????뤳?Ȥ⤢?롣 FUNCTION_KEY ?ξ??硢???? `char_code' ?? FunctionKey ?Ȥ????ֹ椬?դ??Ƥ??롢???ʤ??ߤΥե??󥯥????󥭡???ɽ???? ʸ?????礬 KEY_SEQUENCE ?ξ??硢`char_code' ?? KeyMapping::sequence_lists[] ?Υ????ǥå??? ??ɽ?????????ǥå????? 0 ?????Ϥޤ롣

enum CharacterSet {
    ASCII        = 0x00,
    SYMBOL       = 0x01,
    ... 
    FUNCTION_KEY = 0xfe,
    KEY_SEQUENCE = 0xff
};

struct Character {
    number set;       // ??????????ʸ????°????ʸ??????
    number char_code; // ?ºݤ???????????ʸ??
};

enum FunctionKey {

F1 = 0x20, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
INSERT, DELETE, HOME, END, PAGE_UP, PAGE_DOWN, PRINT_SCREEN,
SCROLL_LOCK, PAUSE, SYS_REQUEST, BREAK, RESET, STOP, MENU,
USER, SYSTEM, PRINT, CLEAR_LINE, CLEAR_DISPLAY, INSERT_LINE,
DELETE_LINE, INSERT_CHAR, DELETE_CHAR, PREV, NEXT, SELECT };

??????????

Character::set ???᥿?? KEY_SEQUENCE ???ޤ????硢???Υ??????󥳡??ɤˤϤҤȤĤ?ʸ???Ǥʤ??????????󤬳??????Ƥ????롣 ???????ϡ????????Ƥ??줿??????Υ???줿?Ȥ??˼?ưŪ???????????뽤???Ҥ? ʸ?????¤٤????ΤǤ??롣

#define MODIFIER_KEY 0xff

struct Sequence {
    number num_chars; 
    Character characters[...]; 
};

?????????뤽?줾????ʸ???ˤĤ??Ƥ??????????????̤??Ǥ??뤬?? KEY_SEQUENCE ?????????? MODIFIER_KEY ???Ȥ????뤳?Ȥ??????????㳰?Ǥ??롣 Character::set ???ͤ? MODIFIER_KEY ?λ??ϡ?Character::char_code ?ϼºݤ?ʸ???ǤϤʤ???????????ɽ???? `char_code' ??ɽ???????Ҥ? 0 ?Ǥʤ??????ϡ??б????뽤???????? ???????Ƥ??뤳?Ȥ򼨤??????ξ??硢?ͤ? Modifier ?˵󤲤????Ƥ??????? (SHIFT, CONTROL, ALTERNATE, ??)?Τɤ줫?ˤʤ롣 ?????ͤ? 0 ?ξ????ϡ???????????Υ?????Ƥ??뤳?Ȥ?ɽ????

?ü쥭??

?ü쥭???ϡ?WindowServer ?Ǥʤ? Mach ?????ͥ뤬ľ?ܥ??????󤹤륭???? ???롣 ?ü쥭?????Ф??륤?٥??Ȥ????̤??????????ʤ???

enum SpecialKeyType {

VOLUME_UP = 0,
VOLUME_DOWN,
BRIGHTNESS_UP,
BRIGHTNESS_DOWN,
ALPHA_LOCK,
HELP,
POWER,
SECONDARY_ARROW_UP,
SECONDARY_ARROW_DOWN };

struct SpecialKey {
    number type;      // SpecialKeyType ????
    number scan_code; // ?ºݤΥ??????󥳡???
};

????

???ξϤǤϡ? dumpkeymap ?????Ϥ????Ƽ??????ˤĤ??????????롣

???????????????ġ??ξ????˴ؤ????ܺ٤??????ˤĤ??Ƥϡ? ???ҤΡ֥??????????ƤˤĤ??Ƥ??????פξϤǽҤ٤????Ƥ??롢 ???????????Ƥ??????쥤?????Ȥ˾ܤ????????򻲾Ȥ??뤳?ȡ?

ɽ???˴ؤ?????«????

?????ˤ??äơ?????ɽ???? 10 ??ɽ???ˤʤ뤳?Ȥ⤢?뤷??16 ??ɽ???? ?ʤ뤳?Ȥ⤢?롣 16 ?ʤο??ͤ????ˤ? `0x' ???񤫤???(??: `0x7b')?? ?????????????Ǥʤ???????Ū?˽񤫤??Ƥ????????Ͻ?????

???????????ƤΥ?????

???륭?????????ƤˤĤ??ƺǽ???ɽ?????????????ϡ??ǡ????μ??????߸??Ȥʤä? ???????ˤĤ??ƤǤ??롣 .keymapping ?ե??????ξ????ˤϡ??????ȥ??? `KEYMAP FILE' ?ȤʤꡢƱ?????оݥե??????Υѥ???????̾???????Ϥ????롣 WindowServer ?? AppKit ?????߻??????Υ??????????Ƥξ????ˤϡ? ?????ȥ??? `ACTIVE KEYMAP' ?Ȥʤ롣

?ǥХ???????

?ơ??? .keymapping ?ˤϤҤȤİʾ??????Υ??????????Ƥ??񤫤??Ƥ??롣 ?㤨?С????????????Ƥ? Dvorak ?????ˤ????ե??????ˤϡ?Intel PC, ADB, NeXT, Sun Type5 ?????ܡ??ɤ????γ??????Ƥ??񤫤??Ƥ??뤳?Ȥ????롣

???γ??????ƤΤ??줾?????Ф??ơ????ξ??󤬽??Ϥ?????:

• ?????ȥ? `KEYMAP' ?????ӡ? .keymapping ?ե????????ˤ????????????Ƥ????а??֡?

• `interface' ???̻ҡ?

• `handler_id' ?????̻ҡ?

• ???γ??????ƥ꥽?????ΥХ???ñ?̤Ǥ??礭????

`interface' ?? `handler_id' ???Фˤʤꡢ?????Υ????ܡ??ɥǥХ????? ???????롣 .keyboard ?ե?????(?????ܡ??ɤθ??????Ǥ???????????????)?ˤ? `interface' ???̻? ?? `handler_id' ?????̻Ҥ??񤫤??Ƥ??롣 ?????Υ??????????Ƥ??б????? .keyboard ?ե??????ϡ????줾???Υ꥽???????? `interface' ?? `handler_id' ???ͤ? ???פ??????Τ?õ?????ȤǸ??Ĥ??????롣

??????

???줾???γ??????Ƥ? 0 ?İʾ??ν????ҥ쥳???ɤ????Ĥ??Ȥ??Ǥ??롣 ???ν????ҥ쥳???ɤϡ??ϡ??ɥ??????Υ??????󥳡??ɤȽ????Ҥ?????( shift, control, alternate ??)???б??դ??롣 ???줾???ν????ҥ쥳???ɤˤĤ??ơ??????Ҥ?̾???ȤȤ??? ?????Ҥ??ͤ????????륹?????󥳡??ɤΰ???(16 ?ʷ???)??ɽ???????롣 ?????ʲ??˵󤲤?:

MODIFIERS [4]
alternate: 0x1d 0x60
control: 0x3a
keypad: 0x52 0x53 ... 0x63 0x62
shift: 0x2a 0x36

ʸ??

???줾???γ??????Ƥ? 0 ?İʾ???ʸ???쥳???ɤ????Ĥ??Ȥ??Ǥ??롣 ????ʸ???쥳???ɤϥϡ??ɥ??????Υ??????󥳡??ɤȡ??Ƽ、???????Ȥ? ?ȹ礻?????????????ʤ??????ˤ??Υ??????󥳡??ɤ????ºݤ??????????? ?ºݤ?ʸ?????б??դ??롣 ?????ȥ? `CHARACTERS' ?θ??ˤϡ????θ???³??ʸ???쥳???ɤο???ɽ???????롣 ?ʲ????????˾?ά?????????????󤲤?:

CHARACTERS [9]
scan 0x00: -AC-L  "a" "A" "^A" "^A" ca c7 "^A" "^A"
scan 0x07: -AC-L  "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X"
scan 0x0a: ---S-  "<" ">"
scan 0x13: -ACS-  "2" "@" "^@" "^@" b2 b3 "^@" "^@"
scan 0x24: R----  "^M" "^C"
scan 0x3e: -----  [F4]
scan 0x4a: -----  [page up]
scan 0x60: -----  {seq#3}
scan 0x68: not-bound

???줾???Υ쥳???ɤˤĤ??ơ??ޤ??ϡ??ɥ??????Υ??????󥳡??ɤ??ͤ? 16 ?ʷ?????ɽ?????졢???θ??˽????ե饰???ȹ礻?ΰ?????ɽ?????졢?Ǹ??? ???Υ??????󥳡??ɤȽ????ҤγƼ??Ȥ߹??碌?????????????ºݤ?ʸ???? ɽ???????롣

?????ե饰?Υե??????ɤϡ??Ƽ??ν????Ҥ???ʸ????ɽ???????Τ??Ȥ߹??碌 ?ƺ??????Ƥ??롣 ???줾????ʸ???ϰʲ??Τ褦?ʰ?̣??????:

L - alpha-lock
S - shift
C - control
A - alternate
R - carriage-return

???̤ʾ????Ȥ??ơ? alpha-lock ?ե饰??Ω?äƤ????????? shift ??Ω?äƤ????ȸ??ʤ????롣???????äơ??ҤȤĤΥ쥳???ɤ?ξ???Υե饰?? Ʊ????Ω?Ĥ??ȤϤʤ???

?????ե饰???Ȥ߹??碌?ˤ??ꡢ???θ???³???ե??????ɤΰ?̣?ȿ??????ޤ롣 ?????ե饰?Τ??????Υե??????ɤϡ????????????ɤ??ⲡ?????Ƥ??ʤ??????? ??????????ʸ????ɬ??ɽ???? ?Ĥ??Υե??????ɤϡ??Ƽ、?????????Ȥ߹??碌???Ȥ?????????????ʸ???? ɽ???? ?ե??????ɤν????ϡ??ʲ??˼????ѥ??????˽???:

• ?????????αƶ????ʤ??Ȥ??ˤ??Υ??????󥳡??ɤ?????????ʸ???ϡ? ?ǽ??˼??????롣

• `L' ?ե饰?ޤ??? `S' ?ե饰??ͭ???ʤ??С????Υ??????󥳡??ɤ????????? shift ???????줿ʸ???????˼??????롣

• `C' ?ե饰??ͭ???ʤ??С????Υ??????󥳡??ɤ????????? control ???????줿ʸ???????˼??????롣 ?????? `L' ?ե饰?ޤ??? `S' ?ե饰??Ʊ????ͭ???ʤ??С?shift ?? control ??ξ???ǽ??????줿ʸ???????μ??˼??????롣

• `A' ?ե饰??ͭ???ʤ??С????Υ??????󥳡??ɤ????????? alternate ???????줿ʸ???????˼??????롣 ?????? `L' ?ե饰?ޤ??? `S' ?ե饰??Ʊ????ͭ???ʤ??С?shift ?? alternate ??ξ???ǽ??????줿ʸ???????μ??˼??????롣 ?????? `C' ?ե饰??ͭ???ʤ??С?shift ?? control ??ξ???ǽ??????줿ʸ?? ?????μ??˼??????롣 ?Ǹ??ˡ?`C' ?ե饰?? `L' ?ե饰??Ʊ????ͭ???????ޤ??? `C' ?ե饰?? `S' ?ե饰??Ʊ????ͭ???ʾ????ˤϡ?shift, alternate, control ?ǽ??????줿 ʸ???????????롣

`R' ?ե饰?ϼºݤˤϽ?????????ɽ???Ƥ??ʤ??? ???Υե饰?ϡ????̤ʲ??۵??? ?????å??å??꥿????(????) ??Ϳ???????륹?????󥳡??ɤ????̤??뤿???˻Ȥ????롣 ???̤ϡ????Υޥ?????ñ?ȤǸ????졢???θ??ˤ? control-M ?? control-C ?? ?դ??ĤΥե??????ɤ???³???ʤ??? ???Υե饰?ϻ???Ū?????ξ??֤????äƤ????ꡢ?????٥??Υ????ܡ??ɥɥ饤?? ???ü??ʰ????򤷤??ꤹ?뤳?Ȥ????뤬???????ʳ??????Ӥ????Ǥ??롣

???Ҥ????ˤĤ??ơ??ƥե??????ɤ򼡤Τ褦?˼??̤Ǥ???:

scan 0x00: -AC-L  "a" "A" "^A" "^A" ca c7 "^A" "^A"

• ??ʸ???? `a' ?ϡ????????????ɤ??⥢???ƥ??֤Ǥʤ??Ȥ????????????롣

• ??ʸ???? `A' ?? shift ?ޤ??? alpha-lock ??ͭ???ʤȤ????????????롣

• Control-A ?? control ??ͭ???ʤȤ????????????롣

• Control-A ?? control ???? shift ??ͭ???ʤȤ????????????롣

• 16 ?ʥ????? 0xca ??ɽ??????ʸ???ϡ? alternate ??ͭ???ʤȤ????????????롣

• 0xc7 ??ɽ??ʸ???ϡ? alternate ?? shift (?ޤ??? alpha-lock) ??ͭ???ʤȤ????????????롣

• Control-A ?ϡ? alternate ?? control ??ͭ???ʤȤ????????????롣

• Control-A ?ϡ? alternate, control ?? shift (?ޤ??? alpha-lock) ??ͭ???ʤȤ????????????롣

????????????????ʸ????ɽ???????˻Ȥ???ˡ?Ϥ??????????롣

• ??????ǽ?? ASCII ʸ???????Ű??????dz???????(??: "x" ?? "X")??

• ????ʸ???????Ű??????dz????졢???? "^" ???դ???????(??: "^X")??

• 127 (0x7f) ???????礭??ʸ???ϡ?Ƭ?? `0x' ???դ??ʤ? 16 ?ʿ??ͤȤ??? ɽ???????롣

• ASCII ?Ǥʤ?ʸ??????(`Symbol' ?ʤ?)?˴ޤޤ???ʸ???ϡ??դ??Ĥ? 16 ?ʿ??ͤ? ?????å??????ڤ????¤٤?ɽ????????(??: `01/4a')?? ???ο??ͤϤ???ʸ???????μ??̥?????(??: `01' ?? `Symbol' ʸ????????ɽ ??)?Ǥ??ꡢ?????ο??ͤ???????????ʸ?????ͤǤ??롣

• ??????ǽ?Ǥʤ??ü쵡ǽʸ???ϡ???ǽ?ΰ???̾?Τ??֥饱?åȤdz??ä?ɽ???? ????(??: `[page up]' ?? `[F4]')??

• ???????Ƥ??ҤȤĤ?ʸ???Ǥʤ??????????????󥹤?ɽ???Ƥ????????ϡ? ???Υ??????󥹤μ????ֹ????֥졼???dz??ä?ɽ????????(??: `{seq#3}')??

???Ҥ????Τ????Ĥ??ˤĤ??ơ??ʲ??Τ褦?˲??????Ԥ???:

scan 0x07: -AC-L  "x" "X" "^X" "^X" 01/b4 01/ce "^X" "^X"
scan 0x3e: -----  [F4]
scan 0x4a: -----  [page up]
scan 0x60: -----  {seq#3}

• "x" ?? "X" ?ϰ?????ǽ?? ASCII ʸ???Ǥ??롣

• "^X" ??????ʸ???Ǥ??롣

• `01/b4' ?? `01/ce' ?ϡ?`Symbol' ʸ???????˴ޤޤ???ʸ???????? 0xb4 ?? 0xce ??ʸ????ɽ????

• ???????󥳡??? 0x3e ?ϥե??󥯥????󥭡? `F4' ?????????롣 ???????󥳡??? 0x4a ?ϥե??󥯥????󥭡? `page up' ?????????롣

• ???????󥳡??? 0x60 ?ϥ????????????? #3 ?˳??????Ƥ????Ƥ??롣

?Ǹ??ˡ????륹?????󥳡??ɤ??ɤ?ʸ???ˤ????????Ƥ????Ƥ??ʤ??????ˤϡ? ???Υ????ɤˤ? `not-bound (???????Ƥʤ?)' ?Ȥ??????᤬?դ??????롣 ?嵭?????ˤ????Ƥϥ??????󥳡??? 0x68 ???????ʤäƤ??롣

??????????

???????󥳡???(?????????Ƥ??????Τ⤽???Ǥʤ????Τ?)?ˤϡ? ?ҤȤĤ?ʸ?????????佤???????Ȥ??Ƥ?ư???????Ǥʤ??????????????󥹤? ???????Ƥ뤳?Ȥ??Ǥ??롣 ???????????󥹤˳??????Ƥ??????ϡ??ҤȤĤΥ??????ȥ??????Ǥʤ??? ʸ?????¤ӤθƤӽФ??Ƚ?????????ư???ưŪ???????????롣

???줾???γ??????Ƥˤ????Ƥϡ?0 ?İʾ??Υ??????????󥹥쥳???ɤ??????? ???롣 ?????ȥ? `SEQUENCES' ?ˤϡ?????³?????????󥹥쥳???ɤθĿ?????????ɽ???????롣 ??:

SEQUENCES [3]
sequence 0: "f" "o" "o"
sequence 1: {alternate} "b" "a" "r" {unmodify}
sequence 2: [home] "b" "a" "z"

??????????ʸ?????¤Ӥ?ɽ???????˻Ȥ????뵭ˡ?ϡ????ҤΡ? ʸ?? ?פξϤ???????????ˡ??Ʊ???Ǥ??롣??????????????????ʸ????ʸ???δ֤? ??????????ư???򶴤??Ǥ??褤?????ۤʤ롣 ???Τ褦?ʽ?????????ư???ϡ???????????̾?????֥졼???dz??ä?ɽ???? ?ü???̾????{unmodify}?פϡ???????????Υ???줿???Ȥ?ɽ????

?嵭?????Υ??????󥹤ϡ????Τ褦?˲????Ǥ???:

• ?????????? #0 ?? `foo' ?????????롣

• ?????????? #1 ?ϡ??ޤ? alternate ?????Ҥ????????????? `bar' ?????????????줫?? alternate ??Υ????

• ?????????? #2 ?? home ?ޤ????????ƤӽФ??????? `baz' ?????????롣 ?ƥ????ȥ??ǥ????Ǥ????񡢤??Υ??????󥹤ϥ????????Τ????Ԥ???Ƭ?? `baz' ???񤭹??ࡣ

?ü쥭??

?????ܡ??ɤˤ??äƤϡ?ʸ?????????????ꡢ?????????Ȥ???ư????ΤǤ? ?ʤ????????ü?????Ū?ε?ǽ???̤??????????դ??Ƥ??롣 ?㤨?? Apple ?Υ????ܡ??ɤˤϡ? power ???????դ??Ƥ??뤳?Ȥ?¿??????????Ū?ˤ? NeXT ?Υ????ܡ??ɤˤϲ??̤????뤵?䲻???????Υ??????դ??Ƥ?????

?ơ??γ??????Ƥ? 0 ?İʾ????ü쥭???Υ쥳???ɤ????Ĥ??ȤǤ??롣 ?????ü쥭???Υ쥳???ɤϡ????????ä??ü?????Ū?ε?ǽ?ȥϡ??ɥ????? ?Υ??????󥳡??ɤ????ӤĤ??롣 ?????ȥ? `SPECIALS' ??ɽ???θ????ˤϡ?????³???쥳???ɤο???ɽ???????롣 ???줾???Υ쥳???ɤˤĤ??ơ??ü쵡ǽ??̾???ȡ????ε?ǽ?˳??????Ƥ????? ???륹?????󥳡???(16??ɽ??)?ΰ?????????ɽ???????롣 ?????ʲ??˼???:

SPECIALS [6]
alpha-lock: 0x39
brightness-down: 0x79
brightness-up: 0x74
power: 0x7f
sound-down: 0x77
sound-up: 0x73

?ե?????

*.keymapping
???????????ƥե????롣 ???Υե??????ϡ??ϡ??ɥ???????ͭ?????ƤΥ??????󥳡??ɤȤ????? ???????Ƥ??줿??ǽ???б?????̩?????????롣
*.keyboard
???뷿?Υ????ܡ??ɤΥ?????ʪ??Ū?ʥ쥤?????Ȥ򵭽Ҥ????ե????롣 ???Υե??????˽񤫤줿???줾???? `key' ?ȡ??????ϡ????Υ????? ?????ܡ??ɾ??ˤ????????֤ȷ????????????롣?ޤ??????Υ????? ???????????ΤȤ??Ƴ??????Ƥ??줿???????󥳡??ɤ????????롣 ?????? .keymapping ?ե??????ϡ??????Υ??????󥳡??ɤ?????????ʸ???????????롣 ????ʸ???ϳƼ、??????( shift, control ??)?ξ??֤ˤ??ä??Ѳ????롣 .keymapping ?ե????뤫???????Ф??? `interface' ???ͤ? `handler_id' ???ͤ? .keyboard ?ե????뤫???????Ф??? `interface' ???ͤ? `handler_id' ???ͤȰ??פ??뤫?ɤ???Ĵ?٤??졢 ???η??̤ˤ????????? .keyboard ?ե??????ȥ??????????Ƥ??б??դ??????롣 ?Ƽ? GUI ?ץ??????ब .keyboard ?ե????????Ȥ????桼???˥????ܡ??ɤ?????Ū?˸????Ƥ??롣 .keyboard ?ե???????ñ?ʤ??ץ졼???ƥ????ȤʤΤǡ??ü??ʥץ??????ब ?ʤ??Ƥ???ñ???ɤ??????????Ǥ??롣???????äơ? dumpkeymap ?Ϥ??????Υե??????򤽤Τޤޤˤ??Ƥ??롣

/System/Library/Keyboards
/Network/Library/Keyboards
/Local/Library/Keyboards
/Library/Keyboards

MacOS/X, Darwin, MacOS/X Server ?ˤ????? .keymapping ?ե??????? .keyboard ?ե????????֤????ꡣ

/NextLibrary/Keyboards
/LocalLibrary/Keyboards

OpenStep ?? NextStep ?ˤ????? .keymapping ?ե??????? .keyboard ?ե????????֤????ꡣ
$(HOME)/Library/Keyboards
?Ŀ??Ѥ? .keymapping ?ե??????? .keyboard ?ե????????֤????ꡣ

????

?ʲ??˼??????ǥ??å???????ɸ?२?顼???Ϥ˽??Ϥ????롣

?????Ǥ??ʤ????ץ????󤬥??ޥ??ɹԤǻ??ꤵ?줿?? ??????ǽ?ʥ??ץ??????ΰ????򸫤??ˤϡ? --help ???ץ??????????ꤷ?? dumpkeymap ???¹Ԥ??뤳?ȡ? ???????????ƥե??????ޤ??ϥǡ??????ȥ꡼?ब?????Ƥ??롣 ?ե????뤬?????????ڤ??Ƥ??뤫???????ե???????(?㤨?и???³?????? ?쥳???ɤο??򼨤??ե???????)???ͤ??????Ƥ??롣

?ʲ??˼??????ǥ??å??????ϡ? ???ޥ??ɹԤǻ??ꤵ?줿 .keymapping ?ե???????ɽ?????褦?Ȥ??Ƥ????Ȥ??ˤ?????̣???????ʤ???

???ꤵ?줿?ե????뤬 .keymapping ?ե??????Ǥʤ??? ?ե??????????Ȥ?ʸ???? `KYM1' ?ǻϤޤäƤ??ʤ???
fopen() ?θƤӽФ??˼??Ԥ????? ???ξ????θ????Ϥ????餯?????ꤵ?줿?ѥ????ְ??äƤ??뤫?? ?ե????????ɤย?¤? dumpkeymap ?????äƤ??ʤ????Ǥ??롣
fstat() ?θƤӽФ??˼??Ԥ????? ???????äơ??ե????????????ɤ??뤿???Υ??????????????Ƥ뤳?Ȥ??Ǥ??ʤ???
fread() ?θƤӽФ??˼??Ԥ?????

?ʲ??ο??ǥ??å??????ϡ? .keymapping ?ե????뤬???ޥ??ɹԤǤϻ??ꤵ?줺??????ͭ???ʥ??????????? ?????Ϥ??褦?Ȥ??Ƥ????Ȥ??ˤ?????̣???????ʤ???

NXOpenEventStatus() ?θƤӽФ??˼??Ԥ?????
NXKeyMappingLength() ?θƤӽФ??ˤ??ä??֤??줿?ͤ???????????
NXGetKeyMapping() ?θƤӽФ??˼??Ԥ?????

?ʲ??ο??ǥ??å??????ϡ?Apple ?ʳ??Υץ??åȥե?????/NeXT ?ץ??åȥե????????? dumpkeymap ???¹Ԥ????Ȥ??ˤ?????̣???????ʤ???

.keymapping ?????ޥ??ɹԤǻ??ꤵ???Ƥ??ʤ??? Apple ?ʳ??Υץ??åȥե?????/NeXT ?ץ??åȥե??????ˤϡָ???ͭ???? .keymapping ?ե??????פȤ?????ǰ???ʤ??Τǡ????ޥ??ɹԤǤ? ???ʤ??Ȥ??ҤȤĤΥե??????????ꤷ?ʤ????Фʤ??ʤ???

????

Eric Sunshine <sunshine@sunshineco.com> ?? dumpkeymap ?Ȥ???ʸ??( dumpkeymap user's manual. )???񤤤??? dumpkeymap ?Ȥ???ʸ???? Eric Sunshine <sunshine@sunshineco.com> ?? ????ʪ?Ǥ???(©1999,2000 by Eric Sunshine)?? ???Ƥθ?????α?ݤ????Ƥ??롣

dumpkeymap ?μ????ϡ?1997 ǯ 9 ?? 3 ???? Eric Sunshine <sunshine@sunshineco.com> ?? Paul S. McCarthy <zarnuk@zarnuk.com> ?? NeXT ?? .keymapping ?ե??????????Ϥ????????????????˹Ԥ??줿??

Version 4 -- 1 December 2000

v4 -- 1 December 2000 Version 4