author | sandman <sandman> | 2002-12-23 03:14:22 (UTC) |
---|---|---|
committer | sandman <sandman> | 2002-12-23 03:14:22 (UTC) |
commit | 8bd190d162b538e4226e830f442450f5a95f4434 (patch) (unidiff) | |
tree | 5a0cd0904b11b5d76a09de21db29d77abfe4b176 /libopie/odevice.cpp | |
parent | 726d2ac455446ee194c8e83df16f48357b619988 (diff) | |
download | opie-8bd190d162b538e4226e830f442450f5a95f4434.zip opie-8bd190d162b538e4226e830f442450f5a95f4434.tar.gz opie-8bd190d162b538e4226e830f442450f5a95f4434.tar.bz2 |
grrr .. somehow joe put a 'k' in the file
-rw-r--r-- | libopie/odevice.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libopie/odevice.cpp b/libopie/odevice.cpp index a3c30cb..0e620ba 100644 --- a/libopie/odevice.cpp +++ b/libopie/odevice.cpp | |||
@@ -721,65 +721,65 @@ bool iPAQ::filter ( int /*unicode*/, int keycode, int modifiers, bool isPress, b | |||
721 | } | 721 | } |
722 | 722 | ||
723 | // Rotate cursor keys 180° | 723 | // Rotate cursor keys 180° |
724 | case Key_Left : | 724 | case Key_Left : |
725 | case Key_Right: | 725 | case Key_Right: |
726 | case Key_Up : | 726 | case Key_Up : |
727 | case Key_Down : { | 727 | case Key_Down : { |
728 | if (( d-> m_model == Model_iPAQ_H31xx ) || | 728 | if (( d-> m_model == Model_iPAQ_H31xx ) || |
729 | ( d-> m_model == Model_iPAQ_H38xx )) { | 729 | ( d-> m_model == Model_iPAQ_H38xx )) { |
730 | newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4; | 730 | newkeycode = Key_Left + ( keycode - Key_Left + 2 ) % 4; |
731 | } | 731 | } |
732 | break; | 732 | break; |
733 | } | 733 | } |
734 | 734 | ||
735 | // map Power Button short/long press to F34/F35 | 735 | // map Power Button short/long press to F34/F35 |
736 | case Key_SysReq: { | 736 | case Key_SysReq: { |
737 | if ( isPress ) { | 737 | if ( isPress ) { |
738 | if ( m_power_timer ) | 738 | if ( m_power_timer ) |
739 | killTimer ( m_power_timer ); | 739 | killTimer ( m_power_timer ); |
740 | m_power_timer = startTimer ( 500 ); | 740 | m_power_timer = startTimer ( 500 ); |
741 | } | 741 | } |
742 | else if ( m_power_timer ) { | 742 | else if ( m_power_timer ) { |
743 | killTimer ( m_power_timer ); | 743 | killTimer ( m_power_timer ); |
744 | m_power_timer = 0; | 744 | m_power_timer = 0; |
745 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); | 745 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, true, false ); |
746 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); | 746 | QWSServer::sendKeyEvent ( -1, HardKey_Suspend, 0, false, false ); |
747 | } | 747 | } |
748 | newkeycode = Key_unknown; | 748 | newkeycode = Key_unknown; |
749 | break; | 749 | break; |
750 | } | 750 | } |
751 | } | 751 | } |
752 | 752 | ||
753 | kif ( newkeycode != keycode ) { | 753 | if ( newkeycode != keycode ) { |
754 | if ( newkeycode != Key_unknown ) | 754 | if ( newkeycode != Key_unknown ) |
755 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); | 755 | QWSServer::sendKeyEvent ( -1, newkeycode, modifiers, isPress, autoRepeat ); |
756 | return true; | 756 | return true; |
757 | } | 757 | } |
758 | else | 758 | else |
759 | return false; | 759 | return false; |
760 | } | 760 | } |
761 | 761 | ||
762 | void iPAQ::timerEvent ( QTimerEvent * ) | 762 | void iPAQ::timerEvent ( QTimerEvent * ) |
763 | { | 763 | { |
764 | killTimer ( m_power_timer ); | 764 | killTimer ( m_power_timer ); |
765 | m_power_timer = 0; | 765 | m_power_timer = 0; |
766 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); | 766 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, true, false ); |
767 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); | 767 | QWSServer::sendKeyEvent ( -1, HardKey_Backlight, 0, false, false ); |
768 | } | 768 | } |
769 | 769 | ||
770 | 770 | ||
771 | void iPAQ::alarmSound ( ) | 771 | void iPAQ::alarmSound ( ) |
772 | { | 772 | { |
773 | #ifndef QT_NO_SOUND | 773 | #ifndef QT_NO_SOUND |
774 | static Sound snd ( "alarm" ); | 774 | static Sound snd ( "alarm" ); |
775 | int fd; | 775 | int fd; |
776 | int vol; | 776 | int vol; |
777 | bool vol_reset = false; | 777 | bool vol_reset = false; |
778 | 778 | ||
779 | if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { | 779 | if (( fd = ::open ( "/dev/sound/mixer", O_RDWR )) >= 0 ) { |
780 | if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { | 780 | if ( ::ioctl ( fd, MIXER_READ( 0 ), &vol ) >= 0 ) { |
781 | Config cfg ( "qpe" ); | 781 | Config cfg ( "qpe" ); |
782 | cfg. setGroup ( "Volume" ); | 782 | cfg. setGroup ( "Volume" ); |
783 | 783 | ||
784 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); | 784 | int volalarm = cfg. readNumEntry ( "AlarmPercent", 50 ); |
785 | if ( volalarm < 0 ) | 785 | if ( volalarm < 0 ) |