Board index » delphi » Detecting keypresses in memos

Detecting keypresses in memos

Quote
Michael Alan SOSS wrote:
> I'm writing an application where a user is typing in a memo.

> I need to know when the user presses the up and down arrows, or a
> similar
> control key that moves the cursor.

> Unfortunately, the "keypress" event isn't called with such special
> keystrokes.  Does anyone know how I should detect this?

    You probably want the OnKeyDown event, which does send special
codes.

<<RON>>

 

Re:Detecting keypresses in memos


I'm writing an application where a user is typing in a memo.

I need to know when the user presses the up and down arrows, or a similar
control key that moves the cursor.

Unfortunately, the "keypress" event isn't called with such special
keystrokes.  Does anyone know how I should detect this?

Thanks!
Mike

Re:Detecting keypresses in memos


Trap the 'OnKeyDown' event rather than 'OnKeyPress'

Michael Alan SOSS <s...@lisa.cs.mcgill.ca> wrote in article
<5qh49n$...@sifon.cc.mcgill.ca>...

Quote
> I'm writing an application where a user is typing in a memo.

> I need to know when the user presses the up and down arrows, or a similar
> control key that moves the cursor.

> Unfortunately, the "keypress" event isn't called with such special
> keystrokes.  Does anyone know how I should detect this?

> Thanks!
> Mike

Re:Detecting keypresses in memos


Quote
Michael Alan SOSS wrote:

> I'm writing an application where a user is typing in a memo.

> I need to know when the user presses the up and down arrows, or a similar
> control key that moves the cursor.

> Unfortunately, the "keypress" event isn't called with such special
> keystrokes.  Does anyone know how I should detect this?

> Thanks!
> Mike

use KeyDown instead

bye

Other Threads