Problem behavior when overriding DeletePrefCharAction



I have extended HTMLEditorKit to override DeletePrevCharAction. The new
action is added to the ActionMap of a JTextPane.

The problem is that, in response to a backspace key (physical) press, my
custom DeletePrevCharAction.actionPerformed(evt) method is called
*twice* in rapid succession if my code is executed using JDK 1.4.2.
Running the exact same code under JDK 1.5 obtains the correct/desired
behavior: the actionPerformed method is called only once per key press.

Is this a known problem or is there something additional/special that
needs to be done to replace the backspace action in 1.4.2?

Googling suggests that there were known backspace key handling problems
as between JDK 1.3 and 1.4 -- registering a new backspace key action had
to handle both pressed and typed events in 1.3, but nothing as between
1.4.x and 1.5.

What do I need to do to ensure that backspaces are handled consistently
under both 1.4.2 and 1.5?

Thanks
.



Relevant Pages

  • Re: VK_BACK will launch IE in WinCE 5.
    ... Backspace, generally, in IE would go Back. ... on my <insert keyboard type here> on my Windows CE 5.0 device, ... QFE mentioned that Backspace key closes IE. ... RegisterHotKey() and set up for that to happen, but I'd be surprised if it ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Problem behavior when overriding DeletePrefCharAction
    ... >> needs to be done to replace the backspace action in 1.4.2? ... > Are you familiar with Sun's Java Bug Database? ... handle action maps, backspace key handling, JTextPanes, etc. that might ...
    (comp.lang.java.programmer)
  • Re: Installing GIMPshop and fighting with Synaptic
    ... pressing the BackSpace key. ... edited the menurc file and inserted BackSpace between the quotes. ... Next version of GIMPshop should hopefully have the BackSpace ...
    (Ubuntu)
  • Re: Deleting rows or columns
    ... or column and pressing the Backspace key. ... Pressing Backspace deletes the rows or columns, ... Selecting a column and delting it was quite simple ...
    (microsoft.public.word.tables)
  • Re: Delete/backspace on command line
    ... the backspace key or the delete key to erase the previously typed ... I know that in bash I can use the 'stty erase' command to set this ... to send the BS character instead of the DEL one. ...
    (comp.unix.shell)