| Summary: | [content assist][key bindings] Emacs bindings not working on content assist and quick fix | ||
|---|---|---|---|
| Product: | [Eclipse Project] Platform | Reporter: | Marius Kotsbak <marius> |
| Component: | Text | Assignee: | Platform-Text-Inbox <platform-text-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | andreis, daniel_megert, erich_gamma, gunnar, hovan, kurtg, nathansobo, stori |
| Version: | 2.0 | ||
| Target Milestone: | 3.4 M4 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Marius Kotsbak
*** Bug 65776 has been marked as a duplicate of this bug. *** *** Bug 37761 has been marked as a duplicate of this bug. *** *** Bug 130249 has been marked as a duplicate of this bug. *** *** Bug 140550 has been marked as a duplicate of this bug. *** The correct fix would be to activate a special context while content assist is active. *** Bug 189610 has been marked as a duplicate of this bug. *** *** Bug 208474 has been marked as a duplicate of this bug. *** On Linux there is a workaround. Since Eclipse uses SWT/GTK, you can add the following line to your $HOME/.gtkrc-2.0 file: gtk-key-theme-name = "Emacs" Just press Tab first to give the dialog focus, and then use ctrl+n/p to navigate up and down like with the arrow keys. This should work in all dialogs in Eclipse, not just the content assist. >I guess this is not a JDT specific problem and needs to be fixed
>globally. E.g. the configured up/down keys should work in any kind
>of dialog/window.
The problem here is that the proposal popup initially does not have the keyboard focus i.e. even if the active dialog would support up/down commands it would not work in this scenario until the dialog got the focus. Also, until now we never had a feature request for generic Up/Down for all list dialogs.
I see two possible ways to fix this:
1) register specific commands for (Page) Up/Down while the popup is active. This
needs API from code assist to navigate through the list
2) add API to the content assistant to set the (Page) Up/Down key sequences
I have a question for those who want this feature: assuming you work in Eclipse Emacs mode: do you also set gtk-key-theme-name = "Emacs"?
I have the code ready that makes Ctrl+N/P work when inside the editor and I can also enable it when the popup has focus. The problem is: if
gtk-key-theme-name = "Emacs"
is set then it will jump by two and not just one item each time.
I suggest to not touch the proposal list widget key bindings once it has focus i.e. whatever works on your platform will work in that widget but nothing else.
Added emacs support and fixed Home/End problem in HEAD. Available in builds > N20071130-0010. This is still not working properly. To get the emacs keys to work, I have to first press tab key (else I get navigation in the source code instead), while using arrow keys have effect on the popup list directly. I think it could be a regression, since I think this was working properly in some earlier versions (currently using Juno release 20120614-1722). Please do not reopen closed bugs but instead file a new one with steps to reproduce. In your case I think you see bug 382839. Sorry, it might be, even though the behavior is a bit different. |