Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Core » How to simulate keyboard (and without focus)?
How to simulate keyboard (and without focus)? [message #6795] Tue, 28 November 2006 22:12 Go to next message
WebChaot is currently offline  WebChaot
Messages: 53
Registered: September 2006
Location: Austria, Vienna
Member
Hi all!

Last time I asked how to catch keyboard input. Mirek directed me to the (simple) answer. Thanks!

But now I want to do the other way: I want to simulate keyboard input.

Is it possible to "send" a key via code?

The second question is: Is it possible to popup a static rect with some buttons - but without to get focus?

I need to develop a virtual keyboard for a touchscreen solution - therefore I dont want to loose focus on selected editfield while typing (=clicking) on the popped up keypanel.

Is that possible?


I hope, I didn't explain too confusing Smile


Thanks in advance,

WebChaot.

[Updated on: Tue, 28 November 2006 22:12]

Report message to a moderator

Re: How to simulate keyboard (and without focus)? [message #6797 is a reply to message #6795] Tue, 28 November 2006 23:05 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
WebChaot wrote on Tue, 28 November 2006 16:12



Is it possible to "send" a key via code?



Just call Key method by your code (normally, it is called as result of Key event, but nothing can prevent your code doing so).

Quote:


The second question is: Is it possible to popup a static rect with some buttons - but without to get focus?



There is "NoWantFocus" flag - Ctrls with such flag cannot obtain focus by "standard" means (e.g. by TopWindow). They still can get it explicitly by your code, but that you can avoid..

I need to develop a virtual keyboard for a touchscreen solution - therefore I dont want to loose focus on selected editfield while typing (=clicking) on the popped up keypanel.


I see. Yes, it is OK. However, maybe even moving focus would be OK - virtual keyboard is mouse thing, I would just left focus processing as it is and simply send virtual keyboard events to GetFocusCtrl()->Key

I hope, I didn't explain too confusing :)


Actually, very understandable Smile

More actually, that app sounds interesting. Keep us informed Wink

Mirek

Re: How to simulate keyboard (and without focus)? [message #6800 is a reply to message #6797] Tue, 28 November 2006 23:24 Go to previous messageGo to next message
WebChaot is currently offline  WebChaot
Messages: 53
Registered: September 2006
Location: Austria, Vienna
Member
>>> I see. Yes, it is OK. However, maybe even moving focus would be OK - virtual keyboard is mouse thing, I would just left focus processing as it is and simply send virtual keyboard events to GetFocusCtrl()->Key

I have to play around tomorrow. I want to let the edit cursor (does it have a name - the line which is blinking) stay visible. Therefore I thought, that the editfield should be focused all the time.


>>> More actually, that app sounds interesting. Keep us informed

Sure! As I wrote you some weeks ago, we are new in Ultimate++ and we decide to develop all our new applications with it. So now we started with our new version of a touchscreen application. We will send you more information and some screenshots, when there is something interesting to show. At the time we do some base development (touchscreen elements, advanced array control and much more).

Do you like to get technical feedback? Because we try to let U++ source as it is and only to create and / or overwrite our own classes (to be able to update U++ development releases without much work). But in some cases (3 times I think) we had to change U++ sources (very small changes!). Maybe it is possible to include this changes in next releases, because they are useful for others too?


Thanks,

WebChaot
Re: How to simulate keyboard (and without focus)? [message #6803 is a reply to message #6800] Tue, 28 November 2006 23:29 Go to previous message
mirek is currently offline  mirek
Messages: 13975
Registered: November 2005
Ultimate Member
WebChaot wrote on Tue, 28 November 2006 17:24

>>> I see. Yes, it is OK. However, maybe even moving focus would be OK - virtual keyboard is mouse thing, I would just left focus processing as it is and simply send virtual keyboard events to GetFocusCtrl()->Key

I have to play around tomorrow. I want to let the edit cursor (does it have a name - the line which is blinking) stay visible.


Well, the terminology names that blinking thing a "caret". Anyway, that is exactly the reason to keep normal focus processing and make your virtual keyboard "NoWantFocus". (Now thinking about it, maybe that is exactly what you wanted to do Wink

Quote:


Do you like to get technical feedback? Because we try to let U++ source as it is and only to create and / or overwrite our own classes (to be able to update U++ development releases without much work). But in some cases (3 times I think) we had to change U++ sources (very small changes!). Maybe it is possible to include this changes in next releases, because they are useful for others too?



Of course! Actually, U++ develops fast, I hope you do not want to patch each single version Wink

Of course, the reasons for patches have to be stated (and sometimes discussed).

Mirek

[Updated on: Tue, 28 November 2006 23:29]

Report message to a moderator

Previous Topic: Vector< > & does't work
Next Topic: Stream::Putf
Goto Forum:
  


Current Time: Sun Apr 28 21:13:49 CEST 2024

Total time taken to generate the page: 0.02800 seconds