.\" 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 Tue Oct 27 00:00:00 JST 1998 .\" by FUJIWARA Teruyoshi .\" Updated Sat Sep 29 13:21:51 JST 2001 for XFree86 4.1.0 .\" by FUJIWARA Teruyoshi .\" .\" $XFree86: xc/doc/man/X11/XGrKey.man,v 1.2 2001/01/27 18:19:59 dawes 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 .TH XGrabKey 3X11 "Release 6.5" "X Version 11" "XLIB FUNCTIONS" .SH 名前 .\"0 XGrabKey, XUngrabKey \- grab keyboard keys XGrabKey, XUngrabKey \- キーボードのキーをグラブする .SH 書式 XGrabKey\^(\^\fIdisplay\fP, \fIkeycode\fP\^, \fImodifiers\fP\^, \fIgrab_window\fP\^, \fIowner_events\fP\^, \fIpointer_mode\fP\^, .br \fIkeyboard_mode\fP\^) .br Display *\fIdisplay\fP\^; .br int \fIkeycode\fP\^; .br unsigned int \fImodifiers\fP\^; .br Window \fIgrab_window\fP\^; .br Bool \fIowner_events\fP\^; .br int \fIpointer_mode\fP\^, \fIkeyboard_mode\fP\^; .LP XUngrabKey\^(\^\fIdisplay\fP, \fIkeycode\fP\^, \fImodifiers\fP\^, \fIgrab_window\fP\^) .br Display *\fIdisplay\fP\^; .br int \fIkeycode\fP\^; .br unsigned int \fImodifiers\fP\^; .br Window \fIgrab_window\fP\^; .SH 引き数 .IP \fIdisplay\fP 1i .\"0 Specifies the connection to the X server. X サーバへの接続を指定する。 .IP \fIgrab_window\fP 1i .\"0 Specifies the grab window. グラブウィンドウを指定する。 .IP \fIkeyboard_mode\fP 1i .\"0 Specifies further processing of keyboard events. キーボードイベントの後処理を指定する。 .\"0 You can pass .\"0 .ZN GrabModeSync .\"0 or .\"0 .ZN GrabModeAsync . .ZN GrabModeSync あるいは .ZN GrabModeAsync を指定できる。 .IP \fIkeycode\fP 1i .\"0 Specifies the KeyCode or .\"0 .ZN AnyKey . KeyCode あるいは .ZN AnyKey を指定する。 .IP \fImodifiers\fP 1i .\"0 Specifies the set of keymasks or .\"0 .ZN AnyModifier . キーマスクの集合か .ZN AnyModifier を指定する。 .\"0 The mask is the bitwise inclusive OR of the valid keymask bits. このマスクは正しいキーマスクのビット値のビットごとの論理和を取ったもの である。 .IP \fIowner_events\fP 1i .\"0 Specifies a Boolean value that indicates whether the keyboard events .\"0 are to be reported as usual. キーボードイベントを通常通り報告するかどうかを示す真偽値を指定する。 .IP \fIpointer_mode\fP 1i .\"0 Specifies further processing of pointer events. ポインタイベントの後処理を指定する。 .\"0 You can pass .\"0 .ZN GrabModeSync .\"0 or .\"0 .ZN GrabModeAsync . .ZN GrabModeSync あるいは .ZN GrabModeAsync を渡せる。 .SH 説明 .\"0 The .\"0 .ZN XGrabKey .\"0 function establishes a passive grab on the keyboard. 関数 .ZN XGrabKey はキーボードのパッシブなグラブを確立する。 .\"0 In the future, .\"0 the keyboard is actively grabbed (as for .\"0 .ZN XGrabKeyboard ), .\"0 the last-keyboard-grab time is set to the time at which the key was pressed .\"0 (as transmitted in the .\"0 .ZN KeyPress .\"0 event), and the .\"0 .ZN KeyPress .\"0 event is reported if all of the following conditions are true: 将来に以下の条件が全て真になった場合、キーボードはアクティブにグラブされ( .ZN XGrabKeyboard によって)、最終キーボードグラブ時刻にキーが押された時刻がセットされ( .ZN KeyPress イベントで送られるように)、 .ZN KeyPress イベントが報告される。 .IP \(bu 5 .\"0 The keyboard is not grabbed and the specified key .\"0 (which can itself be a modifier key) is logically pressed .\"0 when the specified modifier keys are logically down, .\"0 and no other modifier keys are logically down. 指定されたモディファイアキーが論理的に押されており、他のどのモディファ イアキーも論理的には押されていない時、キーボードがグラブされておらず、 指定したキー(それ自体はモディファイアキーでも良い)が論理的に押されてい る。 .IP \(bu 5 .\"0 Either the grab_window is an ancestor of (or is) the focus window, .\"0 or the grab_window is a descendant of the focus window and contains the pointer. grab_window がフォーカスウィンドウの祖先ウィンドウ(あるいはフォーカス ウィンドウ)であるか、grab_window がフォーカスウィンドウの子孫ウィンド ウであり、かつポインタを含んでいる。 .IP \(bu 5 .\"0 A passive grab on the same key combination does not exist .\"0 on any ancestor of grab_window. 同じキーの組み合わせのパッシブなグラブが、 grab_window のどの祖先ウィン ドウにも存在しない。 .LP .\"0 The interpretation of the remaining arguments is as for .\"0 .ZN XGrabKeyboard . 残りの引き数の解釈は .ZN XGrabKeyboard と同じである。 .\"0 The active grab is terminated automatically when the logical state of the .\"0 keyboard has the specified key released .\"0 (independent of the logical state of the modifier keys). キーボードの論理的状態で、指定したキーが離された状態になった時、アクティ ブなグラブは自動的に終了する(モディファイアキーの論理的状態とは独立)。 .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. デバイスのイベント処理が凍結されている時、デバイスの論理状態(クライア ントアプリケーションが見る)が物理状態とずれてしまうことがある。 .LP .\"0 A modifiers argument of .\"0 .ZN AnyModifier .\"0 is equivalent to issuing the request for all .\"0 possible modifier combinations (including the combination of no .\"0 modifiers). 引き数 modifiers が .ZN AnyModifier である場合は、可能なモディファイアの組み合わせ全てに対してリクエストを 発行することと等価である(モディファイアが無い組み合わせも含む)。 .\"0 It is not required that all modifiers specified have .\"0 currently assigned KeyCodes. 指定された全てのモディファイアが現在 KeyCode を割り当てられている必要 はない。 .\"0 A keycode argument of .\"0 .ZN AnyKey .\"0 is equivalent to issuing .\"0 the request for all possible KeyCodes. 引き数 keycode が .ZN AnyKey である場合は、可能な全てのキーコードに対してリクエストを発行することと 等価である。 .\"0 Otherwise, the specified keycode must be in .\"0 the range specified by min_keycode and max_keycode in the connection .\"0 setup, .\"0 or a .\"0 .ZN BadValue .\"0 error results. これ以外の場合は、指定したキーコードは接続のセットアップ時に min_keycode と max_keycode で指定された範囲に入っている必要があり、 そうでなければエラー .ZN BadValue となる。 .LP .\"0 If some other client has issued a .\"0 .ZN XGrabKey .\"0 with the same key combination on the same window, a .\"0 .ZN BadAccess .\"0 error results. 他のクライアントが同じウィンドウの同じキーの組み合わせに対して .ZN XGrabKey を発行している場合は、エラー .ZN BadAccess となる。 .\"0 When using .\"0 .ZN AnyModifier .\"0 or .\"0 .ZN AnyKey , .\"0 the request fails completely, .\"0 and a .\"0 .ZN BadAccess .\"0 error results (no grabs are established) .\"0 if there is a conflicting grab for any combination. グラブが衝突する組み合わせが 1 つでもある場合に .ZN AnyModifier や .ZN AnyKey , を使用するとリクエストは必ず失敗し、エラー .ZN BadAccess となる(グラブは確立されない)。 .LP .\"0 .ZN XGrabKey .\"0 can generate .\"0 .ZN BadAccess , .\"0 .ZN BadValue , .\"0 and .\"0 .ZN BadWindow .\"0 errors. .ZN XGrabKey はエラー .ZN BadAccess , .ZN BadValue , .ZN BadWindow を起こすことがある。 .LP .\"0 The .\"0 .ZN XUngrabKey .\"0 function releases the key combination on the specified window if it was grabbed .\"0 by this client. 関数 .ZN XUngrabKey は、このクライアントが指定したウィンドウをグラブしている場合、このウィ ンドウ上でのキーの組み合わせを解放する。 .\"0 It has no effect on an active grab. この関数はアクティブなグラブに対しては無意味である。 .\"0 A modifiers of .\"0 .ZN AnyModifier .\"0 is equivalent to issuing .\"0 the request for all possible modifier combinations .\"0 (including the combination of no modifiers). 引き数 modifiers が .ZN AnyModifier である場合は、可能なモディファイアの組み合わせ全てに対してリクエストを 発行することと等価である(モディファイアが無いことも組み合わせに含まれる)。 .\"0 A keycode argument of .\"0 .ZN AnyKey .\"0 is equivalent to issuing the request for all possible key codes. 引き数 keycode が .ZN AnyKey である場合は、可能な全てのキーコードに対してリクエストを発行することと 等価である。 .LP .\"0 .ZN XUngrabKey .\"0 can generate .\"0 .ZN BadValue .\"0 and .\"0 .ZN BadWindow .\"0 error. .ZN XUngrabKey はエラー .ZN BadValue , .ZN BadWindow を起こすことがある。 .SH 返り値 .TP 1i .ZN BadAccess .\"0 A client attempted .\"0 to grab a key/button combination already grabbed by another client. 既に他のクライアントがグラブしているキー/ボタンの組み合わせをクライアント がグラブしようとした。 .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. 指定された数値の中にリクエストの許容範囲を越えているものがある。引き数 に対して特定の範囲が指定されていなければ、引き数の型で定義されている全 ての範囲が許される。選択肢として定義されている引き数はこのエラーを起こ すことがある。 .TP 1i .ZN BadWindow .\"0 A value for a Window argument does not name a defined Window. 引き数 Window の値が、定義されている Window を指していない。 .SH 関連項目 XAllowAccess(3X11), XGrabButton(3X11), XGrabKeyboard(3X11), XGrabPointer(3X11) .br \fI\*(xL\fP