[Mono-bugs] [Bug 519763] New: KeyUp event ignores NumLock status on Linux
bugzilla_noreply at novell.com
bugzilla_noreply at novell.com
Tue Jul 7 07:58:35 EDT 2009
http://bugzilla.novell.com/show_bug.cgi?id=519763
Summary: KeyUp event ignores NumLock status on Linux
Classification: Mono
Product: Mono: Class Libraries
Version: 2.4.x
Platform: All
OS/Version: Linux
Status: NEW
Severity: Normal
Priority: P5 - None
Component: Windows.Forms
AssignedTo: mono-bugs at lists.ximian.com
ReportedBy: skolima at gmail.com
QAContact: mono-bugs at lists.ximian.com
Found By: ---
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.1)
Gecko/20090624 Firefox/3.5 (.NET CLR 3.5.30729)
On Linux, Form.KeyUp event always gets called with arguments set as if NumLock
was disabled, regardless of it's real state. This bug does not occur on
Windows.
Reproducible: Always
Steps to Reproduce:
Compile the following code (gmcs -t:exe -r:System.Windows.Forms):
using System;
using System.Windows.Forms;
namespace KeyUpOnLinux
{
class Program
{
static void Main()
{
var f = new Form();
f.KeyPreview = true;
f.KeyDown += (sender, key) =>
Console.WriteLine(key.KeyValue + " " + (char)key.KeyValue);
f.KeyPress += (sender, key) =>
Console.WriteLine(key.KeyChar);
f.KeyUp += (sender, key) =>
Console.WriteLine(key.KeyValue + " " + (char)key.KeyValue);
Application.Run(f);
}
}
}
Run the application and press '2' from numerical keyboard with and without
NumLock enabled.
Actual Results:
With NumLock on:
98 b
2
40 (
With NumLock off:
40 (
40 (
Expected Results:
As produced by Mono on Windows and MS.Net:
With NumLock on:
98 b
2
98 b
With NumLock off:
40 (
40 (
Tested on Mono 2.0.1 and 2.4.1
--
Configure bugmail: http://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