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

  1.  
  2.  
  3.  
  4. XGetDeviceKeyMapping(3X11) X FUNCTIONS XGetDeviceKeyMapping(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGetDeviceKeyMapping,  XChangeDeviceKeyMapping  - query or
  9.        change device key mappings
  10.  
  11. SSYYNNTTAAXX
  12.        XXCChhaannggeeDDeevviicceeKKeeyyMMaappppiinngg((_d_i_s_p_l_a_y,,     _d_e_v_i_c_e,,   _f_i_r_s_t___k_e_y_c_o_d_e,,
  13.        _k_e_y_s_y_m_s___p_e_r___k_e_y_c_o_d_e,, _k_e_y_s_y_m_s,, _k_e_y_c_o_d_e___c_o_u_n_t))
  14.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  15.          XXDDeevviiccee **_d_e_v_i_c_e;;
  16.          iinntt _f_i_r_s_t___k_e_y_c_o_d_e;;
  17.          iinntt _k_e_y_s_y_m_s___p_e_r___k_e_y_c_o_d_e;;
  18.          KKeeyySSyymm **_k_e_y_s_y_m_s;;
  19.          iinntt _k_e_y_c_o_d_e___c_o_u_n_t;;
  20.  
  21.        KKeeyySSyymm **XXGGeettDDeevviicceeKKeeyyMMaappppiinngg((_d_i_s_p_l_a_y,, _d_e_v_i_c_e,, _f_i_r_s_t___k_e_y_c_o_d_e,, _k_e_y_c_o_d_e___c_o_u_n_t,,
  22.        _k_e_y_s_y_m_s___p_e_r___k_e_y_c_o_d_e___r_e_t_u_r_n))
  23.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  24.          XXDDeevviiccee **_d_e_v_i_c_e;;
  25.          KKeeyyCCooddee _f_i_r_s_t___k_e_y_c_o_d_e;;
  26.          iinntt _k_e_y_c_o_d_e___c_o_u_n_t;;
  27.          iinntt **_k_e_y_s_y_m_s___p_e_r___k_e_y_c_o_d_e___r_e_t_u_r_n;;
  28.  
  29.  
  30. AARRGGUUMMEENNTTSS
  31.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  32.  
  33.        _d_e_v_i_c_e       Specifies  the  device whose key mapping is to
  34.            be queried or modified.
  35.  
  36.        _f_i_r_s_t___k_e_y_c_o_d_e
  37.            Specifies the first KeyCode to be returned.
  38.  
  39.        _k_e_y_c_o_d_e___c_o_u_n_t
  40.            Specifies  the  number  of  KeyCodes      to   be
  41.            returned or modified.
  42.  
  43.        _k_e_y_s_y_m_s___p_e_r___k_e_y_c_o_d_e
  44.            Specifies the number of KeySyms per KeyCode.
  45.  
  46.        _k_e_y_s_y_m_s___p_e_r___k_e_y_c_o_d_e___r_e_t_u_r_n
  47.            Specifies the address of a variable into which
  48.            the number of  KeySyms  per    KeyCode     will  be
  49.            returned.
  50.  
  51.        _k_e_y_s_y_m_s       Specifies  the address of an array of KeySyms.
  52.  
  53. DDEESSCCRRIIPPTTIIOONN
  54.        For the specified device, the _X_G_e_t_D_e_v_i_c_e_K_e_y_M_a_p_p_i_n_g request
  55.        returns    the  symbols for the specified number of KeyCodes
  56.        starting     with  first_keycode.    The  value  specified  in
  57.        first_keycode must be greater than or equal to min_keycode
  58.        as returned by  _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s,  or  a  _B_a_d_V_a_l_u_e  error
  59.        results.      In  addition,     the following expression must be
  60.        less  than  or  equal  to  max_keycode  as   returned   by
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGetDeviceKeyMapping(3X11) X FUNCTIONS XGetDeviceKeyMapping(3X11)
  71.  
  72.  
  73.        _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s:
  74.  
  75.        first_keycode + keycode_count - 1
  76.  
  77.        If  this     is  not the case, a _B_a_d_V_a_l_u_e error results.  The
  78.        number of elements in the KeySyms list is:
  79.  
  80.        keycode_count * keysyms_per_keycode_return
  81.  
  82.        KeySym number N, counting from zero, for KeyCode K has the
  83.        following  index     in  the  list,     counting from zero: (K -
  84.        first_code) * keysyms_per_code_return + N
  85.  
  86.        The     X     server    arbitrarily     chooses      the
  87.        keysyms_per_keycode_return  value  to  be  large enough to
  88.        report all requested symbols.  A special KeySym    value  of
  89.        _N_o_S_y_m_b_o_l is used to fill in unused elements for individual
  90.        KeyCodes.   To  free  the  storage  returned  by      _X_G_e_t_D_e_-
  91.        _v_i_c_e_K_e_y_M_a_p_p_i_n_g, use _X_F_r_e_e.
  92.  
  93.        If the specified device does not support input class keys,
  94.        a _B_a_d_M_a_t_c_h error will result.
  95.  
  96.        _X_G_e_t_D_e_v_i_c_e_K_e_y_M_a_p_p_i_n_g can generate a  _B_a_d_D_e_v_i_c_e,    _B_a_d_M_a_t_c_h,
  97.        or _B_a_d_V_a_l_u_e error.
  98.  
  99.        For  the     specified  device,  the  _X_C_h_a_n_g_e_D_e_v_i_c_e_K_e_y_M_a_p_p_i_n_g
  100.        request defines the symbols for the  specified  number  of
  101.        KeyCodes     starting  with     first_keycode.      The symbols for
  102.        KeyCodes outside this range remain unchanged.  The  number
  103.        of elements in keysyms must be:
  104.  
  105.        num_codes * keysyms_per_keycode
  106.  
  107.        The  specified first_keycode must be greater than or equal
  108.        to min_keycode returned by _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s,  or  a  _B_a_d_-
  109.        _V_a_l_u_e  error  results.  In addition, the following expres-
  110.        sion must be less than or equal to max_keycode as returned
  111.        by _X_L_i_s_t_I_n_p_u_t_D_e_v_i_c_e_s, or a _B_a_d_V_a_l_u_e error results:
  112.  
  113.        first_keycode + num_codes - 1
  114.  
  115.        KeySym number N, counting from zero, for KeyCode K has the
  116.        following index in keysyms, counting from zero:
  117.  
  118.        (K - first_keycode) * keysyms_per_keycode + N
  119.  
  120.        The specified keysyms_per_keycode can be chosen    arbitrar-
  121.        ily  by    the client to be large enough to hold all desired
  122.        symbols.     A special KeySym value     of  _N_o_S_y_m_b_o_l  should  be
  123.        used  to     fill in unused elements for individual KeyCodes.
  124.        It is legal for _N_o_S_y_m_b_o_l to appear  in  nontrailing  posi-
  125.        tions  of  the  effective  list for a KeyCode.  _X_C_h_a_n_g_e_D_e_-
  126.        _v_i_c_e_K_e_y_M_a_p_p_i_n_g generates a _D_e_v_i_c_e_M_a_p_p_i_n_g_N_o_t_i_f_y event  that
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.  
  134.  
  135.  
  136. XGetDeviceKeyMapping(3X11) X FUNCTIONS XGetDeviceKeyMapping(3X11)
  137.  
  138.  
  139.        is  sent     to  all  clients that have selected that type of
  140.        event.
  141.  
  142.        There is no requirement that the X server  interpret  this
  143.        mapping.      It  is merely stored for reading and writing by
  144.        clients.
  145.  
  146.        If the specified device does not support input class keys,
  147.        a _B_a_d_M_a_t_c_h error results.
  148.  
  149.        _X_C_h_a_n_g_e_D_e_v_i_c_e_K_e_y_M_a_p_p_i_n_g    can  generate  a  _B_a_d_D_e_v_i_c_e, _B_a_d_-
  150.        _M_a_t_c_h, _B_a_d_A_l_l_o_c, or _B_a_d_V_a_l_u_e  error.
  151.  
  152.  
  153. DDIIAAGGNNOOSSTTIICCSS
  154.        _B_a_d_D_e_v_i_c_e   An invalid device was specified.   The  speci-
  155.            fied     device     does  not  exist or has not been
  156.            opened by this  client  via    _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  157.            This     error    may  also  occur if the specified
  158.            device is the X keyboard or X pointer  device.
  159.  
  160.        _B_a_d_M_a_t_c_h       This     error    may occur if an _X_G_e_t_D_e_v_i_c_e_K_e_y_M_a_p_-
  161.            _p_i_n_g or  _X_C_h_a_n_g_e_D_e_v_i_c_e_K_e_y_M_a_p_p_i_n_g  request  was
  162.            made specifying a device that has no keys.
  163.  
  164.        _B_a_d_V_a_l_u_e       Some     numeric value falls outside the range of
  165.            values accepted by the request.  Unless a spe-
  166.            cific  range is specified for an argument, the
  167.            full range defined by the argument's     type  is
  168.            accepted.   Any  argument  defined as a set of
  169.            alternatives can generate this error.
  170.  
  171.        _B_a_d_A_l_l_o_c       The server failed to     allocate  the    requested
  172.            resource or server memory.
  173.  
  174. SSEEEE AALLSSOO
  175.        XSetDeviceButtonMapping(3X11)
  176.        XSetDeviceModifierMapping(3X11)
  177.        _P_r_o_g_r_a_m_m_i_n_g _w_i_t_h _X_l_i_b
  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.