dotgnu-general
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [DotGNU]Re: Imcomplete System.Drawing.Xsharp.DrawingWindow.MapKey(Ke


From: Rhys Weatherley
Subject: Re: [DotGNU]Re: Imcomplete System.Drawing.Xsharp.DrawingWindow.MapKey(KeyName)?
Date: Wed, 30 Jul 2003 16:40:08 +1000
User-agent: KMail/1.4.3

On Wednesday 30 July 2003 08:59 am, Mohan Embar wrote:

> When I wrote this, I was thinking of the special characters [Ctrl+C]
> (copy), [Ctrl+X] (paste), etc. which TextBoxes need to support. Putting
> these in the KeyDown handler would allow me to consolidate all such special
> characters into one method instead of dispersing the logic in KeyDown and
> KeyPress handlers.

That should now work, thanks to the extra keycodes that I introduced to 
"MapKey" yesterday.   I suggest filtering out all characters below 0x0020 in 
"KeyPress" before inserting characters into the text field.  This should 
hopefully work with accented characters also.

> Getting back to the treatment of accented characters and a blatantly
> non-purist handling thereof: what if you were to add a
> ToolkitKeys.Unspecified (or ToolkitKeys.Special - I'm notoriously bad at
> names) which mapped to Keys.None but nevertheless allowed you to determine
> whether KeyUp and KeyDown events need to be generated? This would be a
> massive
> shortcut/hack and if you're uncomfortable with it, you could also call
> it a temporary solution. Just brainstorming here....

I modified it so that it will always deliver the "KeyDown" event (with the 
code set to "ToolkitKeys.None"), even if the key is not understood.

Cheers,

Rhys.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]