Sunday, July 6th 2008, 4:26pm UTC+1

You are not logged in.

  • Login
  • Register

Dear visitor, welcome to QtForum.org. If this is your first visit here, please read the Help. It explains how this page works. You must be registered before you can use all the page's features. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

gegy

Beginner

Posts: 1

Location: Norway

1

Wednesday, April 20th 2005, 3:17pm

Keyboard driver / 3 button board

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.

?(
------------------
gegy.

This post has been edited 2 times, last edit by "gegy" (Apr 21st 2005, 9:06am)

  • Go to the top of the page

ramandeep

Trainee

Posts: 99

Location: India

Occupation: embedded software

2

Friday, March 28th 2008, 8:56am

RE: Keyboard driver / 3 button board

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
  • Go to the top of the page

Posts: 2

Location: china

Occupation: teacher

3

Thursday, April 3rd 2008, 5:59pm

RE: Keyboard driver / 3 button board

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
  • Go to the top of the page

Rate this thread