home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-bin / x11r6.1 / man / cat3 / xgrabkey.0 < prev    next >
Encoding:
Text File  |  1996-10-17  |  6.1 KB  |  199 lines

  1.  
  2.  
  3.  
  4. XGrabKey(3X11)          XLIB FUNCTIONS       XGrabKey(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGrabKey, XUngrabKey - grab keyboard keys
  9.  
  10. SSYYNNTTAAXX
  11.        XGrabKey(_d_i_s_p_l_a_y, _k_e_y_c_o_d_e, _m_o_d_i_f_i_e_r_s, _g_r_a_b___w_i_n_d_o_w,
  12.        _o_w_n_e_r___e_v_e_n_t_s, _p_o_i_n_t_e_r___m_o_d_e,
  13.             _k_e_y_b_o_a_r_d___m_o_d_e)
  14.          Display *_d_i_s_p_l_a_y;
  15.          int _k_e_y_c_o_d_e;
  16.          unsigned int _m_o_d_i_f_i_e_r_s;
  17.          Window _g_r_a_b___w_i_n_d_o_w;
  18.          Bool _o_w_n_e_r___e_v_e_n_t_s;
  19.          int _p_o_i_n_t_e_r___m_o_d_e, _k_e_y_b_o_a_r_d___m_o_d_e;
  20.  
  21.        XUngrabKey(_d_i_s_p_l_a_y, _k_e_y_c_o_d_e, _m_o_d_i_f_i_e_r_s, _g_r_a_b___w_i_n_d_o_w)
  22.          Display *_d_i_s_p_l_a_y;
  23.          int _k_e_y_c_o_d_e;
  24.          unsigned int _m_o_d_i_f_i_e_r_s;
  25.          Window _g_r_a_b___w_i_n_d_o_w;
  26.  
  27. AARRGGUUMMEENNTTSS
  28.        _d_i_s_p_l_a_y     Specifies the connection to the X server.
  29.  
  30.        _g_r_a_b___w_i_n_d_o_w
  31.          Specifies the grab window.
  32.  
  33.        _k_e_y_b_o_a_r_d___m_o_d_e
  34.          Specifies further processing of keyboard events.
  35.          You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  36.  
  37.        _k_e_y_c_o_d_e     Specifies the KeyCode or _A_n_y_K_e_y.
  38.  
  39.        _m_o_d_i_f_i_e_r_s Specifies the set of keymasks or _A_n_y_M_o_d_i_f_i_e_r.
  40.          The mask is the bitwise inclusive OR of the
  41.          valid keymask bits.
  42.  
  43.        _o_w_n_e_r___e_v_e_n_t_s
  44.          Specifies a Boolean value that indicates whether
  45.          the keyboard events are to be reported as usual.
  46.  
  47.        _p_o_i_n_t_e_r___m_o_d_e
  48.          Specifies further processing of pointer events.
  49.          You can pass _G_r_a_b_M_o_d_e_S_y_n_c or _G_r_a_b_M_o_d_e_A_s_y_n_c.
  50.  
  51. DDEESSCCRRIIPPTTIIOONN
  52.        The _X_G_r_a_b_K_e_y function establishes a passive grab on the
  53.        keyboard.  In the future, the keyboard is actively grabbed
  54.        (as for _X_G_r_a_b_K_e_y_b_o_a_r_d), the last-keyboard-grab time is set
  55.        to the time at which the key was pressed (as transmitted
  56.        in the _K_e_y_P_r_e_s_s event), and the _K_e_y_P_r_e_s_s event is reported
  57.        if all of the following conditions are true:
  58.  
  59.        +o    The keyboard is not grabbed and the specified key
  60.         (which can itself be a modifier key) is logically
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGrabKey(3X11)          XLIB FUNCTIONS       XGrabKey(3X11)
  71.  
  72.  
  73.         pressed when the specified modifier keys are logi-
  74.         cally down, and no other modifier keys are logically
  75.         down.
  76.  
  77.        +o    Either the grab_window is an ancestor of (or is) the
  78.         focus window, or the grab_window is a descendant of
  79.         the focus window and contains the pointer.
  80.  
  81.        +o    A passive grab on the same key combination does not
  82.         exist on any ancestor of grab_window.
  83.  
  84.        The interpretation of the remaining arguments is as for
  85.        _X_G_r_a_b_K_e_y_b_o_a_r_d.  The active grab is terminated automati-
  86.        cally when the logical state of the keyboard has the spec-
  87.        ified key released (independent of the logical state of
  88.        the modifier keys).
  89.  
  90.        Note that the logical state of a device (as seen by client
  91.        applications) may lag the physical state if device event
  92.        processing is frozen.
  93.  
  94.        A modifiers argument of _A_n_y_M_o_d_i_f_i_e_r is equivalent to issu-
  95.        ing the request for all possible modifier combinations
  96.        (including the combination of no modifiers).  It is not
  97.        required that all modifiers specified have currently
  98.        assigned KeyCodes.  A keycode argument of _A_n_y_K_e_y is equiv-
  99.        alent to issuing the request for all possible KeyCodes.
  100.        Otherwise, the specified keycode must be in the range
  101.        specified by min_keycode and max_keycode in the connection
  102.        setup, or a _B_a_d_V_a_l_u_e error results.
  103.  
  104.        If some other client has issued a _X_G_r_a_b_K_e_y with the same
  105.        key combination on the same window, a _B_a_d_A_c_c_e_s_s error
  106.        results.     When using _A_n_y_M_o_d_i_f_i_e_r or _A_n_y_K_e_y, the request
  107.        fails completely, and a _B_a_d_A_c_c_e_s_s error results (no grabs
  108.        are established) if there is a conflicting grab for any
  109.        combination.
  110.  
  111.        _X_G_r_a_b_K_e_y can generate _B_a_d_A_c_c_e_s_s, _B_a_d_V_a_l_u_e, and _B_a_d_W_i_n_d_o_w
  112.        errors.
  113.  
  114.        The _X_U_n_g_r_a_b_K_e_y function releases the key combination on
  115.        the specified window if it was grabbed by this client.  It
  116.        has no effect on an active grab.     A modifiers of _A_n_y_M_o_d_i_-
  117.        _f_i_e_r is equivalent to issuing the request for all possible
  118.        modifier combinations (including the combination of no
  119.        modifiers).  A keycode argument of _A_n_y_K_e_y is equivalent to
  120.        issuing the request for all possible key codes.
  121.  
  122.        _X_U_n_g_r_a_b_K_e_y can generate _B_a_d_V_a_l_u_e and _B_a_d_W_i_n_d_o_w error.
  123.  
  124. DDIIAAGGNNOOSSTTIICCSS
  125.        _B_a_d_A_c_c_e_s_s A client attempted to grab a key/button combina-
  126.          tion already grabbed by another client.
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGrabKey(3X11)          XLIB FUNCTIONS       XGrabKey(3X11)
  137.  
  138.  
  139.        _B_a_d_V_a_l_u_e     Some numeric value falls outside the range of
  140.          values accepted by the request.  Unless a spe-
  141.          cific range is specified for an argument, the
  142.          full range defined by the argument's type is
  143.          accepted.  Any argument defined as a set of
  144.          alternatives can generate this error.
  145.  
  146.        _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  147.          defined Window.
  148.  
  149. SSEEEE AALLSSOO
  150.        XAllowAccess(3X11), XGrabButton(3X11), XGrabKey-
  151.        board(3X11), XGrabPointer(3X11)
  152.        _X_l_i_b _- _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.  
  196. X Version 11           Release 6.1                3
  197.  
  198.  
  199.