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