4 * Read the file COPYING
6 * \author Asger and Juergen
8 * Full author contact details are available in file CREDITS
15 #include <boost/shared_ptr.hpp>
18 * This is a base class for representing a keypress.
19 * Each frontend has to implement this to provide
20 * the functionality that LyX needs in regards to
27 virtual ~LyXKeySym() {}
29 /// Initialize with the name of a key. F. ex. "space" or "a"
30 virtual void init(string const & symbolname) = 0;
32 /// Is this a valid key?
33 virtual bool isOK() const = 0;
35 /// Is this a modifier key only?
36 virtual bool isModifier() const = 0;
38 /// What is the symbolic name of this key? F.ex. "Return" or "c"
39 virtual string getSymbolName() const = 0;
42 * Return the value of the keysym into the local ISO encoding.
43 * This converts the LyXKeySym to a 8-bit encoded character.
44 * This relies on user to use the right encoding.
46 virtual char getISOEncoded() const = 0;
49 * We need to be able to equality compare these for the
50 * sake of the keymap business.
52 virtual bool operator==(LyXKeySym const & k) const = 0;
55 typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;