Board index » cppbuilder » Form OnKeyDown Event Not responding to Del key

Form OnKeyDown Event Not responding to Del key

Hello,
I have encountered a curious situation in where a form's OnKeyDown event is
not responding to the "Delete" key on the keyboard.  However, the OnKeyUp
event does respond.  I don't have a problem using the OnKeyUp, but would
prefer to use OnKeyDown.  Using the de{*word*81}, the OnKeyDown method is not
even entered when "Delete" is pressed.  Any suggestions as to why?  The help
file states "The OnKeyDown handler can respond to all keyboard keys...."  I
am sure that the event is actually bound to that form because OnKeyDown is
entered upon any other key press.

Thanks
Kevin
-kcbhiw

 

Re:Form OnKeyDown Event Not responding to Del key


Hi,

once I faced with this situation, when Del key
did not work in TEdit on a form because there was
a menu item with accelerator Del.

Check for any case...
Bye,
Alexander

Re:Form OnKeyDown Event Not responding to Del key


Thanks for your response.  That was the problem, indeed.  Both the MDI child
and its parent had a Del accelorator.  I guess accel.'s take precedence over
the OnKeyDown event.

Thanks again.

Kevin
-kcbhiw

Quote
"Alexander Aliev" <a...@isa.ru> wrote in message

news:3C5250D5.4070007@isa.ru...
Quote
> Hi,

> once I faced with this situation, when Del key
> did not work in TEdit on a form because there was
> a menu item with accelerator Del.

> Check for any case...
> Bye,
> Alexander

Re:Form OnKeyDown Event Not responding to Del key


Hello again,
After playing around with the setup, I found that if a single key
accelorator (ins, del, etc) is assigned before the OnKeyDown event , the
event when responding to that particular key is overridden, per se.  Just
thought I'd throw my findings in here.  Thx for your help again Alexander.

Kevin
-kcbhiw

Quote
"Alexander Aliev" <a...@isa.ru> wrote in message

news:3C5250D5.4070007@isa.ru...
Quote
> Hi,

> once I faced with this situation, when Del key
> did not work in TEdit on a form because there was
> a menu item with accelerator Del.

> Check for any case...
> Bye,
> Alexander

Other Threads