summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp19
1 files changed, 17 insertions, 2 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 @@
/* OPIE */
+#include <opie2/oinputsystem.h>
#include <qpe/config.h>
@@ -102,3 +103,12 @@ struct z_button z_buttons_c700 [] = {
"opiemail", "newMail()" },
- { Qt::Key_F14, QT_TRANSLATE_NOOP("Button", "Display Rotate"),
+
+ { Qt::Key_F15, QT_TRANSLATE_NOOP("Button", "Display Rotate"),
+ "devicebuttons/z_hinge",
+ "QPE/Rotation", "rotateDefault()",
+ "QPE/Dummy", "doNothing()" },
+ { Qt::Key_F16, QT_TRANSLATE_NOOP("Button", "Display Rotate"),
+ "devicebuttons/z_hinge",
+ "QPE/Rotation", "rotateDefault()",
+ "QPE/Dummy", "doNothing()" },
+ { Qt::Key_F17, QT_TRANSLATE_NOOP("Button", "Display Rotate"),
"devicebuttons/z_hinge",
@@ -589,3 +599,8 @@ OHingeStatus Zaurus::readHingeSensor() const
{
- qDebug( "Zaurus::readHingeSensor: ODevice handling for non-embedix kernels not yet implemented" );
+ // corgi keyboard is event source 0 in OZ kernel 2.6
+ OInputDevice* keyboard = OInputSystem::instance()->device( "event0" );
+ if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP0 ) ) return CASE_LANDSCAPE;
+ else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP1 ) ) return CASE_PORTRAIT;
+ else if ( keyboard && keyboard->isHeld( OInputDevice::Key_KP2 ) ) return CASE_CLOSED;
+ qWarning("Zaurus::readHingeSensor() - couldn't compute hinge status!" );
return CASE_UNKNOWN;