P
Peter B
This must be one of the strangest things I have ever come over.
I have provided a sample program below so you can test this on your own
machine.
Note: You need a PPC with AlphaNumeric keyboard for this test
If I have a textbox, and add a keydown event to it, I can write all possible
letters and use the keypad down/up/left/right. If I now write a certain
combination of two letters I cannot use the keypad arrows anymore. The valid
invalidating letterpairs I have found so far is: KA, KE and KR (most likely
more).
So, what I am saying is. If you press 'K' and then 'A' on the keyboard (not
SIP because this won't show there) the arrow buttons will generate the
"ProcessKey"-keyvalue instead of Down/Up/Left etc... hence I cannot move the
caret with the keypad after typing KA or KE...
I only have 2 PDAs with alpha-keyboard, namely a HHP Dolphin and a Intermec
700C, both show this problem...
Here is the code if anyone wish to test this. As I said, this doesn't work
using the SIP (or infact it works as it should with the SIP ;-)).
Any and many comments are welcome
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
namespace TestKeyDown
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.MainMenu mainMenu1;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(36, 60);
this.textBox1.Size = new System.Drawing.Size(140, 20);
this.textBox1.Text = "";
this.textBox1.KeyDown += new
System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
//
// label1
//
this.label1.Location = new System.Drawing.Point(24, 120);
this.label1.Size = new System.Drawing.Size(188, 20);
//
// Form1
//
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.Menu = this.mainMenu1;
this.Text = "Form1";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
Application.Run(new Form1());
}
private void textBox1_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
label1.Text = "KeyCode: " + e.KeyCode.ToString();
}
}
}
I have provided a sample program below so you can test this on your own
machine.
Note: You need a PPC with AlphaNumeric keyboard for this test
If I have a textbox, and add a keydown event to it, I can write all possible
letters and use the keypad down/up/left/right. If I now write a certain
combination of two letters I cannot use the keypad arrows anymore. The valid
invalidating letterpairs I have found so far is: KA, KE and KR (most likely
more).
So, what I am saying is. If you press 'K' and then 'A' on the keyboard (not
SIP because this won't show there) the arrow buttons will generate the
"ProcessKey"-keyvalue instead of Down/Up/Left etc... hence I cannot move the
caret with the keypad after typing KA or KE...
I only have 2 PDAs with alpha-keyboard, namely a HHP Dolphin and a Intermec
700C, both show this problem...
Here is the code if anyone wish to test this. As I said, this doesn't work
using the SIP (or infact it works as it should with the SIP ;-)).
Any and many comments are welcome
using System;
using System.Drawing;
using System.Collections;
using System.Windows.Forms;
using System.Data;
namespace TestKeyDown
{
/// <summary>
/// Summary description for Form1.
/// </summary>
public class Form1 : System.Windows.Forms.Form
{
private System.Windows.Forms.TextBox textBox1;
private System.Windows.Forms.Label label1;
private System.Windows.Forms.MainMenu mainMenu1;
public Form1()
{
//
// Required for Windows Form Designer support
//
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
/// <summary>
/// Clean up any resources being used.
/// </summary>
protected override void Dispose( bool disposing )
{
base.Dispose( disposing );
}
#region Windows Form Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.mainMenu1 = new System.Windows.Forms.MainMenu();
this.textBox1 = new System.Windows.Forms.TextBox();
this.label1 = new System.Windows.Forms.Label();
//
// textBox1
//
this.textBox1.Location = new System.Drawing.Point(36, 60);
this.textBox1.Size = new System.Drawing.Size(140, 20);
this.textBox1.Text = "";
this.textBox1.KeyDown += new
System.Windows.Forms.KeyEventHandler(this.textBox1_KeyDown);
//
// label1
//
this.label1.Location = new System.Drawing.Point(24, 120);
this.label1.Size = new System.Drawing.Size(188, 20);
//
// Form1
//
this.Controls.Add(this.label1);
this.Controls.Add(this.textBox1);
this.Menu = this.mainMenu1;
this.Text = "Form1";
}
#endregion
/// <summary>
/// The main entry point for the application.
/// </summary>
static void Main()
{
Application.Run(new Form1());
}
private void textBox1_KeyDown(object sender,
System.Windows.Forms.KeyEventArgs e)
{
label1.Text = "KeyCode: " + e.KeyCode.ToString();
}
}
}