Project

General

Profile

Actions

Bug #1197

closed

WKeyEvent returns a wrong charCode and text

Added by Pieter Libin almost 13 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Pieter Libin
Target version:
Start date:
03/19/2012
Due date:
% Done:

0%

Estimated time:

Description

WKeyEvent returns a wrong charCode and text.

The documentation of WKeyEvent::charCode() states that: for WInteractWidget::keyWentDown and WInteractWidget::keyWentUp events, '0' is returned.

The documentation of WKeyEvent::text() states that: for the WInteractWidget::keyWentDown and WInteractWidget::keyWentUp events, an empty string is returned.

The widgetgallery example shows this information, so once this is fixed, the example should not show the text and charCode if charCode==0.

Actions #1

Updated by Koen Deforche over 12 years ago

  • Status changed from New to InProgress
  • Assignee set to Pieter Libin
  • Target version set to 3.2.2
Actions #2

Updated by Pieter Libin over 12 years ago

  • Status changed from InProgress to Resolved

Before closing this issue, we should test it with IE6!

Actions #3

Updated by Koen Deforche over 12 years ago

works in IE6

Actions #4

Updated by Koen Deforche over 12 years ago

  • Status changed from Resolved to Closed

Released in Wt 3.2.2

Actions #5

Updated by W X over 11 years ago

Hi,

In my application I need to catch KeyWentDown and KeyWentUp events and use the code of the key that was pressed/released. With wt.3.2.1 charCode() seem to do the job, but with wt.3.3.0 it doesn't work anymore (charCode() returns 0 as specified in docs after the change above).

I tried using the key() method, as recommended in the docs, but, for numerical keys for example, it returns 0. Using keyCode() is not of much help since it is marked as deprecated and the documentation says that it returns browser specific codes.

Is there a reliable way to get the key code on KeyWentDown and KeyWentUp events, with wt.3.3.0 ?

Thanks!

Actions

Also available in: Atom PDF