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

  1.  
  2.  
  3.  
  4. XGetDeviceModifierMapping(3XX11F)UNCTIXOGNeStDeviceModifierMapping(3X11)
  5.  
  6.  
  7. NNAAMMEE
  8.        XGetDeviceModifierMapping,   XSetDeviceModifierMapping    -
  9.        query or change device modifier mappings
  10.  
  11. SSYYNNTTAAXX
  12.        XXSSeettDDeevviicceeMMooddiiffiieerrMMaappppiinngg((_d_i_s_p_l_a_y,, _d_e_v_i_c_e,, _m_o_d_m_a_p))
  13.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  14.          XXDDeevviiccee **_d_e_v_i_c_e;;
  15.          XXMMooddiiffiieerrKKeeyymmaapp  **_m_o_d_m_a_p;;
  16.  
  17.        XXMMooddiiffiieerrKKeeyymmaapp **XXGGeettDDeevviicceeMMooddiiffiieerrMMaappppiinngg((_d_i_s_p_l_a_y,, _d_e_v_i_c_e))
  18.          DDiissppllaayy **_d_i_s_p_l_a_y;;
  19.          XXDDeevviiccee **_d_e_v_i_c_e;;
  20.  
  21.  
  22. AARRGGUUMMEENNTTSS
  23.        _d_i_s_p_l_a_y       Specifies the connection to the X server.
  24.  
  25.        _d_e_v_i_c_e       Specifies the device whose modifier mapping is
  26.            to be queried or modified.
  27.  
  28.        _m_o_d_m_a_p       Specifies  a     pointer  to  the _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p
  29.            structure.
  30.  
  31. DDEESSCCRRIIPPTTIIOONN
  32.        The _X_S_e_t_D_e_v_i_c_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g request specifies    the  Key-
  33.        Codes  of  the  keys (if any) that are to be used as modi-
  34.        fiers for the specified device.    If  it    succeeds,  the    X
  35.        server  generates a _D_e_v_i_c_e_M_a_p_p_i_n_g_N_o_t_i_f_y event, and _X_S_e_t_D_e_-
  36.        _v_i_c_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g returns _M_a_p_p_i_n_g_S_u_c_c_e_s_s.  X permits  at
  37.        most  eight  modifier keys.  If more than eight are speci-
  38.        fied in the _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure, a     _B_a_d_L_e_n_g_t_h  error
  39.        results.
  40.  
  41.        The  modifiermap     member     of the _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure
  42.        contains eight sets of  max_keypermod  KeyCodes,     one  for
  43.        each  modifier  in  the    order _S_h_i_f_t, _L_o_c_k, _C_o_n_t_r_o_l, _M_o_d_1,
  44.        _M_o_d_2, _M_o_d_3, _M_o_d_4, and _M_o_d_5.  Only  nonzero  KeyCodes  have
  45.        meaning    in  each  set, and zero KeyCodes are ignored.  In
  46.        addition, all of the nonzero KeyCodes must be in the range
  47.        specified  by  min_keycode  and max_keycode as returned by
  48.        _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.     No  Key-
  49.        Code  may  appear  twice     in the entire map, or a _B_a_d_V_a_l_u_e
  50.        error results.
  51.  
  52.        An X server can impose restrictions on how  modifiers  can
  53.        be  changed,  for example, if certain keys do not generate
  54.        up transitions in hardware, if auto-repeat cannot be  dis-
  55.        abled  on  certain  keys, or if multiple modifier keys are
  56.        not supported.  If some such restriction is violated,  the
  57.        status  reply  is _M_a_p_p_i_n_g_F_a_i_l_e_d, and none of the modifiers
  58.        are changed.  If the new KeyCodes specified for a modifier
  59.        differ  from  those  currently defined and any (current or
  60.        new) keys for that modifier  are     in  the  logically  down
  61.  
  62.  
  63.  
  64. X Version 11           Release 6.1                1
  65.  
  66.  
  67.  
  68.  
  69.  
  70. XGetDeviceModifierMapping(3XX11F)UNCTIXOGNeStDeviceModifierMapping(3X11)
  71.  
  72.  
  73.        state,  _X_S_e_t_D_e_v_i_c_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g returns _M_a_p_p_i_n_g_B_u_s_y, and
  74.        none of the modifiers is changed.
  75.  
  76.        _X_S_e_t_D_e_v_i_c_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g can generate _B_a_d_L_e_n_g_t_h_P_,  _B_a_d_D_e_-
  77.        _v_i_c_e_, _B_a_d_M_a_t_c_h_, _B_a_d_A_l_l_o_c_, _a_n_d _B_a_d_V_a_l_u_e _e_r_r_o_r_s_.
  78.  
  79.        The _X_G_e_t_D_e_v_i_c_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g request returns a pointer to
  80.        a newly created _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p    structure  that     contains
  81.        the keys being used as modifiers.  The structure should be
  82.        freed after use by calling _X_F_r_e_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g .  If only
  83.        zero values appear in the set for any modifier, that modi-
  84.        fier is disabled.
  85.  
  86.        _X_G_e_t_D_e_v_i_c_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g can generate _B_a_d_D_e_v_i_c_e and  _B_a_d_-
  87.        _M_a_t_c_h errors.
  88.  
  89. SSTTRRUUCCTTUURREESS
  90.        The _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure contains:
  91.  
  92.        typedef struct {
  93.         int max_keypermod;
  94.         KeyCode *modifiermap;
  95.        } XModifierKeymap;
  96.  
  97.  
  98. DDIIAAGGNNOOSSTTIICCSS
  99.        _B_a_d_L_e_n_g_t_h   More     than  eight  keys  were specified in the
  100.            _X_M_o_d_i_f_i_e_r_K_e_y_m_a_p structure.
  101.  
  102.        _B_a_d_A_l_l_o_c       The server failed to     allocate  the    requested
  103.            resource or server memory.
  104.  
  105.        _B_a_d_D_e_v_i_c_e   An  invalid    device was specified.  The speci-
  106.            fied device does not exist  or  has    not  been
  107.            opened  by  this  client via _X_O_p_e_n_I_n_p_u_t_D_e_v_i_c_e.
  108.            This error may also    occur  if  the    specified
  109.            device  is the X keyboard or X pointer device.
  110.  
  111.        _B_a_d_M_a_t_c_h       This error may  occur  if  an  _X_G_e_t_D_e_v_i_c_e_M_o_d_i_-
  112.            _f_i_e_r_M_a_p_p_i_n_g     or  _X_C_h_a_n_g_e_D_e_v_i_c_e_M_o_d_i_f_i_e_r_M_a_p_p_i_n_g
  113.            request was made specifying a device that  has
  114.            no keys.
  115.  
  116.        _B_a_d_V_a_l_u_e       Some     numeric value falls outside the range of
  117.            values accepted by the request.  Unless a spe-
  118.            cific  range is specified for an argument, the
  119.            full range defined by the argument's     type  is
  120.            accepted.   Any  argument  defined as a set of
  121.            alternatives can generate this error.
  122.  
  123. SSEEEE AALLSSOO
  124.        XSetDeviceKeyMapping(3X11)
  125.        XSetDeviceButtonMapping(3X11)
  126.        _P_r_o_g_r_a_m_m_i_n_g _W_i_t_h _X_l_i_b
  127.  
  128.  
  129.  
  130. X Version 11           Release 6.1                2
  131.  
  132.  
  133.