summaryrefslogtreecommitdiff
path: root/noncore/apps/keyz-cfg/zkb.cpp
Side-by-side diff
Diffstat (limited to 'noncore/apps/keyz-cfg/zkb.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/apps/keyz-cfg/zkb.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/noncore/apps/keyz-cfg/zkb.cpp b/noncore/apps/keyz-cfg/zkb.cpp
index c9e1dc5..a357b88 100644
--- a/noncore/apps/keyz-cfg/zkb.cpp
+++ b/noncore/apps/keyz-cfg/zkb.cpp
@@ -1,16 +1,17 @@
#include "zkb.h"
/* OPIE */
#include <opie2/odebug.h>
+#include <opie2/okeyfilter.h>
#include <stdio.h>
// Implementation of Action class
Action::Action():state(0), keycode(0), unicode(0), flags(0) {
}
Action::Action(State* s, ushort kc, ushort uni, int f):
state(s), keycode(kc), unicode(uni), flags(f) {
}
Action::~Action() {
@@ -237,24 +238,26 @@ int State::translateKeycode(int keycode) const {
return -1;
}
// Implementation of Keymap class
Keymap::Keymap():enabled(true), currentState(0), autoRepeatAction(0), repeater(this) {
repeatDelay=400;
repeatPeriod=80;
connect(&repeater, SIGNAL(timeout()), this, SLOT(autoRepeat()));
}
Keymap::~Keymap() {
+ odebug << "removing keyboard filter for zkb"<<oendl;
+ Opie::Core::OKeyFilter::inst()->remHandler(this);
QMap<QString, State*>::Iterator it;
for(it = states.begin(); it != states.end(); ++it) {
delete it.data();
}
states.clear();
}
bool Keymap::filter(int unicode, int keycode, int modifiers,
bool isPress, bool autoRepeat) {
odebug << "filter: >>> unicode=" << unicode << ", keycode=" << keycode
<< ", modifiers=" << modifiers << ", ispressed=" << isPress << oendl;