Technical Articles
How to use AdT solely with a keyboard => navigation in eclipse
Coding AdT is great, and not having to touch a mouse also is.
So I’ll list some cool shortcuts I use.
But not knowing how to do something (with the keyboard), makes me feel bad, powerless, and frustrated.
So I’ll also list some things I don’t know yet, but (hopefully) will find out!
Let’s go:
Highly useful AdT shortcuts
ctrl+shift+n = new object
ctrl+shift+a = open object
F3 = open definition
shift+F3 = activate
ctrl+shift+F3 = activate all inactive
shift+f1 = pretty printer
alt+shift+w = open with
+ arrow down + enter = project explorer -> get the focus to project explorer, e.g. to navigate through source-hierarchy
Ctrl+Shift+L => show all shortcuts “That’s where I hope to find answers to the following!)
What I dearly miss (not know yet)
[Edit: meanwhile, some of them are known, see edit at the end of this blog!)]
How do I:
* Set the focus back to the editing area, when I lost it somehow
* Navigate to problems-view tab ” -> bind ctrl+P to it;
* and set focus on the error-line, so I can unfold it “-> just use arrows then
* How do I move through tabs?
* 1 by 1 “-> ctrl+tab
* direct, e.g. 1st, 2nd, last (=n);
if possible also: n-1, n-2, n-m.
This blog is part of a learning-strategy:
(or is it a #LearHack?! ;-))
If I don’t know something, I write it down. (+publish, in this case).
Then I keep on trying to find out.
If I do find out I’ll add answers to my question.
best
Joachim
EDIT:
Here’s the answers we (=the SAP Community) have found so far:
* Set the focus back to the editing area, when I lost it somehow “-> ctrl+Q (last edit location)
* Navigate to problems-view tab ” -> map to Ctrl+P, see comment from Sandra Rossi
* and set focus on the error-line, so I can unfold it -> just use arrow-down then
* move through tabs: 1 by 1 “-> Ctrl + PageDown / PageUp
Navigate to problems-view tab:
I use CTRL+P as configured in menu Window -> Preferences
Expand the error line: I don't know
How do I move through tabs?
1 by 1 : Ctrl + PageDown or Ctrl + PageUp
Oh, thank you very much!
I added the Ctrl+P binding as shown in your screenshot and it works very nicely!
Also, expanding/navigating the error lines I can then do just via arrow-keys.
> Navigate to problems-view tab: -> map Ctrl+P to it
Just what I needed today! (and happy I could find it fast by searching for my own blog...) . Nice!
Is there a way to highlight several lines of code and comment the lines? I miss that feature.
Do you mean as in “comment out” those lines?! Then yes:
That is what I meant.
Thank you - I've been looking for that one.
These shortcuts seem to be inconsistent. On my ADT installation, it’s Ctrl+Shift+< to comment and Ctrl+Shift+> to uncomment. In most of the “official" ADT guides I’ve seen from SAP, they state Ctrl+< to comment and Ctrl+> to uncomment (just like in SE80). I’m guessing they must vary based on other shortcut key combinations already defined in your Eclipse installation or something.
Thanks for you comment, I looked into it and can confirm that indeed the binding for 'remove comment' is: ctrl + >
So sorry that I got that wrong!
The explanation is simple: on the German keybord layout I haven, you get to the '>' by pressing shift + < .
So in this case those are the same keybord cobinations:
ctrl+shift + <
ctrl + >
Got it!: Crtl+Q: -> last Edit location
Thanks for starting this discussion, Joachim!
I'm not really using AdT/Eclipse a lot and one reason for that is, that I just cannot wrap my head around the many different keyboard "short"cuts! I put the "short" into scare quotes because I always need quite some time to look them up on a cheat-sheet, so there's nothing "short" about them time wise. There also doesn't seem to be even just some rudimentary logic to the different combinations of numbers or function keys and CTRL/Alt/Shift. It's as if they've been randomly pulled out of a hat in a draw.
Thanks a lot for your feedback, Bärbel!
I can understand exactly what you describe about beieng overwhelmed by all those key-combinations.
That's why I went for this blog:
1. writing down what I already know and use
2. also writing down what I would like to use (but don't know yet).
And I really took the time to do this writing down before going off searching for solutions.
For remembering all those combinations:
- I think it's "just" learning, like with vocabulary (not much logic to that, too)
- it's probably a good idea to create your own cheat-sheet, with exactly the knowledge important to you!
(Of course, by all means, if possible with:
-- taking inspiration from others.
-- sharing your results)
best
Joachim
CTRL+ALT+ Cursor down or up => Duplicate line or block down or up to the line or block.
CTRL + ALT + A => Block mode on/off
Good Morning,
have you seen the ADT Cheat Sheet already?
https://blogs.sap.com/2017/07/12/abap-in-eclipse-keyboard-shortcuts-you-cannot-miss-cheat-sheet/
BR,
Dominik
I had seen it before, yes, but had probably forgotten about it.
I will not look at it again! Thanks for the reminder!
Found another one: ctrl+shift and E - switch to editor.
It does double duty for those cases:
* How do I move through tabs?
* Set the focus back to the editing area, when I lost it somehow
select desired source with up/down arrwos;
tab + enter to get there!
What does that now mean to the part I look atm
I am back into trying to do things keyboard-only (yes, also this comment - but it takes a whole lot of tab-strokes to get down to this "Add Comment" button @usability @accessability !).
Right now I'm thinking: I can open a source file (e.g. a report) with ctrl+shift+a, but how could I take this tab, and have it be it's own window?!
-> With mouse, it's just drag+drop, but keyboard-only?
If you know, let me know, and if I find out, I#ll post it here!
best
Joachim
PS:
Q: why would I want that?
A: Then I could switch between code I look at (copy from) and code I write (copy to) via alt+tab .
Hi Joachim.
I know that topic is old, but I use it a bit as a compendium, so I'll add something from me: