4 * Copyright 2002 the LyX Team
5 * Read the file COPYING
7 * \author Asger and Juergen
14 #include <boost/shared_ptr.hpp>
17 * This is a base class for representing a keypress.
18 * Each frontend has to implement this to provide
19 * the functionality that LyX needs in regards to
26 virtual ~LyXKeySym() {}
28 /// Initialize with the name of a key. F. ex. "space" or "a"
29 virtual void init(string const & symbolname) = 0;
31 /// Is this a valid key?
32 virtual bool isOK() const = 0;
34 /// Is this a modifier key only?
35 virtual bool isModifier() const = 0;
37 /// What is the symbolic name of this key? F.ex. "Return" or "c"
38 virtual string getSymbolName() const = 0;
41 * Return the value of the keysym into the local ISO encoding.
42 * This converts the LyXKeySym to a 8-bit encoded character.
43 * This relies on user to use the right encoding.
45 virtual char getISOEncoded() const = 0;
48 * We need to be able to equality compare these for the
49 * sake of the keymap business.
51 virtual bool operator==(LyXKeySym const & k) const = 0;
54 typedef boost::shared_ptr<LyXKeySym> LyXKeySymPtr;