XChangeKeyboardMapping(3X11) | XLIB FUNCTIONS | XChangeKeyboardMapping(3X11) |
̾??¶
XChangeKeyboardMapping, XGetKeyboardMapping, XDisplayKeycodes, XSetModifierMapping, XGetModifierMapping, XNewModifiermap, XInsertModifiermapEntry, XDeleteModifiermapEntry, XFreeModifierMap XModifierKeymap - ?????ܡ??ɤΥ????ǥ???????????ܡ??ɤΥ????ǥ???ɽ????¤??
????¶
XChangeKeyboardMapping(display, first_keycode,
keysyms_per_keycode, keysyms, num_codes)
Display *display;
int first_keycode;
int keysyms_per_keycode;
KeySym *keysyms;
int num_codes;
KeySym *XGetKeyboardMapping(display, first_keycode,
keycode_count,
keysyms_per_keycode_return)
Display *display;
KeyCode first_keycode;
int keycode_count;
int *keysyms_per_keycode_return;
XDisplayKeycodes(display, min_keycodes_return,
max_keycodes_return)
Display *display;
int *min_keycodes_return, *max_keycodes_return;
int XSetModifierMapping(display, modmap)
Display *display;
XModifierKeymap *modmap;
XModifierKeymap *XGetModifierMapping(display)
Display *display;
XModifierKeymap *XNewModifiermap(max_keys_per_mod)
int max_keys_per_mod;
XModifierKeymap *XInsertModifiermapEntry(modmap,
keycode_entry, modifier)
XModifierKeymap *modmap;
KeyCode keycode_entry;
int modifier;
XModifierKeymap *XDeleteModifiermapEntry(modmap,
keycode_entry, modifier)
XModifierKeymap *modmap;
KeyCode keycode_entry;
int modifier;
XFreeModifiermap(modmap)
XModifierKeymap *modmap;
??????¶
- display
- X ?????Фؤ???³?????ꤹ?롣
- first_keycode
- ?ѹ????????ǽ??? KeyCode, ?ޤ????֤??????ǽ??? KeyCode ?????ꤹ?롣
- keycode_count
- ?֤????? KeyCode ?ο??????ꤹ?롣
- keycode_entry
- KeyCode ?????ꤹ?롣
- keysyms
- KeySym ???????????ꤹ?롣
- keysyms_per_keycode
- KeyCode ???????? KeySym ?ο??????ꤹ?롣
- keysyms_per_keycode_return
- KeyCode ???????? KeySym ?ο????֤????롣
- max_keys_per_mod
- ?ޥå?????ͽ?????ǥ??ե??????˳??????Ƥ??줿 KeyCode ?Υ????ȥ??????? ?ꤹ?롣
- max_keycodes_return
- KeyCode ?κ????????֤????롣
- min_keycodes_return
- KeyCode ?κǾ??????֤????롣
- modifier
- ???ǥ??ե??????????ꤹ?롣
- modmap
- XModifierKeymap ??¤?Τ????ꤹ?롣
- num_codes
- ?ѹ????? KeyCode ?ο??????ꤹ?롣
????¶
?ؿ? XChangeKeyboardMapping ?ϡ? first_keycode ?????Ϥޤ????ꤷ?????? KeyCode ???Ф??륷???ܥ????? ?????롣 ?ϰϳ??? KeyCode ???Ф??륷???ܥ????ѹ??????ʤ??? keysym ???????ǿ??ϼ??ο??Ǥʤ????Фʤ??ʤ???
num_codes * keysyms_per_keycode
???ꤷ?? first_keycode ?? XDisplayKeycodes ???֤? min_keycode ?ʾ??Ǥʤ????Фʤ??ʤ????????Ǥʤ??????ϥ??顼 BadValue ?Ȥʤ롣 ?????ˡ??ʲ??μ??? XDisplayKeycodes ???֤? max_keycode ?ʲ??Ǥʤ????Фʤ??ʤ????????Ǥʤ??????ϥ??顼 BadValue ?Ȥʤ롣
first_keycode + num_codes - 1
0 ???????????ֹ? N ?Ǥ??롢KeyCode K ???Ф???KeySym ?ϡ?keysym ???? ?ʲ??μ??Υ????ǥå????????ġ????Υ????ǥå????? 0 ?????????롣
(K - first_keycode) * keysyms_per_keycode + N
???Ƥ?ɬ?פʥ????ܥ????ݻ????뽽ʬ???礭???Ǥ????С????饤?????Ȥϻ??? ???? keysyms_per_keycode ?ο???Ǥ?դ??????Ǥ??롣 ???̤? KeySym ?ͤǤ??? NoSymbol ?ϡ????̤? KeyCode ??̤???Ѥ????Ǥ??????뤿???˻Ȥ??? NoSymbol ?ϡ??ºݤ?ͭ???? KeyCode ?ꥹ?ȤκǸ??Ǥʤ????֤˸??????Ƥ??褤?? XChangeKeyboardMapping ?? MappingNotify ???٥??Ȥ????????롣
X ?????Ф????Υޥåԥ????᤹??ɬ?פϤʤ??? ?????ϥ??饤?????Ȥ??ɤ߽????뤿??????¸???Ƥ????????Ǥ??롣
XChangeKeyboardMapping ?ϥ??顼 BadAlloc, BadValue ???????Ȥ????롣
?ؿ? XGetKeyboardMapping ?ϡ?first_keycode ???ܤ????Ϥޤ????ꤷ?????? KeyCode ???Ф??륷???ܥ? ???֤??? first_keycode ?ǻ??ꤹ???ͤϡ? XDisplayKeycodes ???֤? min_keycode ?ʾ??Ǥʤ????Фʤ??ʤ??? ?????Ǥʤ??????ϡ????顼 BadValue ?Ȥʤ롣 ?????˼??˼??????? XDisplayKeycodes ???֤? max_keycode ?ʲ??Ǥʤ????Фʤ??ʤ???
first_keycode + keycode_count - 1
?????Ǥʤ??????ˤϡ????顼 BadValue ?Ȥʤ롣 KeySym ?ꥹ?????????ǿ??ϼ??μ???ɽ?????롣
keycode_count * keysyms_per_keycode_return
0 ???????????ֹ? N ?Ǥ??롢KeyCode K ???Ф??? KeySym ?ϡ?keysym ?ꥹ?????? ?ʲ??μ??Υ????ǥå????????ġ????Υ????ǥå????? 0 ?????????롣
(K - first_code) * keysyms_per_code_return + N
X ?????Фϡ????Ƥ?ɬ?פʥ????ܥ??????𤹤뤿???˽?ʬ???礭???Ǥ???Ǥ?? ?? keysyms_per_keycode ?????롣 ???̤? KeySym ?ͤǤ??? NoSymbol ?ϡ????̤? KeyCode ??̤???Ѥ????Ǥ??????뤿???˻Ȥ??? XGetKeyboardMapping ???֤??????????????????ˤϡ? XFree ?????Ѥ??뤳?ȡ?
XGetKeyboardMapping ?ϥ??顼 BadValue ???????Ȥ????롣
?ؿ? XDisplayKeycodes ?ϡ????ꤷ???ǥ????ץ쥤?????ݡ??Ȥ??Ƥ????Ǿ??Υ????????ɤȺ????Υ??? ?????ɤ??֤??? ?֤??????Ǿ??? KeyCode ?ο??? 8 ???꾮???????ȤϤʤ????֤??????????? KeyCode ?ο??? 255 ?????礭?????ȤϤʤ??? ?????ϰϤ????Ƥ? KeyCode ???б????륭????????ɬ?פϤʤ???
?ؿ? XSetModifierMapping ?ϥ??ǥ??ե??????Ȥ??ƻȤ?????(?⤷??????)?? KeyCode ?????ꤹ?롣 ???????????硢X ?????Ф? MappingNotify ???٥??Ȥ????????? XSetModifierMapping ?? MappingSuccess ???֤??? X ?????Ф?¿???Ƥ? 8 ?ĤΥ??ǥ??ե?????????????ǧ???ʤ??? XModifierKeymap ??¤?Τ? 8 ?Ĥ???¿?????ǥ??ե??????????????ꤵ???Ƥ??????硢???顼 BadLength ?Ȥʤ롣
XModifierKeymap ??¤?Τ? modifiermap ?????Фϡ?max_keypermod ?Ĥ? KeyCode ?? 8 ?Ȼ????? ?ƥ??ǥ??ե????????Ф??륭???????ɤ? Shift, Lock, Control, Mod1, Mod2, Mod3, Mod4, Mod5 ?ν????¤??Ǥ??롣 ???줾???ν????Τ?????0 ?Ǥʤ? KeyCode ????????̣????????KeyCode ?? 0 ?? ???????Τ?̵?뤵???롣 ?????ˡ?0 ?Ǥʤ????Ƥ? KeyCode ?? Display ??¤?Τ? min_keycode ?? max_keycode ?ǻ??ꤵ?????ϰϤǤʤ????Фʤ??ʤ??? ?????Ǥʤ??????ϡ????顼 BadValue ?Ȥʤ롣
X ?????Фϥ??ǥ??ե????????ѹ??λ????????¤??뤳?Ȥ??Ǥ??롣 ???Τ褦?????¤??㤨?С????륭????Υ???줿?????Ѳ????ϡ??ɥ?????Ū?? ?????Ǥ??ʤ????硢???륭???ˤĤ??ƥ????ȥ??ԡ??Ȥ?̵???ˤǤ??ʤ????硢 ʣ???ĤΥ??ǥ??ե??????????????ݡ??Ȥ????Ƥ??ʤ????????˹Ԥ????롣 ???Τ褦?????¤??ˤ??줿?????ϡ??֤????륹?ơ??????? MappingFailed ?Ǥ??ꡢ?ɤΥ??ǥ??ե????????ѹ??????ʤ??? ???ǥ??ե????????Ф??ƻ??ꤵ?줿?????? KeyCode ?? ?????????????Ƥ??????ǥ??ե??????Ȱۤʤꡢ???Υ??ǥ??ե????????Ф??? (???ߤΡ????뤤?Ͽ?????)?????Τ????줫??????Ū?˲????줿???֤ˤ??????? ?ϡ? XSetModifierMapping ?? MappingBusy ???֤????ɤΥ??ǥ??ե????????ѹ??????ʤ???
XSetModifierMapping ?ϥ??顼 BadAlloc, BadValue ???????Ȥ????롣
?ؿ? XGetModifierMapping ?Ͽ????????????줿 XModifierKeymap ??¤?ΤؤΥݥ????֤??????ι?¤?Τϥ??ǥ??ե??????Ȥ??ƻ??Ѥ????륭?? ???ޤࡣ ???ι?¤?Τ??Ȥ??????ä??? XFreeModifiermap ???ƤӽФ??Ʋ??????ʤ????Фʤ??ʤ??? ???????Ǥ????줫?Υ??ǥ??ե????????Ф????ͤȤ??? 0 ???????줿???硢?? ?Υ??ǥ??ե???????̵???Ȥʤ롣
?ؿ? XNewModifiermap ?ϡ????????Ѥ??뤿???? XModifierKeymap ??¤?ΤؤΥݥ????֤???
?ؿ? XInsertModifiermapEntry ?ϻ??ꤷ?????ǥ??ե??????????椹?뽸???˻??ꤵ?줿 KeyCode ???ɲä??? ???η????????줿 XModifierKeymap ??¤??(ɬ?פ˱????Ƴ?ĥ??????)???֤???
?ؿ? XDeleteModifiermapEntry ?ϻ??ꤷ?????ǥ??ե??????????椹?뽸?礫?????ꤵ?줿 KeyCode ?????????? ???η????????줿 XModifierKeymap ??¤?ΤؤΥݥ????֤???
?ؿ? XFreeModifiermap ?ϻ??ꤵ?줿 XModifierKeymap ??¤?Τ????????롣
??¤??¶
XModifierKeymap ??¤?Τ????Ƥ?:
typedef struct { int max_keypermod; KeyCode *modifiermap; } XModifierKeymap;
?֤???¶
??Ϣ????¶
XFree(3X11), XSetPointerMapping(3X11)
Xlib - C Language X Interface
Release 6.5 | X Version 11 |