summaryrefslogtreecommitdiff
Unidiff
Diffstat (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,36 +1,37 @@
1/* 1/*
2 * TODO 2 * TODO
3 * make a font selection thing (size too) 3 * make a font selection thing (size too)
4 * make a cursor thing 4 * make a cursor thing
5 * add meta key support for german, etc
5 * 6 *
6 * 7 *
7 * 8 *
8 */ 9 */
9 10
10#include <iostream.h> 11#include <iostream.h>
11 12
12#include <qpe/qpeapplication.h> 13#include <qpe/qpeapplication.h>
13#include <qpe/config.h> 14#include <qpe/config.h>
14 15
15#include <qwidget.h> 16#include <qwidget.h>
16#include <qdialog.h> 17#include <qdialog.h>
17#include <qtabwidget.h> 18#include <qtabwidget.h>
18#include <qvbox.h> 19#include <qvbox.h>
19#include <qgrid.h> 20#include <qgrid.h>
20#include <qgroupbox.h> 21#include <qgroupbox.h>
21#include <qlabel.h> 22#include <qlabel.h>
22#include <qcheckbox.h> 23#include <qcheckbox.h>
23#include <qsizepolicy.h> 24#include <qsizepolicy.h>
24#include <qpushbutton.h> 25#include <qpushbutton.h>
25#include <qlistbox.h> 26#include <qlistbox.h>
26#include <qstringlist.h> 27#include <qstringlist.h>
27#include <opie/ofiledialog.h> 28#include <opie/ofiledialog.h>
28#include <opie/colordialog.h> 29#include <opie/colordialog.h>
29#include <qdir.h> 30#include <qdir.h>
30#include <qfileinfo.h> 31#include <qfileinfo.h>
31#include "configdlg.h" 32#include "configdlg.h"
32#include "keyboard.h" 33#include "keyboard.h"
33 34
34// ConfigDlg::ConfigDlg() {{{1 35// ConfigDlg::ConfigDlg() {{{1
35ConfigDlg::ConfigDlg () : QTabWidget () 36ConfigDlg::ConfigDlg () : QTabWidget ()
36{ 37{
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
@@ -329,65 +329,71 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
329 need_repaint = TRUE; 329 need_repaint = TRUE;
330 330
331 if (lock) { 331 if (lock) {
332 *lock = 0; 332 *lock = 0;
333 lock = 0; 333 lock = 0;
334 } 334 }
335 else { 335 else {
336 lock = keys->pressedPtr(row, col);; 336 lock = keys->pressedPtr(row, col);;
337 *lock = 1; 337 *lock = 1;
338 if (shift) { 338 if (shift) {
339 *shift = 0; 339 *shift = 0;
340 shift = 0; 340 shift = 0;
341 } 341 }
342 } 342 }
343 343
344 } 344 }
345 345
346 } 346 }
347 else { // normal char 347 else { // normal char
348 if ((shift || lock) && keys->shift(unicode)) { 348 if ((shift || lock) && keys->shift(unicode)) {
349 unicode = keys->shift(unicode); 349 unicode = keys->shift(unicode);
350 } 350 }
351 } 351 }
352 352
353 // korean parsing 353 // korean parsing
354 if (keys->lang == "ko") { 354 if (keys->lang == "ko") {
355 355
356 unicode = parseKoreanInput(unicode); 356 unicode = parseKoreanInput(unicode);
357 } 357 }
358 358
359 modifiers = (ctrl ? Qt::ControlButton : 0) | (alt ? Qt::AltButton : 0); 359 modifiers = (ctrl ? Qt::ControlButton : 0) | (alt ? Qt::AltButton : 0);
360 360
361 emit key(unicode, qkeycode, modifiers, true, false); 361 if ('A' <= unicode && unicode <= 'z' && modifiers) {
362
363 qkeycode = QChar(unicode).upper();
364 unicode = qkeycode - '@';
365 }
366
367 QWSServer::sendKeyEvent(unicode, qkeycode, modifiers, true, false);
362 368
363 // pickboard stuff 369 // pickboard stuff
364 if (usePicks) { 370 if (usePicks) {
365 371
366 KeyboardConfig *dc = picks->dc; 372 KeyboardConfig *dc = picks->dc;
367 373
368 if (dc) { 374 if (dc) {
369 if (qkeycode == Qt::Key_Backspace) { 375 if (qkeycode == Qt::Key_Backspace) {
370 dc->input.remove(dc->input.last()); // remove last input 376 dc->input.remove(dc->input.last()); // remove last input
371 dc->decBackspaces(); 377 dc->decBackspaces();
372 } else if ( qkeycode == Qt::Key_Return || QChar(unicode).isPunct() || QChar(unicode).isSpace() || unicode == 0) { 378 } else if ( qkeycode == Qt::Key_Return || QChar(unicode).isPunct() || QChar(unicode).isSpace() || unicode == 0) {
373 dc->input.clear(); 379 dc->input.clear();
374 dc->resetBackspaces(); 380 dc->resetBackspaces();
375 } else { 381 } else {
376 dc->add(QString(QChar(unicode))); 382 dc->add(QString(QChar(unicode)));
377 dc->incBackspaces(); 383 dc->incBackspaces();
378 } 384 }
379 } 385 }
380 picks->repaint(); 386 picks->repaint();
381 } 387 }
382 388
383 389
384 // painting 390 // painting
385 pressed = TRUE; 391 pressed = TRUE;
386 392
387 pressedKeyRow = row; 393 pressedKeyRow = row;
388 pressedKeyCol = col; 394 pressedKeyCol = col;
389 395
390 if (need_repaint) repaint(FALSE); 396 if (need_repaint) repaint(FALSE);
391 else { // just paint the one key pressed 397 else { // just paint the one key pressed
392 398
393 399