![]() |
#1 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2013
Location: Germany
Device: KoBo Glo
|
How to register button press on Glo?
Hi Guys,
I just looked around the forum and I didn't find very much regarding that matter. If there is a thread about it, just point me in the right direction and I'll stand corrected ![]() Anyways... How can I register button presses using QT 4.8 on my Glo? I don't mean the touchscreen, I mean the light and on/off-buttons. So far my application has a main window/widget derived from the QLabel-class. QLabel::keyPressEvent(...) however is not triggered when I press the light or the on/off-button. So my guess is that either I need something like a global hook or more likely I just don't have the right "keyboard"-driver loaded. Adding Code:
export QWS_KEYBOARD=imx508kbd:/dev/input/event0 Any suggestions? |
![]() |
![]() |
![]() |
#2 |
ebook fan
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
|
cat /dev/input/event0
responds to "Home" and "Power" buttons on my Kobo Touch I think that I'll implement my own Qt keyboard plugin for my Qt 4.8.4 build soon... |
![]() |
![]() |
Advert | |
|
![]() |
#3 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2013
Location: Germany
Device: KoBo Glo
|
thanks for the response - I knew that /dev/input/event0 corresponds to those button events, but I've never written a keyboard Qt-plugin/driver before...
I am planning on taking a look at the sources of the Kobo-mousedriver when I find the time. Today I just roamed the forum trying to find those - after 1 hour I found out that it was thread #1 ![]() |
![]() |
![]() |
![]() |
#4 |
Enthusiast
![]() ![]() ![]() Posts: 49
Karma: 208
Join Date: Nov 2012
Device: Kobo Glo
|
It would be nice to have the Kobo QT Keyboard working, but that didn't work for me (using the command in the Main post)
|
![]() |
![]() |
![]() |
#5 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2013
Location: Germany
Device: KoBo Glo
|
I found the time (and documentation) to build a Qt keyboard driver. Basicly I just transformed sergeyvl12's code for the touchscreen driver to fit the buttons events. It's attached to this post. Using it via
Code:
export QWS_KEYBOARD=KoboKBD Code:
export QWS_KEYBOARD=KoboKBD:debug Code:
QWidget::keyPressEvent(QKeyEvent*) Code:
QWidget::keyReleaseEvent(QKeyEvent*) I would further really appreciate it if one of the more experienced Qt coders around here would take a look at the source code because for example I have no idea what the unicode parameter is for in the QWSKeyboardHandler's function processKeyEvent. My guess is that it's not important but thats just a guess ![]() edit: woops, there was no debugging implemented in the former attachment... now it's in there and I just found out that there is a third keycode for the kobo glo: 59 - it's when you use a sleepcover! PS: The driver's written and built with Qt 4.8.4! Last edited by j4GGy; 02-01-2013 at 07:34 PM. |
![]() |
![]() |
Advert | |
|
![]() |
#6 |
ebook fan
![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Posts: 735
Karma: 2528718
Join Date: Dec 2010
Device: PocketBook 301+, Kindle 3 Wi-Fi, Onyx Boox A62, Kindle Touch
|
Thanks!
|
![]() |
![]() |
![]() |
#7 |
Junior Member
![]() Posts: 6
Karma: 10
Join Date: Jan 2013
Location: Germany
Device: KoBo Glo
|
It seems that one also has to place the libKoboKBD.so in
Code:
QT_PLUGIN_PATH/kbddrivers/ |
![]() |
![]() |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Kobo glo home/settings button not working? | Tim Shaw | Kobo Reader | 6 | 12-07-2013 01:23 PM |
Un-register/Re-register Nook Classic | Hitchcockfan | Barnes & Noble NOOK | 1 | 08-29-2011 06:53 AM |
how to de-register and register kindle3 outside USA | klastbreath | Amazon Kindle | 3 | 03-31-2011 06:07 PM |
GRYPHONWOOD PRESS/BLADE RED PRESS Halloween Giveaway | Winter | Deals and Resources (No Self-Promotion or Affiliate Links) | 0 | 10-30-2009 06:39 AM |
Unresponsive to button press | Vesper | Bookeen | 16 | 03-07-2008 12:59 AM |