summaryrefslogtreecommitdiff
path: root/inputmethods/multikey/keyboard.cpp
Unidiff
Diffstat (limited to 'inputmethods/multikey/keyboard.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--inputmethods/multikey/keyboard.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/inputmethods/multikey/keyboard.cpp b/inputmethods/multikey/keyboard.cpp
index 08318bd..84c0c74 100644
--- a/inputmethods/multikey/keyboard.cpp
+++ b/inputmethods/multikey/keyboard.cpp
@@ -361,13 +361,13 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
361 qkeycode = 0x2000; 361 qkeycode = 0x2000;
362 } 362 }
363 } 363 }
364 364
365 // Back accent character support 365 // Back accent character support
366 366
367 //if (unicode == 0x60) { // the keys from 2c6 ~ 2cf should be used instead of the ascii one 367 // the keys from 2c6 ~ 2cf should be used instead of the ascii one
368 if (unicode == 0x2cb) { 368 if (unicode == 0x2cb) {
369 369
370 unicode = 0; 370 unicode = 0;
371 if (shift || lock) { 371 if (shift || lock) {
372 372
373 // circumblex 373 // circumblex
@@ -379,13 +379,12 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
379 qkeycode = 0x2002; 379 qkeycode = 0x2002;
380 } 380 }
381 } 381 }
382 382
383 // Accent character support 383 // Accent character support
384 384
385 //if (unicode == 0xb4) {
386 if (unicode == 0x2ca) { 385 if (unicode == 0x2ca) {
387 386
388 unicode = 0; 387 unicode = 0;
389 if (shift || lock) { 388 if (shift || lock) {
390 389
391 // diaeresis 390 // diaeresis
@@ -522,14 +521,14 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
522 521
523 // reset all the other keys 522 // reset all the other keys
524 if (shift) { *shift = 0; shift = 0; } 523 if (shift) { *shift = 0; shift = 0; }
525 if (lock) { *lock = 0; lock = 0; } 524 if (lock) { *lock = 0; lock = 0; }
526 if (circumflex) { *circumflex = 0; circumflex = 0; } 525 if (circumflex) { *circumflex = 0; circumflex = 0; }
527 if (diaeresis) { *diaeresis = 0; diaeresis = 0; } 526 if (diaeresis) { *diaeresis = 0; diaeresis = 0; }
528 if (baccent) { *baccent = 0; baccent = 0; } 527 if (baccent) { *baccent = 0; baccent = 0; }
529 if (accent) { *accent = 0; accent = 0; } 528 if (accent) { *accent = 0; accent = 0; }
530 529
531 // dont need to emit this key... acts same as alt 530 // dont need to emit this key... acts same as alt
532 qkeycode = 0; 531 qkeycode = 0;
533 532
534 // circumflex 533 // circumflex
535 } else if (qkeycode == 0x2000) { 534 } else if (qkeycode == 0x2000) {
@@ -622,13 +621,13 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
622 *baccent = true; 621 *baccent = true;
623 } 622 }
624 623
625 624
626 if (shift) { *shift = 0; shift = 0; } 625 if (shift) { *shift = 0; shift = 0; }
627 if (meta) { *meta = 0; meta = 0; } 626 if (meta) { *meta = 0; meta = 0; }
628 if (accent) { *accent = 0; accent = 0; } 627 if (accent) { *accent = 0; accent = 0; }
629 628
630 qkeycode = 0; 629 qkeycode = 0;
631 630
632 // Accent 631 // Accent
633 } else if (qkeycode == 0x2003) { 632 } else if (qkeycode == 0x2003) {
634 need_repaint = TRUE; 633 need_repaint = TRUE;
@@ -644,13 +643,13 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
644 *accent = true; 643 *accent = true;
645 } 644 }
646 645
647 646
648 if (shift) { *shift = 0; shift = 0; } 647 if (shift) { *shift = 0; shift = 0; }
649 if (meta) { *meta = 0; meta = 0; } 648 if (meta) { *meta = 0; meta = 0; }
650 if (baccent) { *baccent = 0; } 649 if (baccent) { *baccent = 0; }
651 650
652 qkeycode = 0; 651 qkeycode = 0;
653 } 652 }
654 653
655 } 654 }
656 else { // normal char 655 else { // normal char
@@ -660,13 +659,13 @@ void Keyboard::mousePressEvent(QMouseEvent *e)
660 // diaeresis/circumflex chars 659 // diaeresis/circumflex chars
661 660
662 if (circumflex && keys->circumflex(keys->shift(unicode))) 661 if (circumflex && keys->circumflex(keys->shift(unicode)))
663 unicode = keys->circumflex(keys->shift(unicode)); 662 unicode = keys->circumflex(keys->shift(unicode));
664 else if (diaeresis && keys->diaeresis(keys->shift(unicode))) 663 else if (diaeresis && keys->diaeresis(keys->shift(unicode)))
665 unicode = keys->diaeresis(keys->shift(unicode)); 664 unicode = keys->diaeresis(keys->shift(unicode));
666 else if (baccent && keys->baccent(keys->shift(unicode))) 665 else if (baccent && keys->baccent(keys->shift(unicode)))
667 unicode = keys->baccent(keys->shift(unicode)); 666 unicode = keys->baccent(keys->shift(unicode));
668 else if (accent && keys->accent(keys->shift(unicode))) 667 else if (accent && keys->accent(keys->shift(unicode)))
669 unicode = keys->accent(keys->shift(unicode)); 668 unicode = keys->accent(keys->shift(unicode));
670 else if (meta && keys->meta(keys->shift(unicode))) 669 else if (meta && keys->meta(keys->shift(unicode)))
671 unicode = keys->meta(keys->shift(unicode)); 670 unicode = keys->meta(keys->shift(unicode));
672 else 671 else
@@ -772,12 +771,19 @@ void Keyboard::mouseReleaseEvent(QMouseEvent*)
772 771
773 *ctrl = 0; 772 *ctrl = 0;
774 ctrl = 0; 773 ctrl = 0;
775 repaint(FALSE); 774 repaint(FALSE);
776 775
777 } 776 }
777 if (alt && alt != 0) {
778
779 *alt = 0;
780 alt = 0;
781 repaint(FALSE);
782
783 }
778 784
779 /* 785 /*
780 * do not make the meta key release after being pressed 786 * do not make the meta key release after being pressed
781 * 787 *
782 788
783 else if (meta && unicode != 0) { 789 else if (meta && unicode != 0) {