keyboard-shortcuts

Jump to editor shortcut in Intellij IDEA

末鹿安然 提交于 2019-12-17 10:15:14
问题 I can use F12 to jump to project tree (if it was the last tool that I used), but is there a shortcut for jumping back to editor? 回答1: Esc always brings the focus back to the editor. 回答2: With Alt + Home you can actually put focus on selecting the file and hit enter in order to go to the editor. Esc is not always going to put the focus on editor. For those on Mac (you don't have a Home key), use Command + E to open the recent files then hit enter. 回答3: Pressing F4 ( Jump to Source action) in a

How to do system short cuts cross platform integration in Java?

一世执手 提交于 2019-12-17 09:57:31
问题 As you may know, the short-cuts of save in Mac OS X is Cmd+S on Windows is Ctrl+S , and the short cuts of close an application is Cmd+Q and Windows is Alt + F4 . But the question is how to do these in a java application? Do I need to find all the short cuts I used in the application, and match the related function depends on different OSs. Any recommendations? Thanks. 回答1: The Toolkit method getMenuShortcutKeyMask() is useful in this context. While the method returns Event.CTRL_MASK on

What is the short cut in eclipse to terminate debugging/running?

狂风中的少年 提交于 2019-12-17 07:27:29
问题 What is the shortcut in eclipse to terminate debugging/running? Looking under Preferences -> Keys says Ctrl + F2 but it doesn't work. 回答1: As said here, you can add/enable the Debug command group to any perspective using Window / Customize Perspective > Commands . (Select the 'Debug' group) Then open the Debug view in the Java perspective (as a Fast view perhaps) and you should get your Terminate keybinding. I suppose it was not working because you tried it in a non-debug session. 回答2: Go to

What is the short cut in eclipse to terminate debugging/running?

这一生的挚爱 提交于 2019-12-17 07:27:13
问题 What is the shortcut in eclipse to terminate debugging/running? Looking under Preferences -> Keys says Ctrl + F2 but it doesn't work. 回答1: As said here, you can add/enable the Debug command group to any perspective using Window / Customize Perspective > Commands . (Select the 'Debug' group) Then open the Debug view in the Java perspective (as a Fast view perhaps) and you should get your Terminate keybinding. I suppose it was not working because you tried it in a non-debug session. 回答2: Go to

How to add shortcut keys for java code in eclipse

一曲冷凌霜 提交于 2019-12-17 07:08:16
问题 Say I type "sout", the intellisense should expand it to "System.out.println()". Is there a way to adding such templates? 回答1: The feature is called "code templates" in Eclipse. You can add templates with: Window->Preferences->Java->Editor->Templates. Two good articles: Don't write the code, generate it Custom Templates Also, this SO question: Useful Eclipse Java Code Templates System.out.println() is already mapped to sysout , so you may save time by learning a few of the existing templates

How to get a combination of keys in c#

夙愿已清 提交于 2019-12-17 06:50:32
问题 How can I capture Ctrl + Alt + K + P keys on a C# form? thanks 回答1: It is a chord, you cannot detect it without memorizing having seen the first keystroke of the chord. This works: public partial class Form1 : Form { public Form1() { InitializeComponent(); } private bool prefixSeen; protected override bool ProcessCmdKey(ref Message msg, Keys keyData) { if (prefixSeen) { if (keyData == (Keys.Alt | Keys.Control | Keys.P)) { MessageBox.Show("Got it!"); } prefixSeen = false; return true; } if

What are the most useful Intellij IDEA keyboard shortcuts? [closed]

Deadly 提交于 2019-12-17 04:37:31
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 8 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not

How to add a shortcut key for a jbutton in java? [closed]

≯℡__Kan透↙ 提交于 2019-12-17 04:37:05
问题 Closed . This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so it focuses on one problem only by editing this post. Closed 4 years ago . I have a jButton i want to assign a shortcut on it. Like when I press delete on keyboard it just clicks that jButton once. How can I do that? 回答1: You need to create an Action to be used by the button. Then the Action can be used by the ActionListener and you can bind the Action

Is there a way to automatically generate getters and setters in Eclipse?

醉酒当歌 提交于 2019-12-17 04:12:03
问题 I am working on a new Android project ( Java ), and created an Object with a large number of variables. Since I am planning to add getters and setters for all of them, I was wondering: is there a shortcut in Eclipse for automatically generating the getters and setters in a given class? 回答1: Bring up the context menu (i.e. right click) in the source code window of the desired class. Then select the Source submenu; from that menu selecting Generate Getters and Setters... will cause a wizard

Favorite Visual Studio keyboard shortcuts [closed]

邮差的信 提交于 2019-12-17 02:51:44
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . Locked . This question and its answers are locked because the question is off-topic but has historical significance. It is not