Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - keyevent help please

keyevent help please

Discuss PocketC for CE (including Desktop Edition)

Postby bvinas on Mon Jun 04, 2001 10:08 pm

I need some info on keyevent. I want to simulate a Ctrl-C (copy) and Ctrl-V (paste) and Ctrl-X (cut) using keyevent. The documention for pocketC doesn't really give a good example. Does anyone know how this can be implemented.

Also what is the value of KEYEVENTF_KEYUP.

Thanks

-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby ryo-h on Tue Jun 05, 2001 12:48 pm

Hi, bvinas.

You can manage it by these steps.

1) Watch for PM_KEYDOWN event for Ctrl key.
2) If you catch it, record the "Down" state in a variable.
3) While the Ctrl key state is "Down", if you catch a PM_KEYDOWN event for C key, you get a "Ctrl-C" combination.
4) If you see PM_KEYUP event for Ctrl key, you change the variable state to "Up".

Hope it'll work for you.
----------------
ryo@CE Factory
posting from Bangkok, Thailand

ryo@CE Factory
ryo@CE Factory
ryo-h
 
Posts: 5
Joined: Sun Jun 03, 2001 5:36 am
Location: Japan

Postby Valerio on Tue Jun 26, 2001 10:05 am

Hi bvinas,

I think it could be done like this:

keyevent(17,0,0,0); //Ctrl Key down
keyevent(67,0,0,0); //'C' Key down
keyevent(17,0,2,0); //Ctrl Key up

I guess that KEYEVENTF_KEYUP is 2 since it works. Actually I have the intention of making a program that reads from the serial port any char and puts it on the current application so that I can write on my PocketPC through my PC keyboard and a terminal program (i.e. Hyperterminal or something like it). I am mapping chars using a modified version of event.pc that can be found somewhere on this site.

Bye,
Valerio
v.petrini@tiscalinet.it
Valerio
 
Posts: 2
Joined: Tue Jun 26, 2001 9:54 am

Postby guy on Tue Jun 26, 2001 10:34 am

Are you sending key messages because you need to do cut/copy/paste in another application or in your own application?

To cut/copy/paste in your own application it's easier to just send messages to the appropriate control:

WM_CUT
WM_COPY
WM_PASTE
WM_CLEAR




Guy
Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby bvinas on Tue Jun 26, 2001 10:36 am

I eventually figured that out Guy about the messages, But I still used ryo-h suggestion to get ctrl-n (new) and some other shortcuts working.

-bobby
bvinas
 
Posts: 43
Joined: Mon Feb 12, 2001 8:15 pm
Location: USA

Postby Justinespinosa on Tue Jun 26, 2001 4:15 pm

If someone needs it, i have done a library to use the edit control messages. now including set tab stops. drop me a mail if you need it

J.Espinosa

OUTS Softwares
J.Espinosa

OUTS Softwares
Justinespinosa
 
Posts: 156
Joined: Wed Dec 06, 2000 2:30 pm
Location: Switzerland


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 1 guest