[BUG] Textbox KeyDown weirdness

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();
}
}
}
 
P

Peter B

Here are some more observations, they may or may not be correct:

1. Only applies to PPC2003, I have been unable to reproduce the error on a
PPC2002 device.

2. It does happen on a SIP-based device as well. But only once! If you use
the test program I sent in the previous message you will notice that the
first up/down/left/right keypress, after a valid key-combination has been
inserted, will generate a ProcessKey-KeyCode, but the following will not.
This can have something to do with item 3

3. I have noticed that if you remove focus from the textbox and back to it
again this fenomena will go away.

4. As far as I see, it only happens when there is 2 characters, and there
are only ceratin combinations of chars that cause the error. I have found no
logic in which combinations work and don't work... Using a and k as first
character produces ProcessKey event when most other characters are used as
second char.

Feedback please :)


This really mess things up in my app. I have textbox-combobox and
textbox-listview pairs in which you type you chars in the textbox and only
the matching items in the respective views ar listed. I then use up/down to
navigate in the list but keep focus in the textbox. If I type KR I cannot
move or do anything with the arrow-buttons :-(

/ Peter
 
P

Peter B

Ok... am I the only one experiencing this or was it not very interesting?

Is it not a bug, is it well known?

I thought someone would make some kind of remark atleast :)

/ P
 
S

Serg Kuryata [MS]

Hello Peter,

I think that the behavior that you are seeing is because of the Auto
Complete functionality but I might be wrong. When you type a word in a
textbox, the Auto Complete suggests you a word that it thinks you might be
typing. For example, when you type "ka", Auto Complete suggests you "kansas
city". If you press one of the navigation keys when such a suggestion is
shown then you'll get the ProcessKey instead of the key you pressed. But if
you wait until the suggestion window goes away and then press a navigation
key, you'll get the correct key code. I also verified that this behavior
does not reproduce on Pocket PC 2002.

I'll file a bug and let you know about results as soon as I get them back.

Best regards,
Sergiy.


This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Peter B" <[email protected]>
| References: <#[email protected]>
<[email protected]>
| Subject: Re: [BUG] Textbox KeyDown weirdness
| Date: Mon, 26 Apr 2004 17:35:12 +0200
| Lines: 9
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.compactframework:51748
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Ok... am I the only one experiencing this or was it not very interesting?
|
| Is it not a bug, is it well known?
|
| I thought someone would make some kind of remark atleast :)
|
| / P
|
|
|
 
P

Peter B

Thanks for your reply Sergiy!

So the Auto Complete is on (hidden?) even if the SIP isn't activated? I
mean, the most certain case to get the "error" is with a PocketPC with full
alpha-numeric keyboard, is Auto Complete used in the background when typing
with such a keyboard?

regards,

Peter
 
S

Serg Kuryata [MS]

Hi Peter,

The problem that you described is not caused by a bug in the .NET Compact
Framework. The .NET Compact Framework just receives data from the
underlying OS passes it to you. So, it looks like that the OS is doing
something wrong. I passed this problem to the Windows CE team, so they
could investigate it and fix for a future version.

Meanwhile, you can try to workaround the problem by disabling the auto
complete functionality. Here is a link to an article that explains how to
do it: http://www.pocketpcdn.com/articles/wordcompletion.html.


Hope this helps.
Best regards,
Sergiy.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Peter B" <[email protected]>
| References: <#[email protected]>
<[email protected]>
<#[email protected]>
<ezmUV$#[email protected]>
| Subject: Re: [BUG] Textbox KeyDown weirdness
| Date: Tue, 27 Apr 2004 09:22:05 +0200
| Lines: 75
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.compactframework:51816
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Thanks for your reply Sergiy!
|
| So the Auto Complete is on (hidden?) even if the SIP isn't activated? I
| mean, the most certain case to get the "error" is with a PocketPC with
full
| alpha-numeric keyboard, is Auto Complete used in the background when
typing
| with such a keyboard?
|
| regards,
|
| Peter
|
| --
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| | > Hello Peter,
| >
| > I think that the behavior that you are seeing is because of the Auto
| > Complete functionality but I might be wrong. When you type a word in a
| > textbox, the Auto Complete suggests you a word that it thinks you might
be
| > typing. For example, when you type "ka", Auto Complete suggests you
| "kansas
| > city". If you press one of the navigation keys when such a suggestion is
| > shown then you'll get the ProcessKey instead of the key you pressed. But
| if
| > you wait until the suggestion window goes away and then press a
navigation
| > key, you'll get the correct key code. I also verified that this behavior
| > does not reproduce on Pocket PC 2002.
| >
| > I'll file a bug and let you know about results as soon as I get them
back.
| >
| > Best regards,
| > Sergiy.
| >
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Peter B" <[email protected]>
| > | References: <#[email protected]>
| > <[email protected]>
| > | Subject: Re: [BUG] Textbox KeyDown weirdness
| > | Date: Mon, 26 Apr 2004 17:35:12 +0200
| > | Lines: 9
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| > | Message-ID: <#[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.compactframework
| > | NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| > | Path:
| >
|
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
| > phx.gbl
| > | Xref: cpmsftngxa10.phx.gbl
| > microsoft.public.dotnet.framework.compactframework:51748
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| > |
| > | Ok... am I the only one experiencing this or was it not very
| interesting?
| > |
| > | Is it not a bug, is it well known?
| > |
| > | I thought someone would make some kind of remark atleast :)
| > |
| > | / P
| > |
| > |
| > |
| >
|
|
|
 
