Bug 5216 - TVT1: Cannot type characters a, c, f, p, v, x, y and z in Task List description field on German machine
Summary: TVT1: Cannot type characters a, c, f, p, v, x, y and z in Task List descripti...
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 1.0   Edit
Hardware: PC Windows 2000
: P1 critical (vote)
Target Milestone: ---   Edit
Assignee: Nick Edgar CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-10-24 12:29 EDT by Cam-Thu Le CLA
Modified: 2002-02-01 14:09 EST (History)
2 users (show)

See Also:


Attachments
Spanish Screen Shot (98.83 KB, image/jpeg)
2001-11-08 15:43 EST, Scott Fairbrother CLA
no flags Details
Keyboeard Input Problems on Briziallan machine. (265.14 KB, image/jpeg)
2001-11-08 15:54 EST, Scott Fairbrother CLA
no flags Details
Problem typing characters into the editor and task list (215.53 KB, image/jpeg)
2001-11-08 16:32 EST, Scott Fairbrother CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Cam-Thu Le CLA 2001-10-24 12:29:26 EDT
NOTE: TVT problem from RTP.

Summary: 

Create a task, try to enter all the letters of the alphabet (including special 
characters such as u with umlaut) in the description.

Unable to type characters a, c, f, p, v, x, y and z on German version of 
Win2000.  It acts as if the Ctrl key is stuck in the down position, but we 
verified independently on three different German machines the same behavior.

We can enter text in the default text editor.  I suspect this bug lies in the 
CText code.
Comment 1 Cam-Thu Le CLA 2001-10-24 18:49:01 EDT
We found with further testing that this problem applies to the text editor in 
general (i.e., the Default Text Editor).  Thus the problem appears to be in 
org.eclipse.swt.custom.StyledText's keystroke handling -- it acts as if the 
control key is always down.

NOTE: The problem DOES NOT occur until the fragments are installed.  In other 
words, on a "vanilla" US English version, the problem doesn't happen.

I raised the severity of this problem because it prevents the usage of the Java 
editor and the Default Text editor (basically anywhere StyledText is used).
Comment 2 Dan Kehn CLA 2001-10-26 10:20:11 EDT
Changed to be v1.0.
Comment 3 Tod Creasey CLA 2001-10-26 16:57:47 EDT
The problem is the mapping of the global actions on platforms where Control is 
named differently on the keyboard (in German it is Strg for Steuerung). When 
the labels for the global actions are parsed the check for the hot keys are 
done using the English words (Ctrl in this case) rather than the German words - 
this check needs to be internationalized.

Specifically these characters map to the following global actions (as can be 
seen on the edit menu)
a - Select All
c - Copy
f - Find Replace
p - Print
v - Paste
x - Cut
y - Redo
z - Undo
Comment 4 Scott Fairbrother CLA 2001-11-08 15:42:24 EST
This problem entering NL characters also occurs when exporting to a zip or a 
jar file or to the file system on Spanish machines.
National characters to be tested:

Cannot type NL characters on the export destination field:
For accents ´ : press the key between Ñ and Ç and then the corresponding letter

For umlaut ¨ : press Shift and same procedure as above

For Ñ : press Ñ key

áÁ - éÉ - íÍ - óÓ - úÚ - üÜ - ñÑ
Comment 5 Scott Fairbrother CLA 2001-11-08 15:43:58 EST
Created attachment 106 [details]
Spanish Screen Shot
Comment 6 Scott Fairbrother CLA 2001-11-08 15:53:43 EST
Brazilian Portugese:
Problem entering all national characters in the "Zip file name" but one on 
Brazilian Portugese.
Problem is similar but not equal to Spain (2K platform). The same symptom 
happens with the "Search Text"  and "Search Java"  option, and with 
the "Find/Replace"  option.
Comment 7 Scott Fairbrother CLA 2001-11-08 15:54:29 EST
Created attachment 107 [details]
Keyboeard Input Problems on Briziallan machine.
Comment 8 Scott Fairbrother CLA 2001-11-08 16:31:45 EST
More on the spanish NL input problem:

Unable to enter some characters in the task description and the editor.  THe 
characers that we can't enter correspond to hot keys of the english context 
menus for editors.  

When you try to type one of those characters the short cut action is performed.
a <- will select all
l <- will go to end of line 
Comment 9 Scott Fairbrother CLA 2001-11-08 16:32:44 EST
Created attachment 108 [details]
Problem typing characters into the editor and task list
Comment 10 Tod Creasey CLA 2001-11-20 13:01:44 EST
The problem is in the following method in Action

public static int findModifier(String token) {
	token= token.toUpperCase();
	if (token.equals("CTRL"))//$NON-NLS-1$
		return SWT.CTRL;
	if (token.equals("SHIFT"))//$NON-NLS-1$
		return SWT.SHIFT;
	if (token.equals("ALT"))//$NON-NLS-1$
		return SWT.ALT;
	return 0;
}

These key names are not the same in all languages (Ctrl is Strg in German for 
instance).

We have two options
1) Internationalize the key names. This option will not work if you have a 
mismatch between machines and keyboards though as it will always use the locale 
of the machine. This is especially a problem on Windows 2000 where the locale 
can be switched on the fly.

2) Add an extra entry to the plugin.xml to specify the accelerator keys 
numerically as these ASCII values are universal. Keep the menus as they are
and test the keycode instead.

I have a strong preference to option 2. We will also have to address the 
backwards compatibility with the current implementation. We can do this by 
allowing an option of either labels or keycodes with keycodes taking 
preference. We also need to disallow accelerators that do not use Shift, 
Control or Alt.
Comment 11 Kevin Haaland CLA 2001-11-21 17:17:07 EST
Pls verify with the SWT team that they guarantee these values on all platforms. 
Comment 12 Nick Edgar CLA 2001-11-23 15:43:37 EST
Fixed in build > 20011122.
Comment 13 Nick Edgar CLA 2001-11-23 15:43:55 EST
Also applied as patch to 1.0.
Comment 14 Cam-Thu Le CLA 2001-12-11 13:52:07 EST
See bug 6809. Still have problem with accented char for Spanish and Brazilian 
Portuguese.
Comment 15 Tod Creasey CLA 2001-12-11 14:00:12 EST
This was problem due to accelerators not understanding the translated words for 
Control Shift and Alt. This manifested itself in not being able to type 
characters that had an accelerator that used them which are all English 
characters.

The problem with Spanish and Portuguese characters is not related to this 
problem as it was a problem with the English characters on a non-English 
platform.
Comment 16 adrian CLA 2002-02-01 13:55:09 EST
1.- So how was it fixed?  Option 2 in Tod Creasey's comments?

2.- I set my actions from the *code* (i.e., not via plugin.xml), and encountered 
this same problem (I was setting's the action text to, say, "Kopy Strg+C" (a 
'German' Copy Ctrl+C), which was failing as described.  Now I set everything in 
English, and hope Eclipse will translate these accelerators on the 
menus according to the active locale.  >>> Will it?? <<<
(I will use the Action.setAccelerator in Eclipse R2.0, but I still need R1.0 as 
well).

3.- Also, using in setText() the official names recognized for accelerator 
key codes (see Action.initKeyCodes()) gives strange results.  For example, I use 
"Find top@CTRL+PAGE_UP", this is exactly that text that appears on the menu 
item!!   Ugly!! I would expect "Find top  Ctrl+Page Up"...  Is there a solution 
here??
Comment 17 Tod Creasey CLA 2002-02-01 14:09:47 EST
The fix for 1.0 is that the accelerator keys are Locale sensitive. This support 
will not be in 2.0 which will use the accelerator tag.

In your example 
Kopieren Strg+C will work on a German platform as 1.0 has a translation for the 
Control key.

Refer to the appropirate org/eclipse/jface/messages.properties in your 
fragments for the mappings. For German they are:

AcceleratorKeys.Control=STRG
AcceleratorKeys.Alt=ALT
AcceleratorKeys.Shift=UMSCHALT
AcceleratorKeys.Backspace=R\u00DCCK
AcceleratorKeys.Tab=TABULATOR
AcceleratorKeys.Return=RETURN
AcceleratorKeys.Enter=EINGABE
AcceleratorKeys.Escape=ESC
AcceleratorKeys.Delete=ENTF
AcceleratorKeys.Space=LEER
AcceleratorKeys.ArrowUp=NACH-OBEN
AcceleratorKeys.ArrowDown=NACH-UNTEN
AcceleratorKeys.ArrowLeft=NACH-LINKS
AcceleratorKeys.ArrowRight=NACH-RECHTS
AcceleratorKeys.PageUp=BILD-AUF
AcceleratorKeys.PageDown=BILD-AB
AcceleratorKeys.Home=POS1
AcceleratorKeys.End=ENDE
AcceleratorKeys.Insert=EINFG
AcceleratorKeys.F1=F1
AcceleratorKeys.F2=F2
AcceleratorKeys.F3=F3
AcceleratorKeys.F4=F4
AcceleratorKeys.F5=F5
AcceleratorKeys.F6=F6
AcceleratorKeys.F7=F7
AcceleratorKeys.F8=F8
AcceleratorKeys.F9=F9
AcceleratorKeys.F10=F10
AcceleratorKeys.F11=F11
AcceleratorKeys.F12=F12

Page_up and Page_Down are the Page up and Page Down accelerators for 1.0. In 
2.0 you can use whatever you like as they are overridden by the accelerator.