keyboard-shortcuts

Java detect CTRL+X key combination on a jtree

末鹿安然 提交于 2019-11-28 10:52:02
I need an example how to add a keyboard handler that detect when Ctrl + C , Ctrl + X , Ctrl + C pressed on a JTree . I were do this before with menu shortcut keys but with no success. You can add KeyListeners to any component (f) f.addKeyListener(new KeyListener() { @Override public void keyTyped(KeyEvent e) { } @Override public void keyPressed(KeyEvent e) { if ((e.getKeyCode() == KeyEvent.VK_C) && ((e.getModifiers() & KeyEvent.CTRL_MASK) != 0)) { System.out.println("woot!"); } } @Override public void keyReleased(KeyEvent e) { } }); MOHAMED FATHEI Use KeyListener for example : jTree1

Multiple actions on one keyboard shortcut in vscode

和自甴很熟 提交于 2019-11-28 10:44:44
Is it possible to have multiple actions assigned to one keyboard shortcut in visual studio code? For example: Move cursor up x 3 set to "ctrl + w" Thanks in advance. Multiple actions is not supported natively (Feature-request: Macro like keybindings #871 ). Edit: macros doesn't seem to be working properly in the latest versions of vscode. There are other extensions though, like: multi-command "multiCommand.commands": [ { "command": "multiCommand.down3Lines", "sequence": [ "cursorDown", "cursorDown", "cursorDown" ] }, ] keybindings.json { "key": "ctrl+w", "command": "multiCommand.down3Lines" }

Ctrl + Shift + R is not working in Eclipse

蹲街弑〆低调 提交于 2019-11-28 10:43:52
We all know that we can use Ctrl + Shift + R to search any file in the workspace. But today, I surprisingly found out that it is not working anymore. Ctrl + Shift + H and Ctrl + Shift + T are working though. I believe I am missing a setting somewhere possibly in Window -> Customise Perspective menu. Not sure what is it exactly. Any help is appreciated. Chaitanya MSV Just realized this morning that I have a screen capture tool called Snagit installed which uses the same key combination to start capture. When I closed Snagit, Ctrl + Shift + R is back in action in Eclipse. But not sure why the

Excel VBA: Macro hangs after opening a document when run via shortcut key, but runs perfectly from VB editor

不打扰是莪最后的温柔 提交于 2019-11-28 09:28:05
问题 I ran into a strange problem, I decided to assign a keyboard shortcut Ctrl + Shift + P on one of my routine in VBA. This routine is suppose to open an existing excel workbook, copy some informations and .SaveAs another name. This actually runs fine when I hit Play in the Visual Basic Editor. However, when I use the keyboard shortcut inside Excel to run my code, it stop working after opening the document. I reproduce the problem in this sample: Public Sub WriteData() Dim templatePath As String

copy paste shortcuts only working with ctrl key in OSX Java application

我与影子孤独终老i 提交于 2019-11-28 08:58:47
问题 I created a small application using Netbeans 8.1 on OSX, doing these steps: I created a new JForm using category "Swing GUI forms" I added three menus to it: I added a JDialog with text fields and linked it to the third menu ("TAnalyse"). In this JDialog i need copy / paste functionality for the text fields. The problem is: copy / paste only works in this dialog with "ctrl" + "c","x" or "v" and not with the osx standard "cmd" key. I tried to add the following line of code to the constructor

Keyboard shortcut to take file out of preview mode in VSCode

强颜欢笑 提交于 2019-11-28 08:54:30
If I quick open a file using the quick open menu, is there a keyboard shortcut that will take the opened file outside of preview mode so that when I open a new file it won't replace the currently open one? (I'm looking for a keyboard shortcut as opposed to double-clicking the filename or tab in order to keep my workflow keyboard oriented) Try the View: Keep Editor command (default shortcut Ctrl + K , Enter ): Note: this shortcut is a chord , meaning that Enter must be pressed after releasing Ctrl + K . Mark As of v1.19 (released in December 2017) Alt + Enter opens the file (after Ctrl + P )

Is there a keyboard shortcut to move the cursor between methods in Visual Studio 2010?

我是研究僧i 提交于 2019-11-28 08:52:39
Is there any keyboard shortcut to move the cursor between methods in Visual Studio? Is there any plugins that can do the same job? All the time when I program, I want to go at the end of the current method and if I could have a shortcut that can move the cursor at the beginning of the next method and then just have to type a couple of up arrow to be where I want would be fantastic. Thank you. Visual Studio doesn't have such a function, but JetBrains' ReSharper does. At least is the only one that I know of to offer this functionality. For ReSharper the shortcuts are Alt-Up and Alt-Down , for

How can I get Emacs style key bindings in Visual Studio?

时光毁灭记忆、已成空白 提交于 2019-11-28 08:05:09
How can I get Emacs style key bindings in Visual Studio? Is it available in Settings? Do I need a Plug-in? You can try the Emacs keyboard scheme ( Tools->Options->Environment->Keyboard ) Torleif Xkeymacs does a really good job of this. It is possible to configure this tool for every application running on your desktop. With Settings: Try the Emacs keyboard scheme on Environment options. Plugins: I have only seen this one: VisEmacs , it will integrate Emacs as the default text editor for Visual Studio. After posting that Emacs keybindings/emulation would no longer be available in Visual Studio

Shortcut for selecting run configuration in Eclipse IDE

天涯浪子 提交于 2019-11-28 07:37:11
I have an Eclipse workspace with a bunch of projects. I manually created some run configurations for each project (it's necessary to pass some arguments to VM, so I can't just run it directly, e.g. using shortcut ALT + SHIFT + X , T in the specific file). Most of the time, I just use one run configuration (whereas for the first time I manually launch it using Run -> Run configurations -> (name) -> Run ). Since I configured Eclipse to always run the last run configuration (on F11 or CTRL + F11 ), it's usually enough. However, sometimes I need to switch to a different run configuration and then

How to detect ctrl-f in my SWT application

有些话、适合烂在心里 提交于 2019-11-28 07:01:58
I have written an SWT UI which has a primary function of displaying text in a StyledText control. I want to add a handler for Ctrl + F so that when that shortcut is pressed the focus is set to a search box. I have tried using the following code to detect the keypress. sWindow = new Shell(); ... sWindow.getDisplay().addFilter(SWT.KeyDown, new Listener() { @Override public void handleEvent(Event e) { System.out.println("Filter-ctrl: " + SWT.CTRL); System.out.println("Filter-mask: " + e.stateMask); System.out.println("Filter-char: " + e.character); } }); I was expecting that when I pressed Ctrl +