Qt Forum - programming with C++ and Qt
Register Calendar Members List Team Members Search Frequently Asked Questions Go to the Main Page

Qt Forum - programming with C++ and Qt » QtForum.org » Qt » Qt Embedded, Qtopia, QSA » Keyboard driver / 3 button board » Hello Guest [Login|Register]
Last Post | First Unread Post Print Page | Recommend to a Friend | Add Thread to Favorites
Post New Thread Post Reply
Go to the bottom of this page Keyboard driver / 3 button board
Author
Post « Previous Thread | Next Thread »
gegy gegy is a male
Assistant


Registration Date: 20.04.2005
Posts: 1
Location: Norway

Level: 10 [?]
Experience: 1,123
Next Level: 1,454

331 points of experience needed for next level

Fragezeichen Keyboard driver / 3 button board Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

I am trying to implement a new keyboard driver for a HW we have designed. It's like a PDA with 3 buttons. I get the buttons from the Linux kernel with keycodes 0x01, 0x02 and 0x03. I have made a new driver based on the "qkbdvr41xx_qws.h/.cpp" and made changes in the qkbddriverfactory_qws.cpp file (under src/embedded) in addition i made changes in the qt_embedded.pri file in order to compile the new driver. I then configure it in and make the embedded library (I make it static) . I make my program link it static again and try to run it.

The changes I made in some detail:

First I have an application that works when compiled with QT on Suse 9.1. The application also runs on the board, but do not receive keyboard events. It receives mouse event trough a touch screen.

I made a copy of the qkbdvr41xx_qws.h/.cpp files and reduced the number of buttons and opend /dev/keypad as I am using as driver.

So what I need to do is to get this new driver to be linked in staticaly in to the libqte.a and link my application against it. And that part is ok. The problem is that the new driver (class) does not get created at run time. (I check by adding qDebug/qWarning messags in the code)

I have added my new driver in the qkbddriverfactory_qws.cpp as
In QKbdDriverFactory::create metod I added:

#ifndef QT_NO_QWS_KBD_HF
if ( driver == "hf" || driver.isEmpty() )
return new QWSHFbuttonsKeyboardHandler( device );
#endif

and in QKbdDriverFactory::keys method I added:

#ifndef QT_NO_QWS_KBD_HF
if ( !list.contains( "HF" ) )
list << "HF";
#endif


In qt-embedded.pri I added
contains( kbd-drivers, hf ) {
HEADERS +=$$EMBEDDED_H/qhfbuttons.h
SOURCES +=$$EMBEDDED_CPP/qhfbuttons.cpp
}
else: DEFINES += QT_NO_QWS_KBD_HF

This is working because I get the driver compiled.


No luck so far. Any ideas.

confused

__________________
------------------
gegy.

This post has been edited 2 time(s), it was last edited by gegy: 21.04.2005 10:06.

20.04.2005 16:17 gegy is offline Send an Email to gegy Search for Posts by gegy Add gegy to your Buddy List
ramandeep ramandeep is a male
Senior Software Engineer


images/avatars/avatar-12.png

Registration Date: 07.02.2008
Posts: 75
Location: India

Level: 15 [?]
Experience: 7,446
Next Level: 7,465

19 points of experience needed for next level

RE: Keyboard driver / 3 button board Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

hi,

What is the interface of the keyboard like?Is it through GPIO pins or USB?
Secondly it would be better if you post the code so that it is known which files have you changed/edited?

good luck
28.03.2008 09:56 ramandeep is offline Send an Email to ramandeep Search for Posts by ramandeep Add ramandeep to your Buddy List
newnikeshoes newnikeshoes is a female
Coder


Registration Date: 03.04.2008
Posts: 2
Location: china
Jabber: colgle

Level: 4 [?]
Experience: 88
Next Level: 100

12 points of experience needed for next level

RE: Keyboard driver / 3 button board Reply to this Post Post Reply with Quote Edit/Delete Posts Report Post to a Moderator       Go to the top of this page

Cheap nike jordan shoes in www.newnike-shoes.com
www.newnike-shoes.com wholesale brand shoes such as Nike,Air Jordan,Puma,Addidas,Prada,Air force 1,Timberland Sandals and so on.New styles and hot styles are active every day.
website:www.newnike-shoes.com
msn:newnike-shoes@hotmail.com
E_mail:newnike.shoes@yahoo.com.cn

__________________
Hello! welcome to our website; http://www.newnike-shoes.com
03.04.2008 18:59 newnikeshoes is offline Homepage of newnikeshoes Search for Posts by newnikeshoes Add newnikeshoes to your Buddy List Add newnikeshoes to your Contact List AIM Screen Name of newnikeshoes: liao YIM Account Name of newnikeshoes: newnike.shoes View the MSN Profile for newnikeshoes
Tree Structure | Board Structure
Jump to:
Post New Thread Post Reply
Qt Forum - programming with C++ and Qt » QtForum.org » Qt » Qt Embedded, Qtopia, QSA » Keyboard driver / 3 button board

views today: 9.770 | views yesterday: 17.520 | total views: 10.243.139


Klebekork Shop - Linux Shop - Kontaktanzeigen - Linux Forum -  SMS Gewinnspiel -  Hotels -  Stadtpläne -  Branchenbuch & Stadtplan

Branchenbuch Österreich - Branchenbuch Niederlande - Portugal Branchenverzeichnis - Spanien Branchenverzeichnis 
Telefonbuch - Branchenbuch Frankreich