View previous topic :: View next topic |
Author |
Message |
gwiener n00b
Joined: 12 May 2005 Posts: 6
|
Posted: Thu May 12, 2005 11:25 am Post subject: Cannot type lowercase letters in Java applications |
|
|
Hi,
I encounter this most annoying problem: In all java applications that I have, and both in java versions 1.4 and 1.5, I cannot type lowercase letters - only capital letters. I use Sun's jdks.
This problem makes some applications that I need useless. Please help.
Thanks,
Guy Wiener. |
|
Back to top |
|
|
ekutay l33t
Joined: 30 Mar 2005 Posts: 636 Location: Berlin
|
Posted: Thu May 12, 2005 8:35 pm Post subject: |
|
|
Hmm, sounds really strange. Can you compile and run this script?
Quote: | import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class Check
{
public static void main(String[] args) throws IOException
{
while(true)
{
System.out.println(as"Type something:");
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
String input = reader.readLine();
System.out.println("You have typed: [" + input + "]" );
}
}
}
|
You must save this as a file named Check.java and compile it with
To run it you have to type
End the loop with CTRL-C. Does this show the same problem? _________________ -- erol |
|
Back to top |
|
|
gwiener n00b
Joined: 12 May 2005 Posts: 6
|
Posted: Thu May 12, 2005 9:56 pm Post subject: That works |
|
|
Yes, this little test script works alright. Meaning, the problem is specific to AWT/Swing. |
|
Back to top |
|
|
ekutay l33t
Joined: 30 Mar 2005 Posts: 636 Location: Berlin
|
Posted: Thu May 12, 2005 10:08 pm Post subject: |
|
|
Or your applications _________________ -- erol |
|
Back to top |
|
|
gwiener n00b
Joined: 12 May 2005 Posts: 6
|
Posted: Fri May 13, 2005 7:48 am Post subject: |
|
|
I don't believe so. I tried it with really standard applications like jedit and argo, and even InteliJ IDEA, and they all failed. It has to be something that related to the JVM and its configuration in my Gentoo. |
|
Back to top |
|
|
ekutay l33t
Joined: 30 Mar 2005 Posts: 636 Location: Berlin
|
Posted: Fri May 13, 2005 8:52 am Post subject: |
|
|
that sounds really strange, as usually you would have to intercept every key event alá Quote: | if (e.getID() == Key.Event.KEY_TYPED) e.setKeyChar(Character.toUpperCase(e.getKeyChar)); |
Better to check for lower case first and then convert it into upper case.
But as you see, this actually not that easy, eg you have to do it manually and I have never ever heard about the possibility to convert every character by default to uppercase by using a VM switch. If you find it, tell me
Maybe somebody else has an idea, I have no reasonable clue, perhaps your caps lock or xsettings, but this would result in similar behaviour without Java. _________________ -- erol |
|
Back to top |
|
|
gwiener n00b
Joined: 12 May 2005 Posts: 6
|
Posted: Fri May 13, 2005 9:19 am Post subject: |
|
|
Maybe I explained the problem badly - It's not that every character that I type becomes uppercase. When I type lowercase letters nothing happens. The text area is just not responding. Maybe something with the font system? I really don't know. |
|
Back to top |
|
|
ekutay l33t
Joined: 30 Mar 2005 Posts: 636 Location: Berlin
|
Posted: Fri May 13, 2005 9:51 am Post subject: |
|
|
gwiener wrote: | When I type lowercase letters nothing happens. | That's indeed something different. Actually time for the next program to check your situation, but I'm too busy currently. _________________ -- erol |
|
Back to top |
|
|
gwiener n00b
Joined: 12 May 2005 Posts: 6
|
Posted: Fri May 13, 2005 9:52 am Post subject: |
|
|
Newsflash: The problem appears to be unique to Gnome. In KDE it works fine. Wierd. |
|
Back to top |
|
|
gwiener n00b
Joined: 12 May 2005 Posts: 6
|
Posted: Fri May 13, 2005 10:10 am Post subject: |
|
|
More news: The following command (which I copied from KDE) solves the problem:
Code: | setxkbmap -model microsoftpro -layout us -variant intl |
Anyone knows how to mimick this command using Gnome options?
Thanks! |
|
Back to top |
|
|
ekutay l33t
Joined: 30 Mar 2005 Posts: 636 Location: Berlin
|
Posted: Fri May 13, 2005 10:16 am Post subject: |
|
|
Can't you set the appropriate kb layout in your xorg.conf? _________________ -- erol |
|
Back to top |
|
|
|