[Mono-bugs] [Bug 378728] WndProc(ref Message m) is not working the same on mono as on . Net

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Fri Apr 11 11:03:37 EDT 2008


https://bugzilla.novell.com/show_bug.cgi?id=378728

User jpobst at novell.com added comment
https://bugzilla.novell.com/show_bug.cgi?id=378728#c5





--- Comment #5 from Jonathan Pobst <jpobst at novell.com>  2008-04-11 09:03:37 MST ---
(Emailed to me)

Hi,

If you add the following to the application:

  System.Byte[] lBytes = System.BitConverter.GetBytes(m.LParam.ToInt32());
  Console.WriteLine("Message.LParam lBytes[2]: " + lBytes[2].ToString());
  Console.WriteLine("Message.LParam lBytes[3]: " + lBytes[3].ToString());

You will notice that lBytes[2] is an unique code for every key on the keyboard.

e.g. The 1/End on your num. Keypad has the same code regardless the num lock is
pressed.

This means that every key on the keyboard can be used for applications like
terminal emulations regardless of the .Net definition.

A Key press is always keydown, keypress, keyup (all can be read uniquely)

The lBytes[3] is a kind of flag that can be read for finding out shift, ctrl is
pressed.

Also the repeat count of a key can be called out of the LParam.

I have created some workarounds in my application to make it kind of work, but
it would be nice to have the full LParam.


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.


More information about the mono-bugs mailing list