Notices


Reply
Thread Tools
wook_sf's Avatar
Posts: 640 | Thanked: 435 times | Joined on Oct 2011 @ rajvoSa BA
#681
Originally Posted by DavyP View Post
Without a real N9, this is a tough one for me to fix. I applied for a
N9 with the Summer 2012 Device Program and my submission
got accepted, but there are still a few hurdles to cross before I will
get the device.

OTOH, if someone can tell me how I can programmatically pop up
the native virtual keyboard and intercept its event, that would help
too.

The problem is that I do not use native Qt input widgets, and many
examples seem to put an input widget somewhere off the screen
and intercept its events. However, I could not get this to work on
the N9 emulator.

Davy
seems like QT input widget is only proper solution :S
there's dev's around globe who might help you, i hope...i am just not right guy for QT :S damn
i can test though...
i hope you will get that device as soon as possible
 
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#682
Originally Posted by wook_sf View Post
seems like QT input widget is only proper solution :S
there's dev's around globe who might help you, i hope...i am just not right guy for QT :S damn
i can test though...
i hope you will get that device as soon as possible
It turns out that triggering the virtual keyboard is a bit harder than I thought.

I implemented a simple app with a textfield (subclassing QLineEdit), but even after posting QEvent::RequestSoftwareInputPanel events and faking mouse press/release events, I cannot get the virtual keyboard to automatically pop up. The user still has to tap the widget, so I cannot hide it by putting it somewhere off the screen.

WinCE and Android had proper APIs to handle the keyboard. With Maemo, it seems I have to reimplement my own keyboard.

Davy
 
wook_sf's Avatar
Posts: 640 | Thanked: 435 times | Joined on Oct 2011 @ rajvoSa BA
#683
Originally Posted by DavyP View Post
It turns out that triggering the virtual keyboard is a bit harder than I thought.

I implemented a simple app with a textfield (subclassing QLineEdit), but even after posting QEvent::RequestSoftwareInputPanel events and faking mouse press/release events, I cannot get the virtual keyboard to automatically pop up. The user still has to tap the widget, so I cannot hide it by putting it somewhere off the screen.

WinCE and Android had proper APIs to handle the keyboard. With Maemo, it seems I have to reimplement my own keyboard.

Davy
nokia always liked to mess with apis...always
will reimplementation be good enough?
 
Posts: 1,067 | Thanked: 2,383 times | Joined on Jan 2012 @ Finland
#684
Originally Posted by DavyP View Post
It turns out that triggering the virtual keyboard is a bit harder than I thought.

I implemented a simple app with a textfield (subclassing QLineEdit), but even after posting QEvent::RequestSoftwareInputPanel events and faking mouse press/release events, I cannot get the virtual keyboard to automatically pop up. The user still has to tap the widget, so I cannot hide it by putting it somewhere off the screen.

WinCE and Android had proper APIs to handle the keyboard. With Maemo, it seems I have to reimplement my own keyboard.

Davy
You should be able to 'hide' it if you programatically set focus to qlinedit. http://stackoverflow.com/questions/5...it-focus-in-qt
__________________
IRC: jonni@freenode
Sailfish: ¤ Qt5 SailfishTouchExample ¤ Qt5 MultiPointTouchArea Example ¤ ipaddress ¤ stoken ¤ Sailbox (Dropbox client) ¤
Harmattan: ¤ Presence VNC for Harmattan ¤ Live-F1 ¤ BTinput-terminal ¤ BabyLock ¤ BabyLock Trial ¤ QML TextTV ¤
Disclaimer: all my posts in this forum are personal trolling and I never post in any official capacity on behalf of any company.
 

The Following User Says Thank You to rainisto For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#685
Originally Posted by DavyP View Post
It turns out that triggering the virtual keyboard is a bit harder than I thought.

I implemented a simple app with a textfield (subclassing QLineEdit), but even after posting QEvent::RequestSoftwareInputPanel events and faking mouse press/release events, I cannot get the virtual keyboard to automatically pop up. The user still has to tap the widget, so I cannot hide it by putting it somewhere off the screen.

WinCE and Android had proper APIs to handle the keyboard. With Maemo, it seems I have to reimplement my own keyboard.

Davy
There is a way AFAIK, look at void MozQWidget::showVKB() here
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following User Says Thank You to freemangordon For This Useful Post:
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#686
Originally Posted by rainisto View Post
You should be able to 'hide' it if you programatically set focus to qlinedit. http://stackoverflow.com/questions/5...it-focus-in-qt
Thanks for the tip, but I already tried this before and it does not
work.

The example shows the QLineEdit and the widget has focus, but the virtual keyboard does not pop up. I still have to tap on the widget to
trigger it (tested on N900).

Davy
 
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#687
Originally Posted by freemangordon View Post
There is a way AFAIK, look at void MozQWidget::showVKB() here
Thanks. I figured out what went wrong. Even though I called setFocus, the widget did not have focus yet when posted the RequestSoftwareInputPanel event. I made some progress.

Davy
 

The Following 2 Users Say Thank You to DavyP For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#688
Originally Posted by DavyP View Post
Thanks. I figured out what went wrong. Even though I called setFocus, the widget did not have focus yet when posted the RequestSoftwareInputPanel event. I made some progress.

Davy
Yeah, apparently the QTimer::singleShot ugly hack workarounds that
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following User Says Thank You to freemangordon For This Useful Post:
Posts: 306 | Thanked: 603 times | Joined on Jan 2012 @ Belgium
#689
Originally Posted by freemangordon View Post
Yeah, apparently the QTimer::singleShot ugly hack workarounds that
Yes, I got it working now.

My next problem is that the virtual keyboard does not produce any KeyPress events (physical keyboard does produce them on the N900). The textChanged/textEdited signals of QLineEdit are not that
useful to identify which key was pressed. Seems like I have to mess
around with some X11 events.

Davy
 

The Following 4 Users Say Thank You to DavyP For This Useful Post:
Posts: 3,074 | Thanked: 12,960 times | Joined on Mar 2010 @ Sofia,Bulgaria
#690
Originally Posted by DavyP View Post
Yes, I got it working now.

My next problem is that the virtual keyboard does not produce any KeyPress events (physical keyboard does produce them on the N900). The textChanged/textEdited signals of QLineEdit are not that
useful to identify which key was pressed. Seems like I have to mess
around with some X11 events.

Davy
Look through the whole file I sent the link to, this is a part of Qt backend of fennec 16a1, you should do almost the same thing fennec does
__________________
Never fear. I is here.

720p video support on N900,SmartReflex on N900,Keyboard and mouse support on N900
Nothing is impossible - Stable thumb2 on n900

Community SSU developer
kernel-power developer and maintainer

 

The Following User Says Thank You to freemangordon For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 07:59.