keyboard-shortcuts

Override the bookmark shortcut (Ctrl+D) function in Chrome

谁说胖子不能爱 提交于 2019-11-28 21:37:33
Is it possible to override the Ctrl + D ? I want to, for example console.log or something, and not add the links to the bookmarks. Shortcuts can be overridden using the chrome.commands API. An extension can suggest a default shortcut (eg. Ctrl+D) in the manifest file, but users are free to override this at chrome://extensions/ , as seen below: Usage This API is still under development and only available at the Beta and Dev channels, and the Canary builds More info . It will probably available to everyone starting at Chrome 24. If you want to test the API in Chrome 23 or lower, add the

Learning emacs - useful mnemonics?

微笑、不失礼 提交于 2019-11-28 21:25:58
问题 Are there any mnemonics or patterns that make memorizing emacs key combos easier? 回答1: Well, the main important ones are: ` C-k to " K ill" a line and C-y to " Y ank" it back from the kill buffer (aka: clipboard). C-s to " S earch " C-h for " H elp" C-t " T ranspose" two characters. C-p " P revious" line C-n " N ext" line C-f " F orward" char C-b " B ackward" char C-e " E nd" of line C-a .... a is the beginning of the alphabet, so " A beginning" of line Other than that I mostly use the arrow

OSX keyboard shortcut background application, how to

假装没事ソ 提交于 2019-11-28 20:45:03
I want my OSX application to sit in the background and wait for a keyboard shortcut to go into action. It should be configurable similar to Growl in the preferences, or accessible as dropbox in the statusbar. What kind of xcode template do I have to use? How do I capture keyboard shortcuts globally? Have a look at Dave DeLong's DDHotKey class on GitHub. DDHotKey is an easy-to-use Cocoa class for registering an application to respond to system key events, or "hotkeys". A global hotkey is a key combination that always executes a specific action, regardless of which app is frontmost. For example,

Automatic namespaces import

浪子不回头ぞ 提交于 2019-11-28 20:43:57
问题 Is there a way in Visual Studio (a hotkey) to automatically import a type (or choosing between known namespaces) like the Ctrl + O in Eclipse? 回答1: When the red caret appears at the end of your member, just hit Shift + Alt + F10 , then use arrows keys to choose the right option: 回答2: Yes, Visual Studio can add the using for you. When you type in a class name, hit Ctrl + . and then Enter (the first option is 99.99% the right one, so just hit Enter ). And you can have it add the using at the

Eclipse shortcut for commenting jsp, xml code

╄→гoц情女王★ 提交于 2019-11-28 20:05:08
In IDEA, we can comment/uncomment lines in java as well as html,jsp, xml files with the same keyboard shortcut combination. I tried doing that in eclipse but was not able to comment out lines in html,jsp and xml files. Is there a way to do it in Eclipse? Also I would like to know whether bulk comment is also available for non-java files. I use Shift + Ctrl + / to Add Block Comment in both XML and JSP files (works at the line level or for a selected block). Just in case, if you are looking for a particular shortcut, you can use Shift + Ctrl + L to Show Key Assist (i.e. the Commands and their

What is the eclipse shortcut for auto-generating a default and field constructor?

橙三吉。 提交于 2019-11-28 20:01:52
I had a look at: Eclipse-Shortcuts , but I found nothing for generating a constructor. Whats the shortcut for generating a standard constructor? Juvanis Type the first letter of your class, then press Ctrl + Space , Eclipse will list suggestions within a combobox. The topmost suggestion is the default constructor. Press Enter , it will be done. (I'm using Eclipse Juno and it works.) LuGo Alt + Shift + s and then o opens the Generate Constructor using Fields dialog. Goto Source ---> Generate constructor using Fields Under Source Title bar, select the Generate constructor using Fields option. Or

Using pyhook to respond to key combination (not just single keystrokes)?

六月ゝ 毕业季﹏ 提交于 2019-11-28 19:45:27
I've been looking around but I can't find an example of how to use pyhook to respond to key combinations such as Ctrl + C whereas it is easy to find examples of how to respond to single keypresses such as Ctrl or C separately. BTW, I'm talking about Python 2.6 on Windows XP. Any help appreciated. Have you tried to use the GetKeyState method from HookManager? I haven't tested the code but it should be something like this: from pyHook import HookManager from pyHook.HookManager import HookConstants def OnKeyboardEvent(event): ctrl_pressed = HookManager.GetKeyState(HookConstants.VKeyToID('VK

Global Windows Key Press

孤街浪徒 提交于 2019-11-28 19:33:37
I have a simple WPF application and I need to capture F1 key pressed in Windows (Operation System), even if my WPF window is minimized, or it isn't activated. I have problems with detecting this. I searched on Internet and I found many results, but they didn't helped me. For detecting a key pressed inside of application I used this simple code: AddHandler(Keyboard.KeyDownEvent, (KeyEventHandler)KeyPressed); private void KeyPressed(object sender, KeyEventArgs e) { if (e.Key == Key.F1) { //my code went here } } But this doesn't work when my window isn't activated. So, my question is: how to

What's the equivalent for eclipse's ALT+UP/DOWN (move line) in Visual Studio?

一曲冷凌霜 提交于 2019-11-28 19:02:40
In Eclipse, selecting a line and pressing Alt + ↑ / ↓ will move the line up and down, a quick way to avoid copy&paste. Is there an equivalent in Visual Studio? In Visual Studio 2013 and later, this functionality is built in. ALT + UP/DOWN will move a line up or down. If you need this functionality in VS2012 (works with VS2010 too), take a look at the MoveLine Visual Studio Extension or the Productivity Power Tools suite. Omer Raviv ReSharper's Ctrl + Shift + Alt + ↑ / ↓ / ← / → is even more powerful - when on the beginning of the line, it will move the entire line, but can also be used to move

How can I set a hot key (“win+Key”) combination to call an application?

十年热恋 提交于 2019-11-28 19:00:49
I need to set a hot key at the operating system level, that once set will call whatever I tell it to call. The hot key set must be done from inside my preference option, but the application must not have to be open so that the hot key works. Andreas Rejbrand This does what you want. First, you need a program that runs in the background and listens to, and responds to, keystrokes. Like this: program Project1; uses Windows, Messages, ShellAPI; var W: HWND; M: MSG; const WM_SETHOTKEY = WM_APP + 1; WM_UNSETHOTKEY = WM_APP + 2; AppName = 'Rejbrand Hot Key Listener'; const FileNames: array[0..1] of