From f8744f9a9a59f7968ddbac66c927ba8da358f223 Mon Sep 17 00:00:00 2001 From: harlekin Date: Sat, 16 Feb 2002 02:00:41 +0000 Subject: Quick and dirty fix for the sticky keyboard problem on ipaq - just turn it off. Turned on on zaurus --- (limited to 'inputmethods/keyboard') diff --git a/inputmethods/keyboard/keyboard.cpp b/inputmethods/keyboard/keyboard.cpp index 9dd24e4..233f08e 100644 --- a/inputmethods/keyboard/keyboard.cpp +++ b/inputmethods/keyboard/keyboard.cpp @@ -28,6 +28,8 @@ #include #include +#include + #define USE_SMALL_BACKSPACE @@ -49,7 +51,19 @@ Keyboard::Keyboard(QWidget* parent, const char* name, WFlags f) : this, SIGNAL(key(ushort,ushort,ushort,bool,bool)) ); repeatTimer = new QTimer( this ); - connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); + + // temporary quick and dirty fix for the "sticky keyboard bug" + // on ipaq. + struct utsname name; + if (uname(&name) != -1) + { + QString release=name.release; + qWarning("System release: %s\n", name.release); + if(release.find("embedix",0,TRUE) !=-1) + { + connect( repeatTimer, SIGNAL(timeout()), this, SLOT(repeat()) ); + } + } } void Keyboard::resizeEvent(QResizeEvent*) @@ -761,8 +775,9 @@ void Keyboard::timerEvent(QTimerEvent* e) void Keyboard::repeat() { - repeatTimer->start( 150 ); - emit key( unicode, qkeycode, modifiers, true, true ); + + repeatTimer->start( 200 ); + emit key( unicode, qkeycode, modifiers, true, true ); } void Keyboard::clearHighlight() -- cgit v0.9.0.2