Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 78081

Summary: [KeyBindings] interactions: Some key bindings switch keyboard layout
Product: [Eclipse Project] Platform Reporter: DJ Houghton <dj.houghton>
Component: UIAssignee: Paul Webster <pwebster>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P5 CC: aberent, barthel.steckemetz, curtispd, douglas.pollock, eclipse, hauser, mikepschneider, mirko, neale, Tod_Creasey
Version: 3.0Keywords: helpwanted
Target Milestone: ---   
Hardware: PC   
OS: Windows All   
Whiteboard:

Description DJ Houghton CLA 2004-11-08 11:45:07 EST
build i1105 (M3)

I was working away this morning and everything was fine. Then all of a sudden I
noticed that when I hit shift+' (expecting double quotes), a @ symbol was
printed to the editor. When I hit shift-2 for a @ symbol, I got the double quotes.

I also noticed that the British pound symbol was printed. (sorry, can't remember
the key sequence.

The keys were different than expected when using both the Java editor and a text
editor. Using Windows Notepad produced the desired key results.

Also, I am positive that shift-quo printed out double quotes earlier this AM.

Looking at my regional/language settings, I noticed that:
- I am set up for English/US
- I didn't have the language switcher button on the desktop or in the toolbar
- I had a English/UK installed (but the US one was selected in the dialog

When I removed the UK keyboard and hit Apply, everything went back to normal.
Comment 1 Steve Northover CLA 2004-11-08 12:30:34 EST
I swear I see this sometimes too.  SSQ, what key sequence am I hitting to 
cause it?  You told me just last Friday.
Comment 2 Silenio Quarti CLA 2004-11-08 12:42:21 EST
The key sequence is Alt+Shift. 

Note that it will change the keyboard layout even if you do not have the 
language bar visible, which is quite bad because you don't realize that the 
layout changed. 
Comment 3 Douglas Pollock CLA 2004-11-08 12:47:38 EST
Also, note that with the default display (only two letters), changes in 
language sub-groups are not displayed.  So, "EN" could be either English 
(United States) or English (United Kingdom) -- even though those two keyboards 
are not the same. 
 
Comment 4 Steve Northover CLA 2004-11-08 12:57:34 EST
Is this a real bug or can I close it?  Did DJ hit Alt+Shift by mistake?
Comment 5 DJ Houghton CLA 2004-11-08 13:13:04 EST
Perhaps I hit alt-shift by mistake. (rather than ctrl-shift for a shortcut) As
Doug mentioned to me earlier, perhaps there is a bug related to our choice of
allowing alt-shift as part of the combination for Eclipse key bindings?

Note that when you hit Alt-Shift it switches the keyboard for the current
application only. That's why I saw different chars between Notepad and Eclipse.
Comment 6 Steve Northover CLA 2004-11-08 14:56:06 EST
WORKSFORME
Comment 7 Douglas Pollock CLA 2004-11-08 16:03:17 EST
There is still an issue here that needs to be resolved.  We can't have key 
bindings that switch keyboard layouts as a side effect. 
Comment 8 Douglas Pollock CLA 2005-02-18 16:10:51 EST
I believe McQ said he'd be looking after motivating teams to move their keyboard
shortcuts.
Comment 9 Mike Wilson CLA 2005-02-18 16:13:42 EST
That was the plan. I'll look at this again next week.
Comment 10 Douglas Pollock CLA 2005-04-08 15:41:11 EDT
*** Bug 90697 has been marked as a duplicate of this bug. ***
Comment 11 Michael Van Meekeren CLA 2005-06-23 17:26:35 EDT
moving to 3.2 it is not clear from this bug whether anything was done here
Comment 12 Mike Wilson CLA 2005-06-23 18:28:27 EDT
Nothing useful got done on this. I apologize; it fell off my radar. I did talk to several people about it, but 
didn't come up with any good answers. 

I noticed while working on the R3.1 doc that we already had words that said not to use accelerators that 
conflict with the language switching key sequences. Unfortunately, it was in the ISV doc under:
    reference/misc/ui_accessibility_tips.html
which I suspect was not well read.

I will look at this early in the R3.2 cycle.
Comment 13 Tod Creasey CLA 2005-07-05 11:10:17 EDT
*** Bug 101759 has been marked as a duplicate of this bug. ***
Comment 14 Douglas Pollock CLA 2005-08-02 11:28:39 EDT
*** Bug 7555 has been marked as a duplicate of this bug. ***
Comment 15 Douglas Pollock CLA 2006-02-23 16:04:42 EST
*** Bug 129219 has been marked as a duplicate of this bug. ***
Comment 16 Mike Wilson CLA 2006-05-01 11:51:43 EDT
Not sure if this is still relevant, but in any case it will not be fixed for R3.2. We're out of time. Since I seem to be totally useless here, I'm going to give this to the current KeyBindings component owner.
Comment 17 Barthel Steckemetz CLA 2006-07-31 04:55:38 EDT
(In reply to comment #16)
> Not sure if this is still relevant, but in any case it will not be fixed for
> R3.2. We're out of time. Since I seem to be totally useless here, I'm going to
> give this to the current KeyBindings component owner.
> 

This is still present in 3.2.
Does anyone know a workaround ?
Comment 18 Barthel Steckemetz CLA 2006-07-31 05:15:31 EDT
(In reply to comment #17)
> 
> This is still present in 3.2.
> Does anyone know a workaround ?

Ok, thats not an eclipse bug. Its windows feature!
You can change this in System Controls;
Region and language section etc.

BTW: Thats typical: a bug in eclipse is called a feature in windows! 

Comment 19 Curtis d'Entremont CLA 2006-11-10 11:19:18 EST
I'm finding that this is happening all the time for me on Vista. I don't know whether it's Vista or the fact that I'm using a different keyboard but this week it's been happening about 5 times a day for me. I have to restart eclipse everytime..arg!

Can we increase priority please? This is currently the most annoying eclipse problem for me.
Comment 20 Tod Creasey CLA 2006-11-10 12:46:48 EST
It's Vista (it also has some mouse gesture that changes your screen resolution on my machine so watch out). I don't think we should be fighting OS behaviour - we get key events from the OS and should honour them - on some Locales (such as Asian ones) people change keyboard layouts all of the time while working and so we shouldn't second guess them.


The solution is to get the Alt Shift keybindings changed i think.
Comment 21 Curtis d'Entremont CLA 2007-04-20 11:44:46 EDT
I'm still seeing this all the time on XP as well. It's driving me crazy. Is there some way to turn it off so it doesn't happen?
Comment 22 Neale Upstone CLA 2007-04-25 07:01:06 EDT
This is a piggin Windows 'feature', probably experienced by those outside the US that have ended up with more than one keyboard layout installed.

The solution, as mentioned in the original bug description, is to remove the keyboard layout you don't want.

To do this:
- Got to control panels
- Open Regional and Language options (WinXP, classic view of control panel)
- Select the Languages tab
- Click the 'Details' button
- Select the keyboard layout you don't want
- Click 'Remove'

Comment 23 Curtis d'Entremont CLA 2007-04-25 10:28:11 EDT
Thanks Neale!
Comment 24 Paul Webster CLA 2007-06-20 15:14:03 EDT
I'm inclined to close this as WONTFIX but I'm willing to entertain solutions that don't involve whole-sale re-writing of the platform keybindings.

PW
Comment 25 Neale Upstone CLA 2007-06-21 06:42:37 EDT
I'd agree Paul.

If there is anything that could be done, is to implement (I know we shouldn't have to...) a start-up check to see if Windows has more than one keyboard layout installed, and to take the user to a warning page.

I'd certainly *not* support a change to the keyboard bindings, just to fix something that is rarely ever used...

As an IBMer, I suspect you might have some colleagues who can give a better steer as to how much this Windows feature is enabled intentionally.

Cheers,

Neale
Comment 26 Mirko Raner CLA 2007-10-02 18:27:35 EDT
I run into this problem with Eclipse 3.2 on Windows XP maybe once or twice a week, mainly when I use JDT's Alt-Shift-R refactoring shortcut. It is definitely annoying, as it requires restarting the workbench. Also, I actually do occasionally use the alternate keyboard layout that is configured, so I can't really apply the work-around suggested by Neale in comment #22.

I agree with Paul (comment #24) that changing all Alt-Shift bindings is not really an option. Most users of JDT probably use Alt-Shift shortcuts all the time, and would not be happy if those got now remapped to some other combination of keys.

Personally, I think this is a very obscure feature of Windows and there are probably very few people who really use this feature frequently, even in, let's say, Asian locales, where people customarily work with multiple alphabets and writing systems. It also seems that changing the keyboard layout with Alt-Shift does not really work consistently in Eclipse anyway. I didn't do an in-depth search, but I couldn't find any bug reports from people complaining that Alt-Shift does not switch keyboard layouts properly. On the other hand, there are numerous duplicate filings for bug 78081, where people complain that it switches the keyboard layout when they don't want it.

"Fighting the OS behavior", as Tod put it in comment #20, is in general not a good idea, but in this case I would argue in favor of filtering out this particular OS behavior so that all Alt-Shift shortcuts work properly. This could be made a configurable option, so that people who don't want Alt-Shift layout switching to be disabled can still use it (however, in that case it should also be ensured that it actually works).
Comment 27 Anthony Berent CLA 2008-02-21 09:42:07 EST
(In reply to comment #26)
> I run into this problem with Eclipse 3.2 on Windows XP maybe once or twice a
> week, mainly when I use JDT's Alt-Shift-R refactoring shortcut. It is
> definitely annoying, as it requires restarting the workbench. 

You don't actually have to restart the workbench. Pressing Alt-Shift again will reset it. I, however, agree that it is annoying.

Comment 28 Anthony Berent CLA 2008-02-21 09:55:02 EST
(In reply to comment #27)
> (In reply to comment #26)
> > I run into this problem with Eclipse 3.2 on Windows XP maybe once or twice a
> > week, mainly when I use JDT's Alt-Shift-R refactoring shortcut. It is
> > definitely annoying, as it requires restarting the workbench. 
> 
> You don't actually have to restart the workbench. Pressing Alt-Shift again will
> reset it. I, however, agree that it is annoying.
> 
Further to my last comment, I have just discovered that you can disable Windows XP Alt-Shift behavior without removing the second language.

Follow Neale's procedure, except instead of clicking 'Remove' click "Key Settings...". You will then get a new dialog. On this dialog select "Switch between input languages" and click "Change Key Sequence". This then opens a further dialog in which you can disable the key sequence.

Having done this you can still switch between languages using the language bar.

- Anthony
Comment 29 Neale Upstone CLA 2008-02-21 11:06:02 EST
Good point.  Looks like all the workarounds needed are in (and.. fancy meeting you here, Anthony!)

Personally, I now think that this "bug" could be marked as RESOLVED, as it's clearly not an Eclipse issue.
Comment 30 Paul Webster CLA 2010-03-10 09:18:41 EST
WONTFIX
PW