-rw-r--r-- | libopie2/opiecore/device/odevice_zaurus.cpp | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/libopie2/opiecore/device/odevice_zaurus.cpp b/libopie2/opiecore/device/odevice_zaurus.cpp index 780d130..a59e799 100644 --- a/libopie2/opiecore/device/odevice_zaurus.cpp +++ b/libopie2/opiecore/device/odevice_zaurus.cpp | |||
@@ -38,2 +38,3 @@ | |||
38 | /* OPIE */ | 38 | /* OPIE */ |
39 | #include <opie2/oinputsystem.h> | ||
39 | #include <qpe/config.h> | 40 | #include <qpe/config.h> |
@@ -102,3 +103,12 @@ struct z_button z_buttons_c700 [] = { | |||
102 | "opiemail", "newMail()" }, | 103 | "opiemail", "newMail()" }, |
103 | { Qt::Key_F14, QT_TRANSLATE_NOOP("Button", "Display Rotate"), | 104 | |
105 | { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Display Rotate"), | ||
106 | "devicebuttons/z_hinge", | ||
107 | "QPE/Rotation", "rotateDefault()", | ||
108 | "QPE/Dummy", "doNothing()" }, | ||
109 | { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Display Rotate"), | ||
110 | "devicebuttons/z_hinge", | ||
111 | "QPE/Rotation", "rotateDefault()", | ||
112 | "QPE/Dummy", "doNothing()" }, | ||
113 | { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Display Rotate"), | ||
104 | "devicebuttons/z_hinge", | 114 | "devicebuttons/z_hinge", |
@@ -509,3 +519,3 @@ Transformation Zaurus::rotation() const | |||
509 | Transformation rot; | 519 | Transformation rot; |
510 | 520 | ||
511 | switch ( d->m_model ) { | 521 | switch ( d->m_model ) { |
@@ -534,3 +544,3 @@ ODirection Zaurus::direction() const | |||
534 | ODirection dir; | 544 | ODirection dir; |
535 | 545 | ||
536 | switch ( d->m_model ) { | 546 | switch ( d->m_model ) { |
@@ -589,3 +599,8 @@ OHingeStatus Zaurus::readHingeSensor() const | |||
589 | { | 599 | { |
590 | qDebug( "Zaurus::readHingeSensor: ODevice handling for non-embedix kernels not yet implemented" ); | 600 | // corgi keyboard is event source 0 in OZ kernel 2.6 |
601 | OInputDevice* keyboard = OInputSystem::instance()->device( "event0" ); | ||
602 | if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP0 ) ) return CASE_LANDSCAPE; | ||
603 | else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP1 ) ) return CASE_PORTRAIT; | ||
604 | else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP2 ) ) return CASE_CLOSED; | ||
605 | qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" ); | ||
591 | return CASE_UNKNOWN; | 606 | return CASE_UNKNOWN; |