Board index » cppbuilder » Intercepting arrow keystrokes at form level

Intercepting arrow keystrokes at form level


2004-11-12 07:24:20 AM
cppbuilder1
I need to be able to intercept arrow keystrokes at the form level (ie.
VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT)
I've used the KeyPreview property to direct other keystrokes to the main
form so that they can be picked up using OnKeyDown.
Now the Builder SDK says the follow about the KeyPreview property:
"Navigation keys (Tab, BackTab, the arrow keys, and so on) are unaffected by
KeyPreview because they do not generate keyboard events."
so how do I intercept keyboard events from the arrow keys and other
"Navigation Keys"?
- Chris G
 
 

Re:Intercepting arrow keystrokes at form level

"Chris G" < XXXX@XXXXX.COM >schrieb im Newsbeitrag
Quote
I need to be able to intercept arrow keystrokes at the form level (ie.
VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT)

I've used the KeyPreview property to direct other keystrokes to the main
form so that they can be picked up using OnKeyDown.

Now the Builder SDK says the follow about the KeyPreview property:
"Navigation keys (Tab, BackTab, the arrow keys, and so on) are unaffected by
KeyPreview because they do not generate keyboard events."

so how do I intercept keyboard events from the arrow keys and other
"Navigation Keys"?


- Chris G
hi Chris,
i'm not sure but i hope this will help you:
www.bcbdev.com/faqs/faq78.htm
otherwise if you want to install a keyboard-hook, let me know i'll post
you some code...
Oren
 

Re:Intercepting arrow keystrokes at form level

"Chris G" < XXXX@XXXXX.COM >wrote:
Quote
I need to be able to intercept arrow keystrokes at the form level (ie.
VK_UP, VK_DOWN, VK_LEFT, VK_RIGHT)
Use the TApplication::OnMessage event:
groups.google.com/groups
~ JD
 

{smallsort}

Re:Intercepting arrow keystrokes at form level

"Oren Halvani" < XXXX@XXXXX.COM >wrote:
Quote

i'm not sure but i hope this will help you:

www.bcbdev.com/faqs/faq78.htm
That's actually a better choice than using the OnMessage event.
(I didn't look at the link).
Quote
otherwise if you want to install a keyboard-hook,
The OnMessage event would be better.
~ JD
 

Re:Intercepting arrow keystrokes at form level

JD wrote:
Wow, that's quite a link!
If you click on the "Original Format" link, and omit the "&output=gplain,"
your link will become the more shiny and manageable:
groups.google.com/groups
...but this took care of it, anyway:
www.bergdesign.net/repasteurl.htm
 

Re:Intercepting arrow keystrokes at form level

Quote
...but this took care of it, anyway:
Oh, I guess it wasn't actually wrapped as it likely would have been with
a common newsreader. Uh, just frittering away the hours... ;)
 

Re:Intercepting arrow keystrokes at form level

"Fishface" < XXXX@XXXXX.COM ?>wrote:
Quote
>...but this took care of it, anyway:

Oh, I guess it wasn't actually wrapped as it likely would have been with
a common newsreader.
You are correct!!! [LOL]
I don't use a reader so I stopped making shorter links a long
time ago.
~ JD