Bug 43800

Summary: [KeyBindings] "Null" and strange characters in key sequence entry widget
Product: [Eclipse Project] Platform Reporter: Nick Edgar <n.a.edgar>
Component: UIAssignee: Chris McLaren <csmclaren>
Status: RESOLVED FIXED QA Contact:
Severity: blocker    
Priority: P1 CC: douglas.pollock
Version: 3.0   
Target Milestone: 3.0 M4   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
KeySupport none

Description Nick Edgar CLA 2003-09-27 17:16:10 EDT
latest from head as of Sept. 27 2003
on top of build I20030719

- launch target
- set key bindings into emacs mode
- open a text file
- click in a word
- Esc D
- has no effect (should delete next word)

- go to key bindings page
- Text Editing / Delete Next Word shows Esc D as one of the bindings
- type Esc D in the key sequence field
- you get: Esc Null
Comment 1 Nick Edgar CLA 2003-09-27 22:10:27 EDT
Note that I was running with an older SWT (I20030719), so this may not be a 
problem in the latest.
Comment 2 Douglas Pollock CLA 2003-09-29 10:23:45 EDT
Nick, I'm going to hijack this bug for my own purposes.  The specific bug you
mention does not occur (anymore).  However, in general, something has changed
recently that has caused rather spectacular breakage.

These are the things I've noticed:
+ Typing arrow keys into the entry widget inserts strange characters.
+ Typing "Ctrl+" inserts "Null".


Problems occur on a self-hosted workbench running the latest head of
platform-ui, but do not occur on I20030925.
Comment 3 Douglas Pollock CLA 2003-09-29 11:00:18 EDT
Created attachment 6272 [details]
KeySupport

The mistake was a blind cast from int to char without checking bounds.	Leaving
the value as an int solves the problem.

Test suites all pass (except for the seg faults described in Bug 43312).
Comment 4 Douglas Pollock CLA 2003-09-29 11:01:36 EDT
nick/chris: review/apply
Comment 5 Chris McLaren CLA 2003-09-29 11:14:24 EDT
patch applied.