Scroll to navigation

XChangeKeyboardControl(3X11) XLIB FUNCTIONS XChangeKeyboardControl(3X11)

̾??

XChangeKeyboardControl, XGetKeyboardControl, XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap, XKeyboardControl - ?????ܡ??????????????ȥ????ܡ??????湽¤??

????

XChangeKeyboardControl(display, value_mask, values)
Display *display;
unsigned long value_mask;
XKeyboardControl *values;

XGetKeyboardControl(display, values_return)
Display *display;
XKeyboardState *values_return;

XAutoRepeatOn(display)
Display *display;

XAutoRepeatOff(display)
Display *display;

XBell(display, percent)
Display *display;
int percent;

XQueryKeymap(display, keys_return)
Display *display;
char keys_return[32];

??????

X ?????Фؤ???³?????ꤹ?롣
?ɤΥ??????????줿???򼨤??Х??????????֤????롣 ???줾???ΥӥåȤϥ????ܡ??ɤ? 1 ?ĤΥ?????ɽ????
?٥??β??̤????ꤹ?롣 ?????? -100 ?ʾ? 100 ?ʲ????ϰϤǤ??롣
?ɤ????????ѹ????뤫???ꤹ?롣 ???Υޥ?????ͭ?????????ޥ????ӥå??ͤΥӥåȤ??Ȥ??????¤????ä????Τ? ???롣
?ޥ????? 1 ?˥??åȤ????Ƥ????ƥӥåȤ??Ф????ͤ? 1 ?Ĥ??Ļ??ꤹ?롣
???ꤷ?? XKeyboardState ??¤?Τ˸??ߤΥ????ܡ??????椬?֤????롣

????

?ؿ? XChangeKeyboardControl ?ϡ? XKeyboardControl ??¤?Τ??????????륭???ܡ????????????椹?롣 ?ѹ??????ͤϰ????? value_mask ???Ȥäƻ??ꤹ?롣 XChangeKeyboardControl ?ϥ??顼 BadMatch, BadValue ?򵯤??????Ȥ????롣

?ؿ? XGetKeyboardControl ?ϥ????ܡ??ɤθ??ߤ??????ͤ? XKeyboardState ??¤?Τ??֤???

?ؿ? XAutoRepeatOn ?ϡ????ꤷ???ǥ????ץ쥤?Υ????ܡ??ɤΥ????ȥ??ԡ??Ȥ?ͭ???ˤ??롣

?ؿ? XAutoRepeatOff ?ϡ????ꤷ???ǥ????ץ쥤?Υ????ܡ??ɤΥ????ȥ??ԡ??Ȥ?̵???ˤ??롣

?ؿ? XBell ?ϲ?ǽ?ʤ??С????ꤷ???ǥ????ץ쥤?Υ????ܡ??ɤΥ٥????Ĥ餹?? ???ꤹ?벻?̤ϥ????ܡ??ɤδ??ܲ??̤??Ф????????ͤǤ??롣 ?????? percent ???ͤ? -100 ???? 100 ???ϰϤǤʤ??????ˤϡ????顼 BadValue ?Ȥʤ롣 ?????? percent ???ͤ????Ǥʤ??????ˤϡ??٥뤬?Ĥ벻?̤ϼ??Τ褦?ˤʤ롣

base - [(base * percent) / 100] + percent

?????? percent ???ͤ????ξ????ˤϡ??٥뤬?Ĥ벻?̤ϼ??Τ褦?ˤʤ롣

base + [(base * percent) / 100]

?٥??δ??ܲ??̤??ѹ??????ˤ? XChangeKeyboardControl ???Ȥ???

XBell ?ϥ??顼 BadValue ?򵯤??????Ȥ????롣

