1 /* 2 xrus - keyboard switcher/indicator 3 Copyright (c) 1996 Alexander V. Lukyanov 4 This is free software with no warranty. 5 See COPYING for details. 6 */ 7 8 struct KeyCombination 9 { 10 int KeysNum; /* Number of keys in this combination */ 11 KeySym Keys[4]; /* KeySyms of the combinations */ 12 int KeysPressed; /* Bit mask of pressed keys */ 13 int KeysArmed; /* Flag indicating that the combination is armed 14 and will fire upon release of any of the keys */ 15 void (*Fire)(void); /* Callback */ 16 }; 17 18 void ParseKeyCombination(const char *str,struct KeyCombination *kc,char *err); 19 void KeyCombinationProcessKeyPress(struct KeyCombination *kc,KeySym ks); 20 int KeyCombinationProcessKeyRelease(struct KeyCombination *kc,KeySym ks,int fire); 21 void PrintParseErrors(const char *resource,char *err); 22