22 #ifndef FIFE_EVENTCHANNEL_KEYEVENT_H
23 #define FIFE_EVENTCHANNEL_KEYEVENT_H
36 #include "eventchannel/base/ec_inputevent.h"
37 #include "eventchannel/source/ec_ieventsource.h"
58 m_isnumericpad(false),
65 KeyEventType getType()
const {
return m_eventtype; }
66 void setType(KeyEventType type) { m_eventtype = type; }
68 bool isNumericPad()
const {
return m_isnumericpad; }
69 void setNumericPad(
bool ispad) { m_isnumericpad = ispad; }
71 const Key& getKey()
const {
return m_key; }
72 void setKey(
const Key& key) { m_key = key; }
75 virtual void setAltPressed(
bool pressed) { InputEvent::setAltPressed(pressed); }
77 virtual void setControlPressed(
bool pressed) { InputEvent::setControlPressed(pressed); }
79 virtual void setMetaPressed(
bool pressed) { InputEvent::setMetaPressed(pressed); }
81 virtual void setShiftPressed(
bool pressed) { InputEvent::setShiftPressed(pressed); }
86 virtual bool isConsumedByWidgets()
const {
return InputEvent::isConsumedByWidgets(); }
87 virtual IEventSource* getSource() {
return InputEvent::getSource(); }
92 virtual const std::string&
getName()
const {
93 const static std::string eventName(
"KeyEvent");
99 KeyEventType m_eventtype;