Bug 344290 - [KeyBindings] mac delete (to the left) and arrow keys stop working in java editing windows
Summary: [KeyBindings] mac delete (to the left) and arrow keys stop working in java ed...
Status: NEW
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.6.2   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 major with 10 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform UI Triaged CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 373714 (view as bug list)
Depends on:
Blocks:
 
Reported: 2011-04-29 10:48 EDT by Gray Watson CLA
Modified: 2019-12-09 11:27 EST (History)
39 users (show)

See Also:


Attachments
Workspaces/currentBranch/.metadata/.log file (58.24 KB, text/plain)
2011-04-29 12:07 EDT, Gray Watson CLA
no flags Details
Debug log showing [BS] commands that don't do anything. (186.58 KB, text/plain)
2011-08-04 13:59 EDT, Gray Watson CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gray Watson CLA 2011-04-29 10:48:53 EDT
Build Identifier: 20110218-0911

Two times now I've been working in eclipse and also switching back and forth with other applications when the arrow keys and the left-delete key stops working in the Java editing windows.  Inserting letters and the like seem to work fine and the right-delete works but not left-delete (sort of important) or the arrow keys.

The keys work in other applications without problems.  When I look at the keyboard preferences I see that the preferences for those keys has magically been disturbed.

This has now happened to me twice.  Restarting eclipse does not fix it.  Last time I was able to fix it by restoring my workspace directory from backups but this time even that doesn't work.  Maybe I need to go to a backup further back.

I see a lot of similar bugs in the list but none that seem to match mine or that are recent.  Apologies if a dup.

I see others complaining about this: http://stackoverflow.com/questions/5263921/really-weird-eclipse-keyboard-problem-bug/5585512

Reproducible: Couldn't Reproduce
Comment 1 Gray Watson CLA 2011-04-29 11:29:56 EDT
So now this does not look like a Workspace issue at all.  Although restarting eclipse did nothing, rebooting my Macintosh seemed to fix the problem -- even with the old Workspace.  No idea why the keys worked in other applications fine (I did not try another Java application) but Eclipse needed the reboot.

Hopefully this will happen again so I can try a reboot immediately to see if it fixes the issue.
Comment 2 Gray Watson CLA 2011-04-29 11:32:16 EDT
Also, I see that the keyboard preferences may _not_ have been changed because older Workspace backups did not work as well and the 'Delete Previous', 'Line Up', 'Line Down', 'Previous Column', and 'Next Column' commands are all not mapped in my current working configuration.  The default must be to do the right thing with those.
Comment 3 Paul Webster CLA 2011-04-29 11:34:42 EDT
2 things that could help diagnose this:

1) Could you attach a log file?  It would be in <workspace>/.metadata/.log

2) If it's partially repeatable (it occurs after you've been working for a while) you could run with http://wiki.eclipse.org/Platform_Command_Framework#Tracing_Option