P

Peter B

Hi Serg!

The article you provided assumes you are working with the SIP. I don't do
that in the general case, since I have full keyboards on the pocketpc. Do
you mean that auto word complete is active even when the SIP isn't active?

Also I am working in C# so unfortunately the code in the article can't be
used very easily, but ofc I will dig up the related resources if you confirm
that the word completion is active without the SIP.

regards,

Peter

--
This posting is provided "AS IS" with no warranties, and confers no rights.


Serg Kuryata said:
Hi Peter,

The problem that you described is not caused by a bug in the .NET Compact
Framework. The .NET Compact Framework just receives data from the
underlying OS passes it to you. So, it looks like that the OS is doing
something wrong. I passed this problem to the Windows CE team, so they
could investigate it and fix for a future version.

Meanwhile, you can try to workaround the problem by disabling the auto
complete functionality. Here is a link to an article that explains how to
do it: http://www.pocketpcdn.com/articles/wordcompletion.html.


Hope this helps.
Best regards,
Sergiy.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Peter B" <[email protected]>
| References: <#[email protected]>
<[email protected]>
<#[email protected]>
<ezmUV$#[email protected]>
| Subject: Re: [BUG] Textbox KeyDown weirdness
| Date: Tue, 27 Apr 2004 09:22:05 +0200
| Lines: 75
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
phx.gbl
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.compactframework:51816
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Thanks for your reply Sergiy!
|
| So the Auto Complete is on (hidden?) even if the SIP isn't activated? I
| mean, the most certain case to get the "error" is with a PocketPC with
full
| alpha-numeric keyboard, is Auto Complete used in the background when
typing
| with such a keyboard?
|
| regards,
|
| Peter
|
| --
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| | > Hello Peter,
| >
| > I think that the behavior that you are seeing is because of the Auto
| > Complete functionality but I might be wrong. When you type a word in a
| > textbox, the Auto Complete suggests you a word that it thinks you might
be
| > typing. For example, when you type "ka", Auto Complete suggests you
| "kansas
| > city". If you press one of the navigation keys when such a suggestion is
| > shown then you'll get the ProcessKey instead of the key you pressed. But
| if
| > you wait until the suggestion window goes away and then press a
navigation
| > key, you'll get the correct key code. I also verified that this behavior
| > does not reproduce on Pocket PC 2002.
| >
| > I'll file a bug and let you know about results as soon as I get them
back.
| >
| > Best regards,
| > Sergiy.
| >
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Peter B" <[email protected]>
| > | References: <#[email protected]>
| > <[email protected]>
| > | Subject: Re: [BUG] Textbox KeyDown weirdness
| > | Date: Mon, 26 Apr 2004 17:35:12 +0200
| > | Lines: 9
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| > | Message-ID: <#[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.compactframework
| > | NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| > | Path:
| >
|
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
| > phx.gbl
| > | Xref: cpmsftngxa10.phx.gbl
| > microsoft.public.dotnet.framework.compactframework:51748
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| > |
| > | Ok... am I the only one experiencing this or was it not very
| interesting?
| > |
| > | Is it not a bug, is it well known?
| > |
| > | I thought someone would make some kind of remark atleast :)
| > |
| > | / P
| > |
| > |
| > |
| >
|
|
|
 
S

Serg Kuryata [MS]

It looks like that the Auto-Complete is active even when an attachable
keyboard is used (and SIP is not used). The sample code from the article
disables auto-completion for both input methods. I tested it using a native
application and it worked around the problem.

Thank you,
Sergiy.

This posting is provided "AS IS" with no warranties, and confers no rights.
--------------------
| From: "Peter B" <[email protected]>
| References: <#[email protected]>
<[email protected]>
<#[email protected]>
<ezmUV$#[email protected]>
<[email protected]>
<[email protected]>
| Subject: Re: [BUG] Textbox KeyDown weirdness
| Date: Thu, 29 Apr 2004 09:37:44 +0200
| Lines: 154
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| Path:
cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftngp13
.phx.gbl
| Xref: cpmsftngxa10.phx.gbl
microsoft.public.dotnet.framework.compactframework:52033
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hi Serg!
|
| The article you provided assumes you are working with the SIP. I don't do
| that in the general case, since I have full keyboards on the pocketpc. Do
| you mean that auto word complete is active even when the SIP isn't active?
|
| Also I am working in C# so unfortunately the code in the article can't be
| used very easily, but ofc I will dig up the related resources if you
confirm
| that the word completion is active without the SIP.
|
| regards,
|
| Peter
|
| --
| This posting is provided "AS IS" with no warranties, and confers no
rights.
|
|
| | > Hi Peter,
| >
| > The problem that you described is not caused by a bug in the .NET
Compact
| > Framework. The .NET Compact Framework just receives data from the
| > underlying OS passes it to you. So, it looks like that the OS is doing
| > something wrong. I passed this problem to the Windows CE team, so they
| > could investigate it and fix for a future version.
| >
| > Meanwhile, you can try to workaround the problem by disabling the auto
| > complete functionality. Here is a link to an article that explains how
to
| > do it: http://www.pocketpcdn.com/articles/wordcompletion.html.
| >
| >
| > Hope this helps.
| > Best regards,
| > Sergiy.
| >
| > This posting is provided "AS IS" with no warranties, and confers no
| rights.
| > --------------------
| > | From: "Peter B" <[email protected]>
| > | References: <#[email protected]>
| > <[email protected]>
| > <#[email protected]>
| > <ezmUV$#[email protected]>
| > | Subject: Re: [BUG] Textbox KeyDown weirdness
| > | Date: Tue, 27 Apr 2004 09:22:05 +0200
| > | Lines: 75
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| > | Message-ID: <[email protected]>
| > | Newsgroups: microsoft.public.dotnet.framework.compactframework
| > | NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| > | Path:
| >
|
cpmsftngxa10.phx.gbl!TK2MSFTFEED01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
| > phx.gbl
| > | Xref: cpmsftngxa10.phx.gbl
| > microsoft.public.dotnet.framework.compactframework:51816
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| > |
| > | Thanks for your reply Sergiy!
| > |
| > | So the Auto Complete is on (hidden?) even if the SIP isn't activated?
I
| > | mean, the most certain case to get the "error" is with a PocketPC with
| > full
| > | alpha-numeric keyboard, is Auto Complete used in the background when
| > typing
| > | with such a keyboard?
| > |
| > | regards,
| > |
| > | Peter
| > |
| > | --
| > | This posting is provided "AS IS" with no warranties, and confers no
| > rights.
| > |
| > |
| > | | > | > Hello Peter,
| > | >
| > | > I think that the behavior that you are seeing is because of the Auto
| > | > Complete functionality but I might be wrong. When you type a word
in a
| > | > textbox, the Auto Complete suggests you a word that it thinks you
| might
| > be
| > | > typing. For example, when you type "ka", Auto Complete suggests you
| > | "kansas
| > | > city". If you press one of the navigation keys when such a
suggestion
| is
| > | > shown then you'll get the ProcessKey instead of the key you pressed.
| But
| > | if
| > | > you wait until the suggestion window goes away and then press a
| > navigation
| > | > key, you'll get the correct key code. I also verified that this
| behavior
| > | > does not reproduce on Pocket PC 2002.
| > | >
| > | > I'll file a bug and let you know about results as soon as I get them
| > back.
| > | >
| > | > Best regards,
| > | > Sergiy.
| > | >
| > | >
| > | > This posting is provided "AS IS" with no warranties, and confers no
| > | rights.
| > | > --------------------
| > | > | From: "Peter B" <[email protected]>
| > | > | References: <#[email protected]>
| > | > <[email protected]>
| > | > | Subject: Re: [BUG] Textbox KeyDown weirdness
| > | > | Date: Mon, 26 Apr 2004 17:35:12 +0200
| > | > | Lines: 9
| > | > | X-Priority: 3
| > | > | X-MSMail-Priority: Normal
| > | > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
| > | > | X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
| > | > | Message-ID: <#[email protected]>
| > | > | Newsgroups: microsoft.public.dotnet.framework.compactframework
| > | > | NNTP-Posting-Host: h113n2fls34o264.telia.com 217.208.187.113
| > | > | Path:
| > | >
| > |
| >
|
cpmsftngxa10.phx.gbl!TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09
| > | > phx.gbl
| > | > | Xref: cpmsftngxa10.phx.gbl
| > | > microsoft.public.dotnet.framework.compactframework:51748
| > | > | X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
| > | > |
| > | > | Ok... am I the only one experiencing this or was it not very
| > | interesting?
| > | > |
| > | > | Is it not a bug, is it well known?
| > | > |
| > | > | I thought someone would make some kind of remark atleast :)
| > | > |
| > | > | / P
| > | > |
| > | > |
| > | > |
| > | >
| > |
| > |
| > |
| >
|
|
|
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top