2 /* ======================================================================= *\
3 File : kbmap.h, kbmap.h,v 1.3 1996/12/10 04:35:57 larsbj Exp
4 Author : chb, 30.Oct.1995
6 Purpose: class definitions for XKeyEvent keymap handling
7 \* ==================================================================== */
18 #define KB_PREALLOC 16
22 /// Holds a key sequence and the current and standard keymaps
29 modifiers = staticmod;
36 if (sequence != staticseq) {
42 /** Add a key to the key sequence and look it up in the curmap
43 if the latter is defined. */
44 int addkey(unsigned int key, unsigned int mod, unsigned int nmod = 0);
47 int print(string & buf, bool when_defined = false) const;
50 int printOptions(string & buf) const;
52 /// Make length negative to mark the sequence as deleted
59 unsigned int getsym() const;
65 int parse(char const * s);
67 /// Keymap to use if a new sequence is starting
70 /// Keymap to use for the next key
73 /** Array holding the current key sequence.
74 If sequence[length-1] < 0xff it can be used as ISO8859 char */
75 unsigned int * sequence;
78 unsigned int * modifiers;
80 /// Current length of key sequence
84 /// Static array preallocated for sequence
85 unsigned int staticseq[KB_PREALLOC];
88 unsigned int staticmod[KB_PREALLOC];
90 /// Physically allocated storage size