summaryrefslogtreecommitdiff
path: root/inputmethods/multikey
authorhash <hash>2002-08-21 17:54:33 (UTC)
committer hash <hash>2002-08-21 17:54:33 (UTC)
commit0a61be3b42b4b152468a5ef2def4a18baeda9b4f (patch) (side-by-side diff)
treeaa82e34a4d4984ae334ffbd31582ac60a655e499 /inputmethods/multikey
parent24ca0a148bdb23f5c890661dc2edac7ba6120c67 (diff)
downloadopie-0a61be3b42b4b152468a5ef2def4a18baeda9b4f.zip
opie-0a61be3b42b4b152468a5ef2def4a18baeda9b4f.tar.gz
opie-0a61be3b42b4b152468a5ef2def4a18baeda9b4f.tar.bz2
ctrl and alt keys should work now
Diffstat (limited to 'inputmethods/multikey') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/configdlg.cpp1
-rw-r--r--inputmethods/multikey/keyboard.cpp8
2 files changed, 8 insertions, 1 deletions
diff --git a/inputmethods/multikey/configdlg.cpp b/inputmethods/multikey/configdlg.cpp
index 89b713e..a9137b9 100644
--- a/inputmethods/multikey/configdlg.cpp
+++ b/inputmethods/multikey/configdlg.cpp
@@ -1,52 +1,53 @@
/*
* TODO
* make a font selection thing (size too)
* make a cursor thing
+ * add meta key support for german, etc
*
*
*
*/
#include <iostream.h>
#include <qpe/qpeapplication.h>
#include <qpe/config.h>
#include <qwidget.h>
#include <qdialog.h>
#include <qtabwidget.h>
#include <qvbox.h>
#include <qgrid.h>
#include <qgroupbox.h>
#include <qlabel.h>
#include <qcheckbox.h>
#include <qsizepolicy.h>
#include <qpushbutton.h>
#include <qlistbox.h>
#include <qstringlist.h>
#include <opie/ofiledialog.h>
#include <opie/colordialog.h>
#include <qdir.h>
#include <qfileinfo.h>
#include "configdlg.h"
#include "keyboard.h"
// ConfigDlg::ConfigDlg() {{{1
ConfigDlg::ConfigDlg () : QTabWidget ()
{
setCaption( tr("Multikey Configuration") );
Config config ("multikey");
config.setGroup("keymaps");
QString current_map = config.readEntry("current", 0);
/*
* 'general config' tab
*/
QVBox *gen_box = new QVBox (this);
gen_box->setMargin(3);
addTab(gen_box, tr("General Settings"));
QGroupBox *map_group = new QGroupBox (2, Qt::Vertical, tr("Keymap File"), gen_box);
keymaps = new QListBox (map_group);
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index 7334c1c..949164a 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -313,97 +313,103 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
need_repaint = TRUE;
if (shift) {
*shift = 0;
shift = 0;
}
else {
shift = keys->pressedPtr(row, col);
*shift = 1;
if (lock) {
*lock = 0;
lock = 0;
}
}
} else if (qkeycode == Qt::Key_CapsLock) {
need_repaint = TRUE;
if (lock) {
*lock = 0;
lock = 0;
}
else {
lock = keys->pressedPtr(row, col);;
*lock = 1;
if (shift) {
*shift = 0;
shift = 0;
}
}
}
}
else { // normal char
if ((shift || lock) && keys->shift(unicode)) {
unicode = keys->shift(unicode);
}
}
// korean parsing
if (keys->lang == "ko") {
unicode = parseKoreanInput(unicode);
}
modifiers = (ctrl ? Qt::ControlButton : 0) | (alt ? Qt::AltButton : 0);
- emit key(unicode, qkeycode, modifiers, true, false);
+ if ('A' <= unicode && unicode <= 'z' && modifiers) {
+
+ qkeycode = QChar(unicode).upper();
+ unicode = qkeycode - '@';
+ }
+
+ QWSServer::sendKeyEvent(unicode, qkeycode, modifiers, true, false);
// pickboard stuff
if (usePicks) {
KeyboardConfig *dc = picks->dc;
if (dc) {
if (qkeycode == Qt::Key_Backspace) {
dc->input.remove(dc->input.last()); // remove last input
dc->decBackspaces();
} else if ( qkeycode == Qt::Key_Return || QChar(unicode).isPunct() || QChar(unicode).isSpace() || unicode == 0) {
dc->input.clear();
dc->resetBackspaces();
} else {
dc->add(QString(QChar(unicode)));
dc->incBackspaces();
}
}
picks->repaint();
}
// painting
pressed = TRUE;
pressedKeyRow = row;
pressedKeyCol = col;
if (need_repaint) repaint(FALSE);
else { // just paint the one key pressed
QPainter p(this);
drawKeyboard(p, row, col);
}
if (useRepeat) repeatTimer->start( 800 );
//pressTid = startTimer(80);
}
/* Keyboard::mouseReleaseEvent {{{1 */
void Keyboard::mouseReleaseEvent(QMouseEvent*)
{
pressed = FALSE;