?ؿ? XQueryKeymap ?ϡ??????ܡ??ɤ?????Ū???֤?ɽ???ӥåȤΥ٥??ȥ????֤??? 1 ?????åȤ????Ƥ????ӥåȤϡ??б????륭???????߲??????Ƥ??뤳?Ȥ򼨤??? ???Υ٥??ȥ??? 32 ?Х??Ȥ?ɽ?????롣 ?Х??? N (0??????????)?ϡ????? 8N ???? 8N + 7 ???б??????ӥåȤ????ġ? ?????ǥХ??????κDz??̥ӥåȤ????? 8N ??ɽ????

?ǥХ????Υ??٥??Ȥ????뤵???Ƥ??????硢?ǥХ?????????Ū????(???饤?? ???ȥ??ץꥱ???????󤬸???)??ʪ??Ū???֤Ȥ????뤳?Ȥ????롣

??¤??

XKeyboardControl ??¤?Τ????Ƥ򼨤?:

#define KBKeyClickPercent (1L<<0)
#define KBBellPercent (1L<<1)
#define KBBellPitch (1L<<2)
#define KBBellDuration (1L<<3)
#define KBLed (1L<<4)
#define KBLedMode (1L<<5)
#define KBKey (1L<<6)
#define KBAutoRepeatMode (1L<<7)
typedef struct {
	int key_click_percent;
	int bell_percent;
	int bell_pitch;
	int bell_duration;
	int led;
	int led_mode;	
	int key;
	int auto_repeat_mode;	
} XKeyboardControl;


key_click_percent ?????Фϡ???ǽ?ʤ??Х????????å????β??̤? 0 (̵??) ?ʾ? 100 (???粻??)?ʲ????ͤ????ꤹ?롣 -1 ?????ꤹ???ȥǥե??????ͤ??????????롣 ?????ʳ????????ͤ????ꤷ???????ϡ????顼 BadValue ?Ȥʤ롣

bell_percent ?????Фϡ???ǽ?ʤ??? 0 (̵??)?ʾ? 100 (???粻??)?δ֤ǥ٥??? ???ܲ??̤????ꤹ?롣 -1 ?????ꤹ???ȥǥե??????ͤ??????????롣 ?????ʳ????????ͤ????ꤷ???????ϡ????顼 BadValue ?Ȥʤ롣 bell_pitch ?????Фϡ???ǽ?ʤ??Х٥??β?Ĵ(Hz ?ǻ???)?????ꤹ?롣 -1 ?????ꤹ???ȥǥե??????ͤ??????????롣 ?????ʳ????????ͤ????ꤷ???????ϡ????顼 BadValue ?Ȥʤ롣 bell_duration ?????Фϡ???ǽ?ʤ??Х٥????Ĥ????֤??ߥ???ñ?̤????ꤹ?롣 -1 ?????ꤹ???ȥǥե??????ͤ??????????롣 ?????ʳ????????ͤ????ꤷ???????ϡ????顼 BadValue ?Ȥʤ롣

led_mode ?????Ф? led_mode ?????Ф?ξ???????ꤵ?줿???硢??ǽ?ʤ??Ф? ?? LED ?ξ??֤??ѹ??????롣 led_mode ?????Фˤ? LedModeOn ???뤤?? LedModeOff ???????Ǥ??롣 led_mode ?????????ꤵ???Ƥ??????硢??ǽ?ʤ??????Ƥ? LED ?ξ??֤??ѹ??? ???롣 1 ?????????ƺ??? 32 ?ĤޤǤ? LED ?????ݡ??Ȥ????Ƥ??롣 LED ??ɸ??Ū?ʼ??????????????Ƥ??ʤ??? led_mode ??????̵???? led ?????Ф????ꤵ?줿?????ϡ????顼 BadMatch ?Ȥʤ롣

