This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 145306 - [65cat] 'ç' keyboard key don't recognized by IDE main window
Summary: [65cat] 'ç' keyboard key don't recognized by IDE main window
Status: RESOLVED WORKSFORME
Alias: None
Product: editor
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: issues@editor
URL:
Keywords: I18N
Depends on:
Blocks:
 
Reported: 2008-08-27 14:48 UTC by Michel Graciano
Modified: 2010-02-18 09:17 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
IDE log file (62.63 KB, text/plain)
2008-09-01 15:58 UTC, Michel Graciano
Details
New log file (50.96 KB, text/plain)
2008-11-19 13:19 UTC, Michel Graciano
Details
More logs (59.22 KB, text/plain)
2008-11-19 13:22 UTC, Michel Graciano
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Michel Graciano 2008-08-27 14:48:21 UTC
[ BUILD # : 200808261401 ]
[ JDK VERSION : 1.6.0_07 ]

Product Version: NetBeans IDE Dev (Build 200808261401)
Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23
System: Linux version 2.6.24-21-generic running on i386; ISO-8859-1;
pt_BR (nb)
Userdir: /home/hmichel/.netbeans/dev

If I am in editor or any text field in toolbar, my 'ç' don't work.
The message 'Unknow keycode: 0x0', but if I am in Options dialog for
example, editing Ant path, it works perfectly.
Comment 1 Lukas Hasik 2008-08-27 15:21:57 UTC
reassigning to editor.
I can write Czech - šěščřžýáí - in editor without any problem

hmichel, what means "any text field in toolbar"? I don't have textfields in toolbar :(
And what editor? I used java.
Comment 2 Michel Graciano 2008-08-27 15:28:52 UTC
Hi,
I have a plugin, the Sandip regex highlighter, which has a text field in the toolbar. BTW, I forgot to say, I can just
write 'ç' when I press ' + c which are translated to ç. This is the workaround I use for a while. I will try to test in
my Win XP workstation later, but AFAIR it works on it.

Regards
Comment 3 Vitezslav Stejskal 2008-08-28 14:26:28 UTC
Are you sure that 'ç' can be handled by ISO-8859-1 encoding? Could you please try to run Netbeans with
'-J-Dfile.encoding=UTF-8' added in <nb-inst>/etc/netbeans.conf and see if it fixes the problem? Also, could you try to
do the same with java notepad (eg run 'java -jar $JAVA_HOME/demo/jfc/Notepad/Notepad.jar' or the equivalent for your OS
and type the character to the notepad's text area). Thanks
Comment 4 Michel Graciano 2008-08-28 14:45:46 UTC
> Are you sure that 'ç' can be handled by ISO-8859-1 encoding?
Yes, ISO-8859-1 is the default Windows encoding, where is works fine. Just my 'ç' key don't works, if I press ' + c the
'ç' char is inserted in nb editor, btw, if I try to use ç key for Options text field, as Ant path, it works. It just
don't works for nb editor and main window text fields.

> Could you please try to run Netbeans with '-J-Dfile.encoding=UTF-8' added in <nb-inst>/etc/netbeans.conf and see if
> it fixes the problem?
For:
Product Version: NetBeans IDE Dev (Build 200808261401)
Java: 1.6.0_07; Java HotSpot(TM) Client VM 10.0-b23
System: Linux version 2.6.24-21-generic running on i386; UTF-8; pt_BR (nb)
Userdir: /home/hmichel/.netbeans/dev

it doesn't work too.

> Also, could you try to do the same with java notepad (eg run 'java -jar $JAVA_HOME/demo/jfc/Notepad/Notepad.jar' or
the > equivalent for your OS and type the character to the notepad's text area)
Yes, it works perfectly.

BTW, I don't think it is a I18N problem. It is some problem about the keycode NetBeans is interpreting from my keyboard,
just for editor, since this key can be used in another text IDE text components.
If you need any test, just let me know.

Thanks
Comment 5 Vitezslav Stejskal 2008-08-29 14:24:30 UTC
I added more logging to BaseKit.DefaultKeyTypedAction which should now show what commands it is processing. The change
was pushed as http://hg.netbeans.org/main/rev/4c0b853bceba. Could you please download hudson build containing this
changeset and run it with '-J-Dorg.netbeans.editor.BaseKit.level=FINE'. In the console window or log file you should see
messages like 'Processing command char: XX' or 'Invalid command char: XX'. Please try to type the 'ç' char and attach
the log file here. The log file is in <ide-userdir>/var/log/messages.log. Thanks
Comment 6 Michel Graciano 2008-08-29 14:45:06 UTC
Can you send me the jar for these?
The last main builds are unstable or failing and I don't like to get it. Is it possible?

Regards
Comment 7 Quality Engineering 2008-08-30 05:32:39 UTC
Integrated into 'main-golden', available in build *200808300201* on http://bits.netbeans.org/dev/nightly/
Changeset: http://hg.netbeans.org/main/rev/4c0b853bceba
User: Vita Stejskal <vstejskal@netbeans.org>
Log: #145306: diagnostic logs
Comment 8 Vitezslav Stejskal 2008-09-01 12:12:25 UTC
No, please download the build. You can use it just for this test. Thanks
Comment 9 Michel Graciano 2008-09-01 15:58:19 UTC
Created attachment 68798 [details]
IDE log file
Comment 10 Michel Graciano 2008-09-01 16:02:17 UTC
Hi,
I tested with several kind of editors as java, text and sql. No entries on log file for this, but if I use keys as A, B
or C it is inserted on file. Just let me know if you need more help.
Comment 11 Vitezslav Stejskal 2008-09-01 20:16:57 UTC
Thanks for that. So, it seems that something is swallowing the keystroke even before it reaches our
DefaultKeyTypedAction. I'm not sure how to find who without patching JDK/Swing classes. Milo, do you have any idea? Thanks
Comment 12 Michel Graciano 2008-10-02 17:49:17 UTC
Any news about it?
Comment 13 Max Sauer 2008-11-19 10:52:46 UTC
Milo, any idea?
Comment 14 Miloslav Metelka 2008-11-19 13:06:46 UTC
The text might be inserted by an input method - the code in JTextComponent.replaceInputMethodText().
We could try to debug the running IDE to find out how the method executes. What is your keyboard layout and what key
combination do you use for typing of the special char? I've seen "pt_br" in the report so it should stand for Brazilian
Portuguese, right?

You may also try run NB with

 -J-Dnetbeans.debug.editor.document=true -J-Dnetbeans.debug.editor.document.stack=true

to see whether e.g. the text is not inserted and removed afterwards for some reason.
Comment 15 Michel Graciano 2008-11-19 13:13:43 UTC
I use IDE in English by default for now, so, now I am starting NB with the --locale en:US parameter. I will test
following the instructions and post here more details soon. This is my current environment:

Product Version: NetBeans IDE 6.5 (Build 200811100001)
Java: 1.6.0_10; Java HotSpot(TM) Client VM 11.0-b15
System: Linux version 2.6.27-8-generic running on i386; ISO-8859-1; en_US (nb)
Userdir: /home/hmichel/.netbeans/6.5
Comment 16 Michel Graciano 2008-11-19 13:19:52 UTC
Created attachment 73907 [details]
New log file
Comment 17 Michel Graciano 2008-11-19 13:22:24 UTC
Created attachment 73908 [details]
More logs
Comment 18 Michel Graciano 2008-11-19 13:25:25 UTC
I attached 2 log files, where the first one I just opened a class file and typed 'ç' key, and I just can see the 'Unknow
keycode: 0x0' text at status bar. The second I typed 'a', 'b' and 'c' keys, and everything work fine (I can see
exceptions on log file, but the class file was saved without any problem). Just let me know if you need more details or
some specific use case.

Regards
Comment 19 Vitezslav Stejskal 2010-02-18 08:37:59 UTC
(In reply to comment #16)
> Created an attachment (id=73907) [details]
> New log file

In this log file there are no keystrokes logged. It shows only the initial loading of the document. This corresponds to what you described earlier and my suspicion that 'something' intercepts key-typed events and steals the one for 'ç'. Which is why the key-typed event does not arrive to the editor. We have to find out who is this thief.
Comment 20 Michel Graciano 2010-02-18 08:46:29 UTC
Hi Vita,
I tested right now at 6.8 and everything is okey for now. Or it was fixed by another issue or some plugin was the thief. BTW, you can close this as you wish, I consider it resolved. Thanks for your great work.
Comment 21 Vitezslav Stejskal 2010-02-18 09:17:29 UTC
Ok, Michel. Thanks