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 \* ==================================================================== */
22 /// Defines key maps and actions for key sequences
28 /** Bind a key-sequence to an action.
29 Returns 0 on success. Otherwise, position in string where
31 int bind(char const * seq, int action);
34 void print(string & buf) const;
36 /// Look up a key in the keymap
37 int lookup(unsigned int key,
38 unsigned int mod, kb_sequence * seq) const;
40 /// Given an action, find all keybindings.
41 string findbinding(int action) const;
51 /// Keymap for prefix keys
54 /// Action for !prefix keys
59 /// Define a new key sequence
60 int defkey(kb_sequence * seq, int action, int idx = 0);
62 static string keyname(kb_key const & k);
66 void printKey(kb_key const & key, string & buf);
72 typedef std::list<kb_key> Table;