Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

NAME

XInsertModifiermapEntry − add a new entry to an XModifierKeymap structure. 

Synopsis

XModifierKeymap *XInsertModifiermapEntry(modmap,

keycode_entry, modifier)
     XModifierKeymap *modmap;
     KeyCode keycode_entry;
     int modifier;

Arguments

modmapSpecifies a pointer to an XModifierKeymap() structure. 

keycode_entry
Specifies the keycode of the key to be added to modmap. 

modifierSpecifies the modifier you want mapped to the keycode specified in keycode_entry.  This should be one of the constants:  Shift­Map­Index, Lock­Map­Index, Control­Map­Index, Mod1­Map­Index, Mod2­Map­Index, Mod3­Map­Index, Mod4­Map­Index, or Mod5­Map­Index. 

Description

XInsertModifiermapEntry() returns an XModifierKeymap() structure suitable for calling XSetModifierMapping(), in which the specified keycode is deleted from the set of keycodes that is mapped to the specified modifier (like Shift or Control).  XInsertModifiermapEntry() does not change the mapping itself.  This function is normally used by calling XGetModifierMapping() to get a pointer to the current XModifierKeymap() structure for use as the modmap argument to XInsertModifiermapEntry().  Note that the structure pointed to by modmap is freed by XInsertModifiermapEntry().  It should not be freed or otherwise used by applications.  For a description of the modifier map, see XSetModifierMapping(). 

Structures

typedef struct {
int max_keypermod;/* server’s max number of keys per modifier */
KeyCode *modifiermap;/* an 8 by max_keypermod array of
* keycodes to be used as modifiers */
} XModifierKeymap;
 #define ShiftMapIndex0
#define LockMapIndex1
#define ControlMapIndex2
#define Mod1MapIndex3
#define Mod2MapIndex4
#define Mod3MapIndex5
#define Mod4MapIndex6
#define Mod5MapIndex7

See Also

XDeleteModifiermapEntry(), XFreeModifiermap(), XGetKeyboardMapping(), XGetModifierMapping(), XKeycodeToKeysym(), XKeysymToKeycode(), XKeysymToString(), XLookupKeysym(), XLookupString(), XNewModifierMap, XQueryKeymap(), XRebindKeySym, XRefreshKeyboardMapping(), XSetModifierMapping(), XStringToKeysym(). 

Copyright O’Reilly & Assoc.  —  

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026