If you could find a specific case that stopped working, like CTRL+Right (or CMD+Right) I can track down the command Id (in my example, it's next word).  That would help narrow down the tracing.  The tracing would indicate when some part of the system is changing/resetting the keybindings.


I'll just mention that in the text editors and java editor, the standard arrow keys (up, down,left, right) are not part of the keybinding system.

There is a LineUp command that can be bound (to provide an emacs binding, for example).

If it is just a keybinding problem, a hack workaround without having to restore your entire workspace is to delete the org.eclipse.ui.commands pref from <workspace>/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.ui.workbench.prefs while your eclipse is not running.

PW
Comment 4 Paul Webster CLA 2011-04-29 11:36:01 EDT
(In reply to comment #1)
> Hopefully this will happen again so I can try a reboot immediately to see if it
> fixes the issue.

That is consistent with my knowledge that the arrow keys are just left to the native widgets. Please let us know how it works out (it might still be SWT interacting with the native Mac widgets).

PW
Comment 5 Gray Watson CLA 2011-04-29 12:07:07 EDT
Created attachment 194378 [details]
Workspaces/currentBranch/.metadata/.log file
Comment 6 Gray Watson CLA 2011-04-29 12:07:48 EDT
Comment on attachment 194378 [details]
Workspaces/currentBranch/.metadata/.log file

Last 2 days of the log.  Problem happened on 4/29/2011 between 10-11 localtime.
Comment 7 Gray Watson CLA 2011-04-29 12:11:07 EDT
Thanks much for the feedback Paul.  I've attached the last couple days of my .log file.  If it happens again, I'll run with the debugging and post the results.  Thanks also for your work with Eclipse.
Comment 8 Gray Watson CLA 2011-08-04 13:59:54 EDT
Created attachment 200940 [details]
Debug log showing [BS] commands that don't do anything.

Finally got this to reoccur.  You see: WorkbenchKeyboard.press(potentialKeyStrokes = [BS]) but nothing is deleted from the document.  The ARROW_LEFT are also ignored.  The CTRL+B works and do does the DEL.
Comment 9 Jeremy Johnson CLA 2011-08-19 18:14:41 EDT
This problem just started happening to me as well.

Version: 3.6.2
Build id: M20110210-1200
Platform: Mac OS X
Keys affected: Delete and all 4 arrow keys
Resolution: Reboot

Initiating event: Unknown.  Keys stopped responding in the middle of coding (Eclipse had been open for several hours).
Failed attempts to fix: 
1. Restarted Eclipse
2. Checked for alternate key bindings in preferences.  Only correct binding to delete found.

I first noticed this within the last week.
Comment 10 Tapu Rom CLA 2011-12-06 08:59:14 EST
Ditto here
I just had the same problem using Eclipse Indigo:
Version: Indigo Service Release 1
Build id: 20110916-0149

I found out about this bug from the Stackoverflow thread:
http://stackoverflow.com/questions/5263921/really-weird-eclipse-keyboard-problem-bug

So far I haven't rebooted, I've tried to set the bindings manually as explained in the Stackoverflow thread and it worked, I've recovered use of the missing keys (backspace & arrows)
Comment 11 Asha Gupta CLA 2011-12-07 02:04:24 EST
Just had the same issue. Additionally, Up and Down arrow keys are also not working. Nor is the Delete button.
Comment 12 Rene Samselnig CLA 2011-12-07 05:29:48 EST
I'm having this problem, too.

Version: 3.7.1
Build id: 20110916-0149
Platform: Mac OS X
Keys affected: Delete Left and all 4 arrow keys
Resolution: Reboot

Initiating event: Unknown, but happened when switching between views.
Restarting Eclipse didn't fix it. The key bindings for Line Up, Line Down, Previous Column, Next Column and Delete Previous vanished.
Comment 13 Aaron CLA 2011-12-18 01:20:37 EST
Version: 2.8.1.RELEASE
Build Id: 201111221000
Platform: Mac OS X 10.7.2
Keys affected: Delete Left and all 4 arrow keys
Resolution: Add bindings back

Me too. Found out about it at the SO thread: http://stackoverflow.com/questions/5263921/really-weird-eclipse-keyboard-problem-bug.
Comment 14 Anton Karton CLA 2012-01-12 01:51:38 EST
I have exactly the same bug as the one in 'Description'.

I use Indigo on Mac OS X Lion.

Eclipse version info:

Version: Indigo Service Release 1
Build id: 20110916-0149
Comment 15 Thomas Bouchet CLA 2012-01-13 08:58:02 EST
Hello,

It seems that I had the same problem. But I'm on a DELL Latitude D630 with Win XP...
In fact, it seems I have some problems with my mouse too : When clicking on the editor part of the file, I can't no more click away in Eclipse, the editor is acting just like it is alone : if I click on a menu (top of the editor), it's like I clicked on som text I don't see but upper in the editor, just like a great transparent window containing the editor was over all other things in Eclipse.

I have to switch app (Alt-Tab) and come back to be able to use my mouse again on menus and treeviex of my project...

Do I have to open a new bug ?
thx
Comment 16 Thomas Bouchet CLA 2012-01-13 08:59:33 EST
In fact, I just wanted to add the build version :

Version: Indigo Service Release 1
Build id: 20110916-0149

But... After selecting text of the "About Eclipse" window, I can't click on the "OK" button... Just like with the editor... Am I doing something wrong ?
Comment 17 Oliver Schrenk CLA 2012-03-06 05:50:38 EST
I'm experiencing this problem too.

I'm on 
Version: Indigo Service Release 1 Build id: 20110916-0149
OS X 10.7.3
External Keyboard, External Bluetooth Mouse

If I switch out of Eclipse and back into it they work for a while.
Comment 18 Oliver Schrenk CLA 2012-03-06 08:58:45 EST
For me the settings for `Preferences -> General -> Keys`  
- Delete Previous
- Line Up
- Line Down 
- Previous Column
- Next Column
- Select Next Column
- Select Previous Column

had to be reset. Works for now
Comment 19 Thomas Becker CLA 2012-05-10 11:34:43 EDT
Same issue for me:

Mac OSX Lion
Build id: 20110916-0149

Happened to me twice in the last couple of weeks. I also don't know what started the issue and can confirm that only a reboot resolves the issue. Restarting eclipse doesn't help. 

I'm working a lot with eclipse, but it happens rarely. So I've no idea how to reproduce unfortunately.
Comment 20 Evan Yandell CLA 2012-05-13 13:11:16 EDT
I just experienced this for the first time today, delete (backspace) and arrow keys stopped working in the editor window.  All other keys are functional and the aforementioned keys work in other applications.  Restarting eclipse did not resolve the issue.  I have not set any keybindings, nor rebooted my machine (yet).  I was directed here from the stackoverflow post as well.

http://stackoverflow.com/questions/5263921/really-weird-eclipse-keyboard-behavior-bug 

I'm using:
Eclipse 3.6.2
Mac OSX 10.6.8
Comment 21 Evan Yandell CLA 2012-05-13 13:16:35 EDT
(In reply to comment #20)
> I just experienced this for the first time today, delete (backspace) and arrow
> keys stopped working in the editor window.  All other keys are functional and
> the aforementioned keys work in other applications.  Restarting eclipse did not
> resolve the issue.  I have not set any keybindings, nor rebooted my machine
> (yet).  I was directed here from the stackoverflow post as well.
> 
> http://stackoverflow.com/questions/5263921/really-weird-eclipse-keyboard-behavior-bug 
> 
> I'm using:
> Eclipse 3.6.2
> Mac OSX 10.6.8

Update: immediately after posting this I went to shut down eclipse so I could reboot the machine and the problem had resolved itself.  All I'd done was exit and re-launch eclipse multiple times with no success, I'm not sure what caused it to work this time but will update this again if I figure anything out.
Comment 22 Torkild Resheim CLA 2012-05-15 03:43:31 EDT
I'm seeing a similar problem. Suddenly all my arrow keys and left-delete key stopped working in Eclipse. Pressing Cmd+Left or Cmd+Right for navigation does work. I've tried starting a new workspace and edit a normal text file. Same problem.

Restarting both Eclipse and the computer does not help.

Using Eclipse SDK

Version: 4.2.0
Build id: I20120503-1800
Comment 23 Torkild Resheim CLA 2012-05-15 03:47:32 EDT
Some additional information. I decided to following the instructions in the Stack Overflow link and found that "Restore Defaults" will in fact clear several key bindings including "Delete Previous" and "Line Up".
Comment 24 Torkild Resheim CLA 2012-05-18 16:46:56 EDT
This issue has repeatedly crept up on me the past few days so it has been quite annoying. However I discovered that the situation can be resolved by putting my MBP in a sleep cycle.
Comment 25 Md Iftekhar Tanveer CLA 2012-07-03 20:11:20 EDT
I have also got the same bug. My arrow keys are working though. I have found only the delete key not to be working.
Comment 26 Kees de Kooter CLA 2012-07-04 05:40:33 EDT
Exact same issue on Lion + Juno.
Comment 27 Howard Lapin CLA 2012-07-26 09:02:59 EDT
what a pain, just ran into this and took me a while to figure what was happening..

could someone attach a working keybindings file..

it has happened to me 2x and i would rather just replace the file and 
restart eclipse..


or has anyone tried the procedure mentioned in comment #3?
Comment 28 Volker Wegert CLA 2012-10-09 14:55:42 EDT
Similar issues here with Eclipse 4.2 on 10.6.8. Resetting the key bindings to default values did not resolve the issue, but manually adding key bindings for the cursor keys seems to have done the trick. However, now I can't use the cursor keys to select quick fixes any more - the cursor keys move the cursor around instead of selecting an element from the list of quick fixes.
Comment 29 Paul Webster CLA 2012-10-10 13:52:22 EDT
(In reply to comment #28)
> Similar issues here with Eclipse 4.2 on 10.6.8. Resetting the key bindings
> to default values did not resolve the issue, but manually adding key
> bindings for the cursor keys seems to have done the trick. However, now I
> can't use the cursor keys to select quick fixes any more - the cursor keys
> move the cursor around instead of selecting an element from the list of
> quick fixes.

Your second observation is probably related to bug 382839

PW
Comment 30 Olivier Giguere-Durand CLA 2012-10-30 10:06:44 EDT
Same issue, Eclipse Build id: 20120216-1857 on Win 7 x64
Comment 31 Cay Horstmann CLA 2013-01-30 09:48:38 EST
I have the same issue on Linux (Lubuntu 12.10).
Comment 32 Kevin Nielson CLA 2013-02-12 14:42:21 EST
Me too: working in Eclipse 3.8.0 on Ubuntu 12.10, build id:I20120502-2000.  Restarting eclipse did not solve the issue.  Restarting my machine did resolve the issue.
Comment 33 Iñaki Serrano Zabaleta CLA 2013-03-13 05:57:25 EDT
Me too, working with:
Windows XP SP3 (32 bits)
Version: Juno Release
Build id: 20120606-2254

Additionaly other bindings such us Ctrl+F, also stop working. Restarting Eclipse brings the mappings back for some time.
Comment 34 Jakub Kotowski CLA 2013-04-15 08:28:10 EDT
I am also affected:

Version: Juno Service Release 2
Build id: 20130225-0426

Ubuntu 12.10
Comment 35 Brad Davis CLA 2013-05-20 15:22:33 EDT
Seeing this in Ubuntu 12.04, Eclipse 4.2 build 20130225-0426

Specifically lost the delete key, then later ctrl-c/ctrl-v.
Comment 36 Scott Stensland CLA 2013-09-17 12:18:45 EDT
also happens on linux eclipse juno - whenever edit session detects project errors shown in red this condition then disabled my Delete key from working
Comment 37 Dani Megert CLA 2013-11-11 04:23:39 EST
I suspect this is the same as bug 413977.
Comment 38 Markus Keller CLA 2013-11-11 08:48:25 EST
> I suspect this is the same as bug 413977.

Probably some of the later comments are, but the original bug was on 3.x (where bug 413977 doesn't occur). And the original bug couldn't easily be resolved by switching focus (not even restarting Eclipse seemed to be enough).
Comment 39 Brett Connor CLA 2013-11-20 06:12:34 EST
Version: Kepler Service Release 1
Build id: 20130919-0819
Platform: Ubuntu desktop 11.11 (I think)
Keys affected: Backspace and all 4 arrow keys
Resolution: Restart eclipse - works for a few mins. Leave to stand for 15 mins also fixes it.

Oddly, leaving Eclipse sat for a time period while I field a phone call, lookup my eclipse.org password and find this bug, it has now started working again when I went back to it. I think that was about 10-15 mins, so not an workable solution.
Comment 40 Yury Zhauniarovich CLA 2014-08-13 11:56:53 EDT
I experienced the same problem with Eclipse Luna on Kubuntu 12.04.

Version: Eclipse Luna (4.4.0)
Build-id: 20140612-0600
Platform: Kubuntu 12.04
Resolution: Restart Eclipse
Steps to reproduce: Unknown
Comment 41 Chris Hann CLA 2014-12-05 12:40:28 EST
I have just hit the same thing with the latest Luna service release.

Resolved by reloading.

Version: Luna Service Release 1 (4.4.1)
Build id: 20140925-1800

Linux 3.10.0-123.9.3.el7.x86_64
Red Hat Enterprise Linux Server release 7.0 (Maipo)
fully updated with the Gnome desktop.
Comment 42 Tiger Shark CLA 2015-02-27 14:02:26 EST
Happens to me on Kubuntu 14.10.1.
Seems my key binding got messed and a lot of default ones like delete previous are unassigned.
When trying to assign de delete key to it, the following error appears:

Error notifying a preference change listener. Check the log for details.
loader constraint violation: when resolving interface method "org.eclipse.e4.ui.bindings.EBindingService.getPerfectMatch(Lorg/eclipse/jface/bindings/TriggerSequence;)Lorg/eclipse/jface/bindings/Binding;" the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) of the current class, org/eclipse/ui/internal/keys/BindingService, and the class loader (instance of org/eclipse/osgi/internal/loader/EquinoxClassLoader) for resolved class, org/eclipse/e4/ui/bindings/EBindingService, have different Class objects for the type eclipse/jface/bindings/TriggerSequence;)Lorg/eclipse/jface/bindings/Binding; used in the signature
Comment 43 Dani Megert CLA 2015-03-02 08:22:46 EST
(In reply to Tiger Shark from comment #42)
> Happens to me on Kubuntu 14.10.1.
> Seems my key binding got messed and a lot of default ones like delete
> previous are unassigned.
> When trying to assign de delete key to it, the following error appears:
> 

This is bug 388359.
Comment 44 Johannes Weberhofer CLA 2015-04-24 11:04:30 EDT
I started to notice that I "loose" the delete key on openSUSE 13.2 with Eclipse Mars (4.5) M6 since I switched over to Eclipse Mars. I have recognized, that I frequently loose the key's function after I pressed Ctrl-F and doing some searches.
Comment 45 Dani Megert CLA 2015-05-04 08:50:39 EDT
Please note that this bug report is against Mac. All recent comments are towards Linux, and those are probably duplicates of bug 435742.
Comment 46 Eduard Bloch CLA 2016-05-26 03:18:24 EDT
You sure this is Mac specific?

Now it started hitting me too, on a regular Linux system with MARS.2. On another, it works just fine. Even this one worked fine for days. Now, suddenly happens all the way again. I feel that it starts quickly after using the CDT debugger but not sure.

Anyhow, most Ctrl-* combos are failing (including popular like Ctrl-Backspace), Del and Ins buttons are failing. This happened three times in a row now. Restart Eclipse, work a couple of mins, and keyboard input is fsked. All other windows around are working fine.

Window manager is IceWM, normal X11 from Debian Sid, pure Desktop environment on native hardware.
Comment 47 J. Zufallig CLA 2016-08-15 12:54:17 EDT
Doubt it's Mac specific, I'm seeing failures like this using Neon on a bog-standard Windows 7 system.  Special keys will stop working.
Comment 48 Lakshmi P Shanmugam CLA 2017-07-04 05:37:26 EDT
*** Bug 373714 has been marked as a duplicate of this bug. ***