4 * This file is part of LyX, the document processor.
5 * Licence details can be found in the file COPYING.
7 * \author Asger and Juergen
9 * Full author contact details are available in file CREDITS
16 #include <boost/shared_ptr.hpp>
19 * This is a base class for representing a keypress.
20 * Each frontend has to implement this to provide
21 * the functionality that LyX needs in regards to
28 virtual ~LyXKeySym() {}
30 /// Initialize with the name of a key. F. ex. "space" or "a"
31 virtual void init(string const & symbolname) = 0;
33 /// Is this a valid key?
34 virtual bool isOK() const = 0;
36 /// Is this a modifier key only?
37 virtual bool isModifier() const = 0;
39 /// What is the symbolic name of this key? F.ex. "Return" or "c"
40 virtual string getSymbolName() const = 0;
43 * Return the value of the keysym into the local ISO encoding.
44 * This converts the LyXKeySym to a 8-bit encoded character.
45 * This relies on user to use the right encoding.
47 virtual char getISOEncoded() const = 0;
50 * We need to be able to equality compare these for the
51 * sake of the keymap business.
53 virtual bool operator==(LyXKeySym const & k) const = 0;
56 typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;