'\" t .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991, 1994, 1996 X Consortium .\" .\" Permission is hereby granted, free of charge, to any person obtaining .\" a copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, .\" distribute, sublicense, and/or sell copies of the Software, and to .\" permit persons to whom the Software is furnished to do so, subject to .\" the following conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. .\" IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR .\" OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, .\" ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR .\" OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of the X Consortium shall .\" not be used in advertising or otherwise to promote the sale, use or .\" other dealings in this Software without prior written authorization .\" from the X Consortium. .\" .\" Copyright \(co 1985, 1986, 1987, 1988, 1989, 1990, 1991 by .\" Digital Equipment Corporation .\" .\" Portions Copyright \(co 1990, 1991 by .\" Tektronix, Inc. .\" .\" Permission to use, copy, modify and distribute this documentation for .\" any purpose and without fee is hereby granted, provided that the above .\" copyright notice appears in all copies and that both that copyright notice .\" and this permission notice appear in all copies, and that the names of .\" Digital and Tektronix not be used in in advertising or publicity pertaining .\" to this documentation without specific, written prior permission. .\" Digital and Tektronix makes no representations about the suitability .\" of this documentation for any purpose. .\" It is provided ``as is'' without express or implied warranty. .\" .\" Copyright (c) 1998, 2001 The X Japanese Documentation Project. .\" .\" Permission is hereby granted, free of charge, to any person obtaining a .\" copy of this software and associated documentation files (the .\" "Software"), to deal in the Software without restriction, including .\" without limitation the rights to use, copy, modify, merge, publish, dis- .\" tribute, sublicense, and/or sell copies of the Software, and to permit .\" persons to whom the Software is furnished to do so, subject to the fol- .\" lowing conditions: .\" .\" The above copyright notice and this permission notice shall be included .\" in all copies or substantial portions of the Software. .\" .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABIL- .\" ITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT .\" SHALL THE X JAPANESE DOCUMENTATION PROJECT BE LIABLE FOR ANY CLAIM, .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. .\" .\" Except as contained in this notice, the name of The X Japanese .\" Documentation Project shall not be used in advertising or otherwise to .\" promote the sale, use or other dealings in this Software without prior .\" written authorization from The X Japanese Documentation Project. .\" .\" X Window System is a trademark of The Open Group. .\" .\" Translated Sun Oct 11 21:05:32 JST 1998 .\" by FUJIWARA Teruyoshi .\" Updated Sat Sep 22 18:23:21 JST 2001 for XFree86 4.1.0 .\" by FUJIWARA Teruyoshi .\" .\" $XFree86: xc/doc/man/X11/XCKCntrl.man,v 1.3 2001/02/07 22:35:20 tsi Exp $ .\" .ds xT X Toolkit Intrinsics \- C Language Interface .ds xW Athena X Widgets \- C Language X Toolkit Interface .ds xL Xlib \- C Language X Interface .ds xC Inter-Client Communication Conventions Manual .na .de Ds .nf .\\$1D \\$2 \\$1 .ft 1 .\".ps \\n(PS .\".if \\n(VS>=40 .vs \\n(VSu .\".if \\n(VS<=39 .vs \\n(VSp .. .de De .ce 0 .if \\n(BD .DF .nr BD 0 .in \\n(OIu .if \\n(TM .ls 2 .sp \\n(DDu .fi .. .de FD .LP .KS .TA .5i 3i .ta .5i 3i .nf .. .de FN .fi .KE .LP .. .de IN \" send an index entry to the stderr .. .de C{ .KS .nf .D .\" .\" choose appropriate monospace font .\" the imagen conditional, 480, .\" may be changed to L if LB is too .\" heavy for your eyes... .\" .ie "\\*(.T"480" .ft L .el .ie "\\*(.T"300" .ft L .el .ie "\\*(.T"202" .ft PO .el .ie "\\*(.T"aps" .ft CW .el .ft R .ps \\n(PS .ie \\n(VS>40 .vs \\n(VSu .el .vs \\n(VSp .. .de C} .DE .R .. .de Pn .ie t \\$1\fB\^\\$2\^\fR\\$3 .el \\$1\fI\^\\$2\^\fP\\$3 .. .de ZN .ie t \fB\^\\$1\^\fR\\$2 .el \fI\^\\$1\^\fP\\$2 .. .de hN .ie t <\fB\\$1\fR>\\$2 .el <\fI\\$1\fP>\\$2 .. .de NT .ne 7 .ds NO Note .if \\n(.$>$1 .if !'\\$2'C' .ds NO \\$2 .if \\n(.$ .if !'\\$1'C' .ds NO \\$1 .ie n .sp .el .sp 10p .TB .ce \\*(NO .ie n .sp .el .sp 5p .if '\\$1'C' .ce 99 .if '\\$2'C' .ce 99 .in +5n .ll -5n .R .. . \" Note End -- doug kraft 3/85 .de NE .ce 0 .in -5n .ll +5n .ie n .sp .el .sp 10p .. .ny0 '\" t .TH XChangeKeyboardControl 3X11 "Release 6.5" "X Version 11" "XLIB FUNCTIONS" .SH 名前 .\"0 XChangeKeyboardControl, XGetKeyboardControl, XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap, XKeyboardControl \- manipulate keyboard settings and keyboard control structure XChangeKeyboardControl, XGetKeyboardControl, XAutoRepeatOn, XAutoRepeatOff, XBell, XQueryKeymap, XKeyboardControl \- キーボード設定の操作とキーボード制御構造体 .SH 書式 XChangeKeyboardControl\^(\^\fIdisplay\fP, \fIvalue_mask\fP\^, \fIvalues\fP\^) .br Display *\fIdisplay\fP\^; .br unsigned long \fIvalue_mask\fP\^; .br XKeyboardControl *\fIvalues\fP\^; .LP XGetKeyboardControl\^(\^\fIdisplay\fP, \fIvalues_return\fP\^) .br Display *\fIdisplay\fP\^; .br XKeyboardState *\fIvalues_return\fP\^; .LP XAutoRepeatOn\^(\^\fIdisplay\fP\^) .br Display *\fIdisplay\fP\^; .LP XAutoRepeatOff\^(\^\fIdisplay\fP\^) .br Display *\fIdisplay\fP\^; .LP XBell\^(\^\fIdisplay\fP, \fIpercent\fP\^) .br Display *\fIdisplay\fP\^; .br int \fIpercent\fP\^; .LP XQueryKeymap\^(\^\fIdisplay\fP, \fIkeys_return\fP\^) .br Display *\fIdisplay\fP\^; .br char \fIkeys_return\fP[32]\^; .SH 引き数 .IP \fIdisplay\fP 1i .\"0 Specifies the connection to the X server. X サーバへの接続を指定する。 .IP \fIkeys_return\fP 1i .\"0 Returns an array of bytes that identifies which keys are pressed down. どのキーが押されたかを示すバイト配列が返される。 .\"0 Each bit represents one key of the keyboard. それぞれのビットはキーボードの 1 つのキーを表す。 .IP \fIpercent\fP 1i .\"0 Specifies the volume for the bell, .\"0 which can range from \-100 to 100 inclusive. ベルの音量を指定する。 これは \-100 以上 100 以下の範囲である。 .IP \fIvalue_mask\fP 1i .\"0 Specifies which controls to change. どの制御を変更するか指定する。 .\"0 This mask is the bitwise inclusive OR of the valid control mask bits. このマスクは有効な制御マスクビット値のビットごとの論理和を取ったもので ある。 .IP \fIvalues\fP 1i .\"0 Specifies one value for each bit set to 1 in the mask. マスクで 1 にセットされている各ビットに対して値を 1 つずつ指定する。 .IP \fIvalues_return\fP 1i .\"0 Returns the current keyboard controls in the specified .\"0 .ZN XKeyboardState .\"0 structure. 指定した .ZN XKeyboardState 構造体に現在のキーボード制御が返される。 .SH 説明 .\"0 The .\"0 .ZN XChangeKeyboardControl .\"0 function controls the keyboard characteristics defined by the .\"0 .ZN XKeyboardControl .\"structure. 関数 .ZN XChangeKeyboardControl は、 .ZN XKeyboardControl 構造体で定義されるキーボード特性を制御する。 .\"0 The value_mask argument specifies which values are to be changed. 変更する値は引き数 value_mask を使って指定する。 .\"0 .LP .\"0 .ZN XChangeKeyboardControl .\"0 can generate .\"0 .ZN BadMatch .\"0 and .\"0 .ZN BadValue .\"0 errors. .ZN XChangeKeyboardControl はエラー .ZN BadMatch , .ZN BadValue を起こすことがある。 .LP .\"0 The .\"0 .ZN XGetKeyboardControl .\"0 function returns the current control values for the keyboard to the .\"0 .ZN XKeyboardState .\"0 structure. 関数 .ZN XGetKeyboardControl はキーボードの現在の制御値を .ZN XKeyboardState 構造体に返す。 .LP .\"0 The .\"0 .ZN XAutoRepeatOn .\"0 function turns on auto-repeat for the keyboard on the specified display. 関数 .ZN XAutoRepeatOn は、指定したディスプレイのキーボードのオートリピートを有効にする。 .LP .\"0 The .\"0 .ZN XAutoRepeatOff .\"0 function turns off auto-repeat for the keyboard on the specified display. 関数 .ZN XAutoRepeatOff は、指定したディスプレイのキーボードのオートリピートを無効にする。 .LP .\"0 The .\"0 .ZN XBell .\"0 function rings the bell on the keyboard on the specified display, if possible. 関数 .ZN XBell は可能ならば、指定したディスプレイのキーボードのベルを鳴らす。 .\"0 The specified volume is relative to the base volume for the keyboard. 指定する音量はキーボードの基本音量に対する相対値である。 .\"0 If the value for the percent argument is not in the range \-100 to 100 .\"0 inclusive, a .\"0 .ZN BadValue .\"0 error results. 引き数 percent の値が \-100 から 100 の範囲でない場合には、エラー .ZN BadValue となる。 .\"0 The volume at which the bell rings .\"0 when the percent argument is nonnegative is: 引き数 percent の値が負でない場合には、ベルが鳴る音量は次のようになる。 .IP base \- [(base * percent) / 100] + percent .LP .\"0 The volume at which the bell rings .\"0 when the percent argument is negative is: 引き数 percent の値が負の場合には、ベルが鳴る音量は次のようになる。 .IP base + [(base * percent) / 100] .LP .\"0 To change the base volume of the bell, use .\"0 .ZN XChangeKeyboardControl . ベルの基本音量を変更するには .ZN XChangeKeyboardControl を使う。 .LP .\"0 .ZN XBell .\"0 can generate a .\"0 .ZN BadValue .\"0 error. .ZN XBell はエラー .ZN BadValue を起こすことがある。 .LP .\"0 The .\"0 .ZN XQueryKeymap .\"0 function returns a bit vector for the logical state of the keyboard, .\"0 where each bit set to 1 indicates that the corresponding key is currently .\"0 pressed down. 関数 .ZN XQueryKeymap は、キーボードの論理的状態を表すビットのベクトルを返す。 1 がセットされているビットは、対応するキーが現在押されていることを示す。 .\"0 The vector is represented as 32 bytes. このベクトルは 32 バイトで表される。 .\"0 Byte N (from 0) contains the bits for keys 8N to 8N + 7 .\"0 with the least significant bit in the byte representing key 8N. バイト N (0から数える)は、キー 8N から 8N + 7 に対応するビットを持つ。 ここでバイト中の最下位ビットがキー 8N を表す。 .LP .\"0 Note that the logical state of a device (as seen by client applications) .\"0 may lag the physical state if device event processing is frozen. デバイスのイベントが凍結されている場合、デバイスの論理的状態(クライア ントアプリケーションが見る)が物理的状態とずれることがある。 .SH 構造体 .\"0 The .\"0 .ZN XKeyboardControl .\"0 structure contains: .ZN XKeyboardControl 構造体の内容を示す: .LP .LP .TS lw(.5i) lw(2.5i) lw(.8i). T{ \&#define T} T{ .ZN KBKeyClickPercent T} T{ (1L<<0) T} T{ \&#define T} T{ .ZN KBBellPercent T} T{ (1L<<1) T} T{ \&#define T} T{ .ZN KBBellPitch T} T{ (1L<<2) T} T{ \&#define T} T{ .ZN KBBellDuration T} T{ (1L<<3) T} T{ \&#define T} T{ .ZN KBLed T} T{ (1L<<4) T} T{ \&#define T} T{ .ZN KBLedMode T} T{ (1L<<5) T} T{ \&#define T} T{ .ZN KBKey T} T{ (1L<<6) T} T{ \&#define T} T{ .ZN KBAutoRepeatMode T} T{ (1L<<7) T} .TE .IN "XKeyboardControl" "" "@DEF@" .Ds 0 .TA .5i 2.5i .ta .5i 2.5i 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; .De .LP .\"0 The key_click_percent member sets the volume for key clicks between 0 (off) .\"0 and 100 (loud) inclusive, if possible. key_click_percent メンバは、可能ならばキークリック音の音量を 0 (無音) 以上 100 (最大音量)以下の値で設定する。 .\"0 A setting of \-1 restores the default. \-1 を指定するとデフォルト値が復元される。 .\"0 Other negative values generate a .\"0 .ZN BadValue .\"0 error. これ以外の負の値を指定した場合は、エラー .ZN BadValue となる。 .LP .\"0 The bell_percent sets the base volume for the bell between 0 (off) and 100 .\"0 (loud) inclusive, if possible. bell_percent メンバは、可能ならば 0 (無音)以上 100 (最大音量)の間でベルの 基本音量を設定する。 .\"0 A setting of \-1 restores the default. \-1 を指定するとデフォルト値が復元される。 .\"0 Other negative values generate a .\"0 .ZN BadValue .\"0 error. これ以外の負の値を指定した場合は、エラー .ZN BadValue となる。 .\"0 The bell_pitch member sets the pitch (specified in Hz) of the bell, if possible. bell_pitch メンバは、可能ならばベルの音調(Hz で指定)を設定する。 .\"0 A setting of \-1 restores the default. \-1 を指定するとデフォルト値が復元される。 .\"0 Other negative values generate a .\"0 .ZN BadValue .\"0 error. これ以外の負の値を指定した場合は、エラー .ZN BadValue となる。 .\"0 The bell_duration member sets the duration of the .\"0 bell specified in milliseconds, if possible. bell_duration メンバは、可能ならばベルの鳴る時間をミリ秒単位で設定する。 .\"0 A setting of \-1 restores the default. \-1 を指定するとデフォルト値が復元される。 .\"0 Other negative values generate a .\"0 .ZN BadValue .\"0 error. これ以外の負の値を指定した場合は、エラー .ZN BadValue となる。 .LP .\"0 If both the led_mode and led members are specified, .\"0 the state of that LED is changed, if possible. led_mode メンバと led_mode メンバの両方が指定された場合、可能ならばそ の LED の状態が変更される。 .\"0 The led_mode member can be set to .\"0 .ZN LedModeOn .\"0 or .\"0 .ZN LedModeOff . led_mode メンバには .ZN LedModeOn あるいは .ZN LedModeOff が設定できる。 .\"0 If only led_mode is specified, the state of .\"0 all LEDs are changed, if possible. led_mode だけが指定されている場合、可能ならば全ての LED の状態が変更さ れる。 .\"0 At most 32 LEDs numbered from one are supported. 1 から数えて最大 32 個までの LED がサポートされている。 .\"0 No standard interpretation of LEDs is defined. LED の標準的な実装は定義されていない。 .\"0 If led is specified without led_mode, a .\"0 .ZN BadMatch .\"0 error results. led_mode メンバ無しで led メンバが指定された場合は、エラー .ZN BadMatch となる。 .LP .\"0 If both the auto_repeat_mode and key members are specified, .\"0 the auto_repeat_mode of that key is changed (according to .\"0 .ZN AutoRepeatModeOn , .\"0 .ZN AutoRepeatModeOff , .\"0 or .\"0 .ZN AutoRepeatModeDefault ), .\"0 if possible. auto_repeat_mode メンバと key メンバの両方が設定されている場合、可能な らばそのキーに対する auto_repeat_mode モードが変更される(変更は .ZN AutoRepeatModeOn , .ZN AutoRepeatModeOff , .ZN AutoRepeatModeDefault のいずれかに従って行われる)。 .\"0 If only auto_repeat_mode is .\"0 specified, the global auto_repeat_mode for the entire keyboard is .\"0 changed, if possible, and does not affect the per-key settings. auto_repeat_mode だけが指定された場合、可能ならばキーボード全体につい ての大域的な auto_repeat_mode が変更されるが、個別のキーについての設定 は影響を受けない。 .\"0 If a key is specified without an auto_repeat_mode, a .\"0 .ZN BadMatch .\"0 error results. auto_repeat_mode 無しでキーが指定された場合、エラー .ZN BadMatch となる。 .\"0 Each key has an individual mode of whether or not it should auto-repeat .\"0 and a default setting for the mode. それぞれのキーはオートリピートすべきかどうかを示す個別のモードと、この モードのデフォルトの設定を持っている。 .\"0 In addition, .\"0 there is a global mode of whether auto-repeat should be enabled or not .\"0 and a default setting for that mode. さらに、オートリピートを有効にすべきかどうかを示す大域的なモードと、こ のモードのデフォルトの設定がある。 .\"0 When global mode is .\"0 .ZN AutoRepeatModeOn , .\"0 keys should obey their individual auto-repeat modes. 大域的なモードが .ZN AutoRepeatModeOn ならば、キーは個別のオートリピートモードに従う。 .\"0 When global mode is .\"0 .ZN AutoRepeatModeOff , .\"0 no keys should auto-repeat. 大域的なモードが .ZN AutoRepeatModeOff ならば、全てのキーはオートリピートしてはならない。 .\"0 An auto-repeating key generates alternating .\"0 .ZN KeyPress .\"0 and .\"0 .ZN KeyRelease .\"0 events. オートリピートしているキーは .ZN KeyPress イベントと .ZN KeyRelease イベントを交互に生成する。 .\"0 When a key is used as a modifier, .\"0 it is desirable for the key not to auto-repeat, .\"0 regardless of its auto-repeat setting. あるキーをモディファイアとして使う場合は、オートリピートの設定に関わら ず、そのキーはオートリピートさせないことが望ましい。 .LP .\"0 The .\"0 .ZN XKeyboardState .\"0 structure contains: .ZN XKeyboardState 構造体の内容を以下に示す。 .LP .Ds 0 .TA .5i .ta .5i 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; .De .LP .\"0 For the LEDs, .\"0 the least significant bit of led_mask corresponds to LED one, .\"0 and each bit set to 1 in led_mask indicates an LED that is lit. LED については、led_mask メンバの最下位ビットが 1 番目の LED に対応し、 led_mask メンバ中で 1 にセットされているビットは、その LED が点灯して いることを示す。 .\"0 The global_auto_repeat member can be set to .\"0 .ZN AutoRepeatModeOn .\"0 or .\"0 .ZN AutoRepeatModeOff . global_auto_repeat メンバには .ZN AutoRepeatModeOn または .ZN AutoRepeatModeOff を設定できる。 .\"0 The auto_repeats member is a bit vector. auto_repeats メンバはビットのベクトルである。 .\"0 Each bit set to 1 indicates that auto-repeat is enabled .\"0 for the corresponding key. それぞれのビットに 1 が設定されていると、対応するキーのオートリピート が有効であることを示す。 .\"0 The vector is represented as 32 bytes. このベクトルは 32 バイトで表される。 .\"0 Byte N (from 0) contains the bits for keys 8N to 8N + 7 .\"0 with the least significant bit in the byte representing key 8N. バイト N (0から数える)は、キー 8N から 8N + 7 に対応するビットを持つ。 ここでバイト中の最下位ビットがキー 8N を表す。 .SH 返り値 .TP 1i .ZN BadMatch .\"0 Some argument or pair of arguments has the correct type and range but fails .\"0 to match in some other way required by the request. 引き数や引き数の組は正しい型・範囲を持っているが、そのリクエストが要求する 他の条件に適合できなかった。 .TP 1i .ZN BadValue .\"0 Some numeric value falls outside the range of values accepted by the request. .\"0 Unless a specific range is specified for an argument, the full range defined .\"0 by the argument's type is accepted. Any argument defined as a set of .\"0 alternatives can generate this error. 指定された数値の中にリクエストの許容範囲を越えているものがある。引き数 に対して特定の範囲が指定されていない限り、引き数の型で定義されている全 ての範囲が許される。選択肢として定義されている引き数はこのエラーを起こ すことがある。 .SH 関連項目 XChangeKeyboardMapping(3X11), XSetPointerMapping(3X11) .br \fI\*(xL\fP