summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opiecore/device/odevice_zaurus.cpp23
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
@@ -36,6 +36,7 @@
36#include <qwindowsystem_qws.h> 36#include <qwindowsystem_qws.h>
37 37
38/* OPIE */ 38/* OPIE */
39#include <opie2/oinputsystem.h>
39#include <qpe/config.h> 40#include <qpe/config.h>
40#include <qpe/resource.h> 41#include <qpe/resource.h>
41#include <qpe/sound.h> 42#include <qpe/sound.h>
@@ -100,7 +101,16 @@ struct z_button z_buttons_c700 [] = {
100 "devicebuttons/z_mail", 101 "devicebuttons/z_mail",
101 "opiemail", "raise()", 102 "opiemail", "raise()",
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",
105 "QPE/Rotation", "rotateDefault()", 115 "QPE/Rotation", "rotateDefault()",
106 "QPE/Dummy", "doNothing()" }, 116 "QPE/Dummy", "doNothing()" },
@@ -507,7 +517,7 @@ bool Zaurus::suspend()
507Transformation Zaurus::rotation() const 517Transformation Zaurus::rotation() const
508{ 518{
509 Transformation rot; 519 Transformation rot;
510 520
511 switch ( d->m_model ) { 521 switch ( d->m_model ) {
512 case Model_Zaurus_SLC3000: // fallthrough 522 case Model_Zaurus_SLC3000: // fallthrough
513 case Model_Zaurus_SLC7x0: { 523 case Model_Zaurus_SLC7x0: {
@@ -532,7 +542,7 @@ Transformation Zaurus::rotation() const
532ODirection Zaurus::direction() const 542ODirection Zaurus::direction() const
533{ 543{
534 ODirection dir; 544 ODirection dir;
535 545
536 switch ( d->m_model ) { 546 switch ( d->m_model ) {
537 case Model_Zaurus_SLC3000: // fallthrough 547 case Model_Zaurus_SLC3000: // fallthrough
538 case Model_Zaurus_SLC7x0: { 548 case Model_Zaurus_SLC7x0: {
@@ -587,7 +597,12 @@ OHingeStatus Zaurus::readHingeSensor() const
587 } 597 }
588 else 598 else
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;
592 } 607 }
593} 608}