-rw-r--r-- | libopie/odevice.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index 75426f9..80e9a91 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -507,68 +507,68 @@ bool iPAQ::setLedState ( OLed l, OLedState st ) | |||
507 | //return vl; | 507 | //return vl; |
508 | //} | 508 | //} |
509 | 509 | ||
510 | bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) | 510 | bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, bool autoRepeat ) |
511 | { | 511 | { |
512 | int newkeycode = keycode; | 512 | int newkeycode = keycode; |
513 | 513 | ||
514 | 514 | ||
515 | // simple susbstitutions | 515 | // simple susbstitutions |
516 | switch ( d-> m_model ) { | 516 | switch ( d-> m_model ) { |
517 | case Model_iPAQ_H38xx: | 517 | case Model_iPAQ_H38xx: |
518 | // H38xx has no "Q" key anymore - this is now the Mail key | 518 | // H38xx has no "Q" key anymore - this is now the Mail key |
519 | if ( keycode == HardKey_Menu ) | 519 | if ( keycode == HardKey_Menu ) |
520 | newkeycode = HardKey_Mail; | 520 | newkeycode = HardKey_Mail; |
521 | //nobreak | 521 | //nobreak |
522 | 522 | ||
523 | case Model_iPAQ_H31xx: | 523 | case Model_iPAQ_H31xx: |
524 | // Rotate cursor keys 180° | 524 | // Rotate cursor keys 180° |
525 | switch ( keycode ) { | 525 | switch ( keycode ) { |
526 | case Key_Left : newkeycode = Key_Right; break; | 526 | case Key_Left : newkeycode = Key_Right; break; |
527 | case Key_Right: newkeycode = Key_Left; break; | 527 | case Key_Right: newkeycode = Key_Left; break; |
528 | case Key_Up : newkeycode = Key_Down; break; | 528 | case Key_Up : newkeycode = Key_Down; break; |
529 | case Key_Down : newkeycode = Key_Up; break; | 529 | case Key_Down : newkeycode = Key_Up; break; |
530 | } | 530 | } |
531 | break; | 531 | //nobreak; |
532 | 532 | ||
533 | case Model_iPAQ_H36xx: | 533 | case Model_iPAQ_H36xx: |
534 | case Model_iPAQ_H37xx: | 534 | case Model_iPAQ_H37xx: |
535 | // map Power Button short/long press to F34/F35 | 535 | // map Power Button short/long press to F34/F35 |
536 | if ( keycode == Key_SysReq ) { | 536 | if ( keycode == Key_SysReq ) { |
537 | if ( isPress ) { | 537 | if ( isPress ) { |
538 | if ( m_power_timer ) | 538 | if ( m_power_timer ) |
539 | killTimer ( m_power_timer ); | 539 | killTimer ( m_power_timer ); |
540 | m_power_timer = startTimer ( 500 ); | 540 | m_power_timer = startTimer ( 500 ); |
541 | } | 541 | } |
542 | else if ( m_power_timer ) { | 542 | else if ( m_power_timer ) { |
543 | killTimer ( m_power_timer ); | 543 | killTimer ( m_power_timer ); |
544 | m_power_timer = 0; | 544 | m_power_timer = 0; |
545 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); | 545 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); |
546 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); | 546 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); |
547 | } | 547 | } |
548 | newkeycode = Key_unknown; | 548 | newkeycode = Key_unknown; |
549 | } | 549 | } |
550 | break; | 550 | //nobreak; |
551 | 551 | ||
552 | default: | 552 | default: |
553 | break; | 553 | break; |
554 | } | 554 | } |
555 | 555 | ||
556 | if ( newkeycode != keycode ) { | 556 | if ( newkeycode != keycode ) { |
557 | if ( newkeycode != Key_unknown ) | 557 | if ( newkeycode != Key_unknown ) |
558 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); | 558 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); |
559 | return true; | 559 | return true; |
560 | } | 560 | } |
561 | else | 561 | else |
562 | return false; | 562 | return false; |
563 | } | 563 | } |
564 | 564 | ||
565 | void iPAQ::timerEvent ( QTimerEvent * ) | 565 | void iPAQ::timerEvent ( QTimerEvent * ) |
566 | { | 566 | { |
567 | killTimer ( m_power_timer ); | 567 | killTimer ( m_power_timer ); |
568 | m_power_timer = 0; | 568 | m_power_timer = 0; |
569 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); | 569 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); |
570 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); | 570 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); |
571 | } | 571 | } |
572 | 572 | ||
573 | 573 | ||
574 | void iPAQ::alarmSound ( ) | 574 | void iPAQ::alarmSound ( ) |