Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Cannot type lowercase letters in Java applications
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
gwiener
n00b
n00b


Joined: 12 May 2005
Posts: 6

PostPosted: Thu May 12, 2005 11:25 am    Post subject: Cannot type lowercase letters in Java applications Reply with quote

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
View user's profile Send private message
ekutay
l33t
l33t


Joined: 30 Mar 2005
Posts: 636
Location: Berlin

PostPosted: Thu May 12, 2005 8:35 pm    Post subject: Reply with quote

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
Code:
javac Check.java

To run it you have to type
Code:
java Check

End the loop with CTRL-C. Does this show the same problem?
_________________
-- erol
Back to top
View user's profile Send private message
gwiener
n00b
n00b


Joined: 12 May 2005
Posts: 6

PostPosted: Thu May 12, 2005 9:56 pm    Post subject: That works Reply with quote

Yes, this little test script works alright. Meaning, the problem is specific to AWT/Swing.
Back to top
View user's profile Send private message
ekutay
l33t
l33t


Joined: 30 Mar 2005
Posts: 636
Location: Berlin

PostPosted: Thu May 12, 2005 10:08 pm    Post subject: Reply with quote

Or your applications ;)
_________________
-- erol
Back to top
View user's profile Send private message
gwiener
n00b
n00b


Joined: 12 May 2005
Posts: 6

PostPosted: Fri May 13, 2005 7:48 am    Post subject: Reply with quote

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
View user's profile Send private message
ekutay
l33t
l33t


Joined: 30 Mar 2005
Posts: 636
Location: Berlin

PostPosted: Fri May 13, 2005 8:52 am    Post subject: Reply with quote

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
View user's profile Send private message
gwiener
n00b
n00b


Joined: 12 May 2005
Posts: 6

PostPosted: Fri May 13, 2005 9:19 am    Post subject: Reply with quote

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
View user's profile Send private message
ekutay
l33t
l33t


Joined: 30 Mar 2005
Posts: 636
Location: Berlin

PostPosted: Fri May 13, 2005 9:51 am    Post subject: Reply with quote

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
View user's profile Send private message
gwiener
n00b
n00b


Joined: 12 May 2005
Posts: 6

PostPosted: Fri May 13, 2005 9:52 am    Post subject: Reply with quote

Newsflash: The problem appears to be unique to Gnome. In KDE it works fine. Wierd.
Back to top
View user's profile Send private message
gwiener
n00b
n00b


Joined: 12 May 2005
Posts: 6

PostPosted: Fri May 13, 2005 10:10 am    Post subject: Reply with quote

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
View user's profile Send private message
ekutay
l33t
l33t


Joined: 30 Mar 2005
Posts: 636
Location: Berlin

PostPosted: Fri May 13, 2005 10:16 am    Post subject: Reply with quote

Can't you set the appropriate kb layout in your xorg.conf?
_________________
-- erol
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum