home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2001 May / SGI IRIX Base Documentation 2001 May.iso / usr / share / catman / p_man / cat3 / X11 / XGrabKey.z / XGrabKey
Encoding:
Text File  |  1998-10-30  |  8.0 KB  |  199 lines

  1.  
  2.  
  3.  
  4.      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyy((((3333XXXX11111111))))     XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyy((((3333XXXX11111111))))
  5.  
  6.  
  7.  
  8.      NNNNAAAAMMMMEEEE
  9.           XGrabKey, XUngrabKey - grab keyboard keys
  10.  
  11.      SSSSYYYYNNNNTTTTAAAAXXXX
  12.           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,
  13.           _o_w_n_e_r__e_v_e_n_t_s, _p_o_i_n_t_e_r__m_o_d_e,
  14.                        _k_e_y_b_o_a_r_d__m_o_d_e)
  15.                 Display *_d_i_s_p_l_a_y;
  16.                 int _k_e_y_c_o_d_e;
  17.                 unsigned int _m_o_d_i_f_i_e_r_s;
  18.                 Window _g_r_a_b__w_i_n_d_o_w;
  19.                 Bool _o_w_n_e_r__e_v_e_n_t_s;
  20.                 int _p_o_i_n_t_e_r__m_o_d_e, _k_e_y_b_o_a_r_d__m_o_d_e;
  21.  
  22.           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)
  23.                 Display *_d_i_s_p_l_a_y;
  24.                 int _k_e_y_c_o_d_e;
  25.                 unsigned int _m_o_d_i_f_i_e_r_s;
  26.                 Window _g_r_a_b__w_i_n_d_o_w;
  27.  
  28.      AAAARRRRGGGGUUUUMMMMEEEENNNNTTTTSSSS
  29.           _d_i_s_p_l_a_y   Specifies the connection to the X server.
  30.  
  31.           _g_r_a_b__w_i_n_d_o_w
  32.                     Specifies the grab window.
  33.  
  34.           _k_e_y_b_o_a_r_d__m_o_d_e
  35.                     Specifies further processing of keyboard events.
  36.                     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.
  37.  
  38.           _k_e_y_c_o_d_e   Specifies the KeyCode or _A_n_y_K_e_y.
  39.  
  40.           _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.  The
  41.                     mask is the bitwise inclusive OR of the valid
  42.                     keymask bits.
  43.  
  44.           _o_w_n_e_r__e_v_e_n_t_s
  45.                     Specifies a Boolean value that indicates whether
  46.                     the keyboard events are to be reported as usual.
  47.  
  48.           _p_o_i_n_t_e_r__m_o_d_e
  49.                     Specifies further processing of pointer events.
  50.                     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.
  51.  
  52.      DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  53.           The _X_G_r_a_b_K_e_y function establishes a passive grab on the
  54.           keyboard.  In the future, the keyboard is actively grabbed
  55.           (as for _X_G_r_a_b_K_e_y_b_o_a_r_d), the last-keyboard-grab time is set
  56.           to the time at which the key was pressed (as transmitted in
  57.           the _K_e_y_P_r_e_s_s event), and the _K_e_y_P_r_e_s_s event is reported if
  58.           all of the following conditions are true:
  59.  
  60.  
  61.  
  62.  
  63.      Page 1                                          (printed 4/30/98)
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyy((((3333XXXX11111111))))     XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyy((((3333XXXX11111111))))
  71.  
  72.  
  73.  
  74.           +o    The keyboard is not grabbed and the specified key
  75.                (which can itself be a modifier key) is logically
  76.                pressed when the specified modifier keys are logically
  77.                down, and no other modifier keys are logically down.
  78.  
  79.           +o    Either the grab_window is an ancestor of (or is) the
  80.                focus window, or the grab_window is a descendant of the
  81.                focus window and contains the pointer.
  82.  
  83.           +o    A passive grab on the same key combination does not
  84.                exist on any ancestor of grab_window.
  85.  
  86.           The interpretation of the remaining arguments is as for
  87.           _X_G_r_a_b_K_e_y_b_o_a_r_d.  The active grab is terminated automatically
  88.           when the logical state of the keyboard has the specified key
  89.           released (independent of the logical state of the modifier
  90.           keys).
  91.  
  92.           Note that the logical state of a device (as seen by client
  93.           applications) may lag the physical state if device event
  94.           processing is frozen.
  95.  
  96.           A modifiers argument of _A_n_y_M_o_d_i_f_i_e_r is equivalent to issuing
  97.           the request for all possible modifier combinations
  98.           (including the combination of no modifiers). It is not
  99.           required that all modifiers specified have currently
  100.           assigned KeyCodes.  A keycode argument of _A_n_y_K_e_y is
  101.           equivalent to issuing the request for all possible KeyCodes.
  102.           Otherwise, the specified keycode must be in the range
  103.           specified by min_keycode and max_keycode in the connection
  104.           setup, or a _B_a_d_V_a_l_u_e error results.
  105.  
  106.           If some other client has issued a _X_G_r_a_b_K_e_y with the same key
  107.           combination on the same window, a _B_a_d_A_c_c_e_s_s error results.
  108.           When using _A_n_y_M_o_d_i_f_i_e_r or _A_n_y_K_e_y, the request fails
  109.           completely, and a _B_a_d_A_c_c_e_s_s error results (no grabs are
  110.           established) if there is a conflicting grab for any
  111.           combination.
  112.  
  113.           _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
  114.           errors.
  115.  
  116.           The _X_U_n_g_r_a_b_K_e_y function releases the key combination on the
  117.           specified window if it was grabbed by this client.  It has
  118.           no effect on an active grab.  A modifiers of _A_n_y_M_o_d_i_f_i_e_r is
  119.           equivalent to issuing the request for all possible modifier
  120.           combinations (including the combination of no modifiers).  A
  121.           keycode argument of _A_n_y_K_e_y is equivalent to issuing the
  122.           request for all possible key codes.
  123.  
  124.           _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.
  125.  
  126.  
  127.  
  128.  
  129.      Page 2                                          (printed 4/30/98)
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyy((((3333XXXX11111111))))     XXXX VVVVeeeerrrrssssiiiioooonnnn 11111111 ((((RRRReeeelllleeeeaaaasssseeee 6666....3333))))      XXXXGGGGrrrraaaabbbbKKKKeeeeyyyy((((3333XXXX11111111))))
  137.  
  138.  
  139.  
  140.      DDDDIIIIAAAAGGGGNNNNOOOOSSSSTTTTIIIICCCCSSSS
  141.           _B_a_d_A_c_c_e_s_s A client attempted to grab a key/button
  142.                     combination already grabbed by another client.
  143.  
  144.           _B_a_d_V_a_l_u_e  Some numeric value falls outside the range of
  145.                     values accepted by the request.  Unless a specific
  146.                     range is specified for an argument, the full range
  147.                     defined by the argument's type is accepted.  Any
  148.                     argument defined as a set of alternatives can
  149.                     generate this error.
  150.  
  151.           _B_a_d_W_i_n_d_o_w A value for a Window argument does not name a
  152.                     defined Window.
  153.  
  154.      SSSSEEEEEEEE AAAALLLLSSSSOOOO
  155.           XAllowAccess(3X11), XGrabButton(3X11), XGrabKeyboard(3X11),
  156.           XGrabPointer(3X11)
  157.           _X_l_i_b - _C _L_a_n_g_u_a_g_e _X _I_n_t_e_r_f_a_c_e
  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.      Page 3                                          (printed 4/30/98)
  196.  
  197.  
  198.  
  199.