keyboard-shortcuts

Locate current file in IntelliJ

狂风中的少年 提交于 2019-11-26 23:24:01
How do I locate the current file in the project structure? (Similar to Visual Studio's Ctrl + Alt + L ). What is the name of the operation (so I can define it in the keymap) butterchicken Alt + F1 almost does what you want. You need to hit Enter afterwards as IDEA allows multiple "targets" for navigation (project structure, file structure etc). (Note you can also set AutoScroll to Source and AutoScroll from source using the two "boxes with arrows" buttons above the project structure view but this can get annoying when it shoves you into the JDK source because you followed a reference to java

Receive OS level key-press events in C# application

强颜欢笑 提交于 2019-11-26 23:15:42
问题 i dont know a better title for the question , but i`ll illustrate my problem. I am working on application that acts like a mp3 player , it uses the Multimedia keys to play/pause , stop the song , i actually made it work but the FormApplication must be in the top [Focused] protected override void WndProc(ref Message msg) { if (msg.Msg == 0x319) // WM_APPCOMMAND message { // extract cmd from LPARAM (as GET_APPCOMMAND_LPARAM macro does) int cmd = (int)((uint)msg.LParam >> 16 & ~0xf000); switch

How to paste in the line where the cursor is?

本秂侑毒 提交于 2019-11-26 22:35:16
问题 The command p pastes below the cursor and P pastes above the cursor. What's the command to paste in the line where cursor is? 回答1: This all depends on the type of data in the register you're pasting. If the data is line-oriented data (yanked with y y for instance) it will be pasted as a whole line above or below the cursor. If the data is character-oriented (yanked with e.g. y 2 w ) then it will be pasted at or before the cursor position in the current line. See :help linewise-register for

Any way (or shortcut) to auto import the classes in IntelliJ IDEA like in Eclipse?

纵饮孤独 提交于 2019-11-26 22:34:39
问题 In Eclipse, while coding in Java and press Ctrl + Shift + O auto import all the Classes automatically. In NetBeans, this is done with Ctrl + Shift + I . Is any way to do this in IntelliJ IDEA? I searched an equivalent shortcut in google, StackOverflow, IntelliJ IDEA configuration and in the official IntelliJ website Keyboard Shortcuts You Cannot Miss 回答1: IntelliJ IDEA does not have an action to add imports. Rather it has the ability to do such as you type. If you enable the "Add unambiguous

Is it possible to use arrow keys alone to expand tree node in package explorer in Eclipse on Linux?

六月ゝ 毕业季﹏ 提交于 2019-11-26 22:29:50
问题 When using Eclipse I browse through the package explorer tree using the keyboard arrows a lot. In Windows I can expand a collapsed node by pressing the → key. In Linux I need to press Shift + → . Is there a way to reconfigure this so that Shift is not required? 回答1: Put this into your ~/.gtkrc-2.0 and you should be good to go. The Left and Right lines make the requested change, the rest are just my personal additions to make the tree-view act more vim-like. Hope that helps! binding "gtk

Eclipse Shortcut to Split Long Strings

徘徊边缘 提交于 2019-11-26 21:55:13
问题 I swear I've seen someone do this, but I can't find it in the various lists of shortcuts. Given: String s = "A very long ............................ String"; Is there an Eclipse shortcut to turn it into: String s = "A very long ............................ " + "String"; 回答1: Yup - just hit return when your cursor is in the middle of the string. Admittedly that puts the + at the end of the first line instead of the start of the second, which is irritating if your style guide demands the

Emacs on Mac OS X Leopard key bindings

∥☆過路亽.° 提交于 2019-11-26 21:09:09
I'm a Mac user and I've decided to learn Emacs. I've read that to reduce hand strain and improve accuracy the CTRL and CAPS LOCK keys should be swapped. How do I do this in Leopard? Also, in Terminal I have to use the ESC key to invoke meta. Is there any way to get the alt/option key to invoke meta instead? update: While the control key is much easier to hit now, the meta key is also used often enough that its position on my MacBook and Apple Keyboard also deserves attention. In fact, I find that the control key is actually easier to hit, so I've remapped my control key to act as a meta key.

How can I capture QKeySequence from QKeyEvent depending on current keyboard layout?

蓝咒 提交于 2019-11-26 20:45:56
问题 I need to do this for configuring my application. I have QLineEdit field with reimplemented keyPressEvent method. QKeyEvent *ke = ... QString txt; if(ke->modifiers() & Qt::ControlModifier) txt += "Ctrl+"; if(ke->modifiers() & Qt::AltModifier) txt += "Alt+"; if(ke->modifiers() & Qt::ShiftModifier) txt += "Shift+"; if(ke->key() >= Qt::Key_0 && ke->key() <= Qt::Key_9) txt += ('0' + ke->key() - Qt::Key_0); else if(ke->key() >= Qt::Key_A && ke->key() <= Qt::Key_Z) txt += ('A' + ke->key() - Qt::Key

How to Disable Copy Paste (Browser)

我与影子孤独终老i 提交于 2019-11-26 20:31:42
I am trying 2 alternatives: Ignore right-click Ignore ctrl + C , ctrl + A This is my code: function noMenu() { return false; } function disableCopyPaste(elm) { // Disable cut/copy/paste key events elm.onkeydown = interceptKeys // Disable right click events elm.oncontextmenu = function() { return false } } function interceptKeys(evt) { evt = evt||window.event // IE support var c = evt.keyCode var ctrlDown = evt.ctrlKey||evt.metaKey // Mac support // Check for Alt+Gr (http://en.wikipedia.org/wiki/AltGr_key) if (ctrlDown && evt.altKey) return true // Check for ctrl+c, v and x else if (ctrlDown &&

How to create a keyboard shortcut for an input button

你离开我真会死。 提交于 2019-11-26 19:57:10
问题 I am showing a bunch of pictures and each picture has its own HTML page. I have an input button that onclick will take you to the next link for the picture. However, I want to be able to use my keyboard arrows to go forward and back. I am new to coding and don't know if this is possible. Can I do this with HTML using the accesskey: <input type="button" accesskey="?" value="Next Item"> Or do I need to use a JQuery plugin? If so, which one? 回答1: As zzzzBov explained, the HTML accesskey defines