auto_repeat_mode ?????Ф? key ?????Ф?ξ???????ꤵ???Ƥ??????硢??ǽ?? ???Ф??Υ??????Ф??? auto_repeat_mode ?⡼?ɤ??ѹ???????(?ѹ??? AutoRepeatModeOn, AutoRepeatModeOff, AutoRepeatModeDefault ?Τ????줫?˽??äƹԤ?????)?? auto_repeat_mode ?????????ꤵ?줿???硢??ǽ?ʤ??Х????ܡ??????ΤˤĤ? ?Ƥ?????Ū?? auto_repeat_mode ???ѹ??????뤬?????̤Υ????ˤĤ??Ƥ????? ?ϱƶ????????ʤ??? auto_repeat_mode ̵???ǥ????????ꤵ?줿???硢???顼 BadMatch ?Ȥʤ롣 ???줾???Υ????ϥ????ȥ??ԡ??Ȥ??٤????ɤ????򼨤????̤Υ⡼?ɤȡ????? ?⡼?ɤΥǥե????Ȥ??????????äƤ??롣 ?????ˡ??????ȥ??ԡ??Ȥ?ͭ???ˤ??٤????ɤ????򼨤?????Ū?ʥ⡼?ɤȡ??? ?Υ⡼?ɤΥǥե????Ȥ????꤬???롣 ????Ū?ʥ⡼?ɤ? AutoRepeatModeOn ?ʤ??С??????ϸ??̤Υ????ȥ??ԡ??ȥ⡼?ɤ˽????? ????Ū?ʥ⡼?ɤ? AutoRepeatModeOff ?ʤ??С????ƤΥ????ϥ????ȥ??ԡ??Ȥ??ƤϤʤ??ʤ??? ?????ȥ??ԡ??Ȥ??Ƥ??륭???? KeyPress ???٥??Ȥ? KeyRelease ???٥??Ȥ????ߤ????????롣 ???륭???????ǥ??ե??????Ȥ??ƻȤ??????ϡ??????ȥ??ԡ??Ȥ??????˴ؤ??? ???????Υ????ϥ????ȥ??ԡ??Ȥ????ʤ????Ȥ?˾?ޤ?????

XKeyboardState ??¤?Τ????Ƥ??ʲ??˼?????

typedef struct {
	int key_click_percent;
	int bell_percent;
	unsigned int bell_pitch, bell_duration;
	unsigned long led_mask;
	int global_auto_repeat;
	char auto_repeats[32];
} XKeyboardState;


LED ?ˤĤ??Ƥϡ?led_mask ?????ФκDz??̥ӥåȤ? 1 ???ܤ? LED ???б????? led_mask ?????????? 1 ?˥??åȤ????Ƥ????ӥåȤϡ????? LED ?????????? ???뤳?Ȥ򼨤??? global_auto_repeat ?????Фˤ? AutoRepeatModeOn ?ޤ??? AutoRepeatModeOff ???????Ǥ??롣 auto_repeats ?????ФϥӥåȤΥ٥??ȥ??Ǥ??롣 ???줾???ΥӥåȤ? 1 ?????ꤵ???Ƥ????ȡ??б????륭???Υ????ȥ??ԡ??? ??ͭ???Ǥ??뤳?Ȥ򼨤??? ???Υ٥??ȥ??? 32 ?Х??Ȥ?ɽ?????롣 ?Х??? N (0??????????)?ϡ????? 8N ???? 8N + 7 ???б??????ӥåȤ????ġ? ?????ǥХ??????κDz??̥ӥåȤ????? 8N ??ɽ????

?֤???

?????????????????Ȥ????????????ϰϤ????äƤ??뤬?????Υꥯ?????Ȥ??׵᤹?? ¾?ξ?????Ŭ???Ǥ??ʤ??ä???
???ꤵ?줿???ͤ????˥ꥯ?????Ȥε????ϰϤ??ۤ??Ƥ??????Τ????롣?????? ???Ф??????????ϰϤ????ꤵ???Ƥ??ʤ??¤ꡢ???????η????????????Ƥ????? ?Ƥ??ϰϤ????????롣???????Ȥ????????????Ƥ??????????Ϥ??Υ??顼?򵯤? ?????Ȥ????롣

??Ϣ????

XChangeKeyboardMapping(3X11), XSetPointerMapping(3X11)
Xlib - C Language X Interface

Release 6.5 X Version 11