2010-09-21 12:52:34     Qt and Keyboard

Document created by Aaronwu Employee on Aug 23, 2013
Version 1Show Document
  • View in full screen mode

2010-09-21 12:52:34     Qt and Keyboard

Martin Jensby (DENMARK)

Message: 93704   

 

Hi all

 

 

 

I would like to ask all of you if any one ever tried to connect a keyboard to the Qt 4.5.1

 

The reason why I am asking is that lately I have been doing a I2C driver for a capsense touch.

 

 

 

This driver is suppose to emulate a keyboard, so that we can get some button presses into the Qt application.

 

 

 

So far the driver seem to be working fine, when I test it with event_test, I get the keys listed the device can send.

 

I touch it and I get the corresponding key.

 

 

 

My next step is to get these keys into Qt, I have written a small application.

 

It basically only openKeyboard() and show some buttons.

 

 

 

But the keys I press never seem to get to the application.

 

 

 

The application should just exit if an "enter" event is triggered, or "arrow" event between the different button, but no such luck.

 

 

 

I have tried frantically with all kinds of export QWS_KEYBOARD but none seem to work.

 

 

 

Any help would be appreciated

 

 

 

I have attached the driver if you want to look it over and see if maybe I need something more with the EV part or something

 

capsense_touch_wheel.c

QuoteReplyEditDelete

 

 

2010-09-21 16:17:08     Re: Qt and Keyboard

Mike Frysinger (UNITED STATES)

Message: 93712   

 

we've used USB keyboards and touchscreens fine

 

you might want to review the documentation:

  docs.blackfin.uclinux.org/doku.php?id=uclinux-dist:qt

QuoteReplyEditDelete

 

 

2010-09-22 02:47:50     Re: Qt and Keyboard

Martin Jensby (DENMARK)

Message: 93720   

 

Hi

 

 

 

I did read the documentation, I can find how to add mouse and as you state touchscreen.

 

And we already did that on a blackfin 537 based system.

 

So this is not my first time working with Qt

 

 

 

But since my driver is neither a mouse(touchscreeb) or usb, I wonder how to do it.

 

And it is making me crazy.

 

 

 

I was thinking that I would try and simply fake it to be a usb, and see what happens.

 

But thanks anyway.

QuoteReplyEditDelete

 

 

2010-09-23 12:01:08     Re: Qt and Keyboard

Martin Jensby (DENMARK)

Message: 93802   

 

Well, what we ended up doing was reading the /dev/input/event0 char from the Qt app.

 

 

 

No other forum could help either.

QuoteReplyEditDelete

 

 

2010-09-23 15:20:28     Re: Qt and Keyboard

Terry Markovich (UNITED STATES)

Message: 93805   

 

We use an i2c keyboard, same driver as in the docs

 

export QWS_KEYBOARD=USB:/dev/input/event0

 

Then just use the QT eventFilter()

Outcomes