XkbResizeKeyActions - Change the number of actions bound to a key


XkbAction * XkbResizeKeyActions (XkbDescRec * xkb , int key , int needed );


  • - xkb
        keyboard description to change
  • - key
        keycode of key to change
  • - needed
        new number of actions required


The xkbparameter points to the keyboard description containing the keywhose number of actions is to be changed. The keyparameter is the keycode of the key to change, and needed specifies the new number of actions required for the key. XkbResizeKeyActionsreserves the space needed for the actions and returns a pointer to the beginning of the new array that holds the actions. It can change the acts, num_acts,and size_actsfields of xkb->serverif it is necessary to reallocate the actsarray. If neededis greater than the current number of keysyms for the key, XkbResizeKeyActionsinitializes all new actions in the array to NoAction. Because the number of actions needed by a key is normally computed as width * number of groups, and XkbResizeKeyActionsdoes not modify either the width or number of groups for the key, a discrepancy exists on return from XkbResizeKeyActionsbetween the space allocated for the actions and the number required. The unused entries in the list of actions returned by XkbResizeKeyActionsare not preserved across future calls to any of the map editing functions, so you must update the key actions (which updates the width and number of groups for the key) before calling another allocator function. A call to XkbChangeTypesOfKeyupdates these. If any allocation errors occur while resizing the number of actions bound to the key, XkbResizeKeyActionsreturns NULL.


R XkbChangeTypesOfKey (3),

R XkbResizeKeySyms (3)


A change to the number of actions bound to a key should be accompanied by a change in the number of symbols bound to a key. Refer to XkbResizeKeySymsfor more information on changing the number of symbols bound to a key.