Mysterious Key events

I've asked this list before about a strange problem I have on my
Windows XP laptop, (see http://joshenglish.livejournal.com/128621.html
for the details), and the problem exists outside of Python (about a
fifth of every email I start in GMail gets this character written into
the message).

The wxPython Demo KeyEvents.py gives me the following:
Event Type Key Name Key Code Modifiers Unicode RawKeyCode RawKeyFlags
KeyDown "ÿ" 255 ---- 255 255 17629185
KeyUp "ÿ" 255 ---- 255 255 3238854657

What are the RawKeyFlags and do they tell me anything of interest? Can
this data help me figure out what's going on? I'm not sure how to
parse that Flag into the components. At least, I'm not sure which
components to test for.

Thanks in advance

···

--
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com

Josh,

I find it very unlikely that this is a software problem (though it
might be). It is more likely a hardware problem.

I think one of the easiest and cleanest ways to test that theory would
be to download a bootable Windows or Linux CD and boot from it and
play around in that environment. If you still see the spurious key
codes, you know you're dealing with something hardware related.

···

On Sat, Aug 2, 2008 at 1:34 PM, Josh English <joshua.r.english@gmail.com> wrote:

I've asked this list before about a strange problem I have on my
Windows XP laptop, (see Plea for Windows XP help - The Incomplete Blog — LiveJournal
for the details), and the problem exists outside of Python (about a
fifth of every email I start in GMail gets this character written into
the message).

The wxPython Demo KeyEvents.py gives me the following:
Event Type Key Name Key Code Modifiers Unicode RawKeyCode RawKeyFlags
KeyDown "ÿ" 255 ---- 255 255 17629185
KeyUp "ÿ" 255 ---- 255 255 3238854657

What are the RawKeyFlags and do they tell me anything of interest? Can
this data help me figure out what's going on? I'm not sure how to
parse that Flag into the components. At least, I'm not sure which
components to test for.

Thanks in advance

--
Josh English
Joshua.R.English@gmail.com
http://joshenglish.livejournal.com
_______________________________________________
wxpython-users mailing list
wxpython-users@lists.wxwidgets.org
http://lists.wxwidgets.org/mailman/listinfo/wxpython-users

--
Stand Fast,
tjg. [Timothy Grant]

Thanks,

I will try this.

···

On Sat, Aug 2, 2008 at 4:17 PM, Timothy Grant <timothy.grant@gmail.com> wrote:

Josh,

I find it very unlikely that this is a software problem (though it
might be). It is more likely a hardware problem.

I think one of the easiest and cleanest ways to test that theory would
be to download a bootable Windows or Linux CD and boot from it and
play around in that environment. If you still see the spurious key
codes, you know you're dealing with something hardware related.

--
Josh English
Joshua.R.English@gmail.com

Josh English wrote:

I've asked this list before about a strange problem I have on my
Windows XP laptop, (see Plea for Windows XP help - The Incomplete Blog — LiveJournal
for the details), and the problem exists outside of Python (about a
fifth of every email I start in GMail gets this character written into
the message).

The wxPython Demo KeyEvents.py gives me the following:
Event Type Key Name Key Code Modifiers Unicode RawKeyCode RawKeyFlags
KeyDown "ÿ" 255 ---- 255 255 17629185
KeyUp "ÿ" 255 ---- 255 255 3238854657

What are the RawKeyFlags and do they tell me anything of interest? Can
this data help me figure out what's going on? I'm not sure how to
parse that Flag into the components. At least, I'm not sure which
components to test for.
  
A few minutes with Google would have answered the first question. The RawKeyFlags column is the LPARAM value from the WM_KEYUP and WM_KEYDOWN messages. In hex:
    KeyDown 0 1 0D 0001
    KeyUp C 1 0D 0001

Both have a repeat count of one, it is scancode 0x0D, and it is an extended key. Scancode 0x0D is usually the =/+ key, but the "extended" flag means it could be almost anything. Is there an Fn function on that key? Do you have a fancy mouse with forward and backward buttons?

···

--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.

A few minutes with Google would have answered the first question. The
RawKeyFlags column is the LPARAM value from the WM_KEYUP and WM_KEYDOWN
messages. In hex:
  KeyDown 0 1 0D 0001
  KeyUp C 1 0D 0001

And some days I can type "porn" in a google search and get no hits...
after several minutes on Google, I couldn't come up with anything but
translating these number to hexadecimal, but not what they mean.

Both have a repeat count of one, it is scancode 0x0D, and it is an extended
key. Scancode 0x0D is usually the =/+ key, but the "extended" flag means it
could be almost anything. Is there an Fn function on that key? Do you have
a fancy mouse with forward and backward buttons?

I do have an external mouse and keyboard, but the problem persists
without them plugged in.

Thanks for the information. I'm coming around to thinking this is a
hardware problem.

···

On Mon, Aug 4, 2008 at 10:08 AM, Tim Roberts <timr@probo.com> wrote:

--
Josh English
Joshua.R.English@gmail.com

Josh English wrote:

I've asked this list before about a strange problem I have on my
Windows XP laptop, (see Plea for Windows XP help - The Incomplete Blog — LiveJournal
for the details), and the problem exists outside of Python (about a
fifth of every email I start in GMail gets this character written into
the message).

The wxPython Demo KeyEvents.py gives me the following:
Event Type Key Name Key Code Modifiers Unicode RawKeyCode RawKeyFlags
KeyDown "ÿ" 255 ---- 255 255 17629185
KeyUp "ÿ" 255 ---- 255 255 3238854657

What are the RawKeyFlags and do they tell me anything of interest?

They are whatever native data is associated with the native key event, on Windows they are the values of wParam and lParam.

Can
this data help me figure out what's going on?

Probably not. wParam is the key code value and lParam is a bitfield that according to MSDN specifies the repeat count, scan code, extended-key flag, context code, previous key-state flag, and transition-state flag, none of which is used by wx when generating the EVT_KEY_DOWN/UP events.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!

Thanks, Robin.

Is there anything you don't know?

Josh

···

On Mon, Aug 4, 2008 at 11:32 AM, Robin Dunn <robin@alldunn.com> wrote:

They are whatever native data is associated with the native key event, on
Windows they are the values of wParam and lParam.

Can
this data help me figure out what's going on?

Probably not. wParam is the key code value and lParam is a bitfield that
according to MSDN specifies the repeat count, scan code, extended-key flag,
context code, previous key-state flag, and transition-state flag, none of
which is used by wx when generating the EVT_KEY_DOWN/UP events.

--
Josh English
Joshua.R.English@gmail.com

Josh English wrote:

Thanks, Robin.

Is there anything you don't know?

Lots. But knowing where to go to find out about things you don't know is 90% of the battle.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!