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 \* ==================================================================== */
17 #include <boost/smart_ptr.hpp>
23 /// Defines key maps and actions for key sequences
26 /** Bind a key-sequence to an action.
27 Returns 0 on success. Otherwise, position in string where
29 int bind(string const & seq, int action);
32 void print(string & buf) const;
34 /// Look up a key in the keymap
35 int lookup(unsigned int key,
36 unsigned int mod, kb_sequence * seq) const;
38 /// Given an action, find all keybindings.
39 string const findbinding(int action) const;
49 /// Keymap for prefix keys
50 boost::shared_ptr<kb_keymap> table;
52 /// Action for !prefix keys
57 /// Define a new key sequence
58 int defkey(kb_sequence * seq, int action, int idx = 0);
60 static string const keyname(kb_key const & k);
64 void printKey(kb_key const & key, string & buf);
70 typedef std::list<kb_key> Table;