keyboard-shortcuts

How do you refer to the mac command key in the String version of Java's KeyStroke.getKeystroke?

自古美人都是妖i 提交于 2019-12-08 05:33:59
问题 The documentation for KeyStroke.getKeystroke(String) (e.g., getKeyStroke("control DELETE") ) does not provide an example of how to access the macintosh command key, and I can't find a reference that lists the spellings of the various words for modifiers like "control" that this function accepts. What is the syntax for the command key? For reference, here's the documentation for getKeystroke: Parses a string and returns a KeyStroke . The string must have the following syntax: <modifiers>* (

Is there a built-in shortcut key for selecting the owner of the currently active form?

拟墨画扇 提交于 2019-12-08 05:06:42
问题 I have a main form with two child modeless forms, e.g. all of the forms can be active simultaneously: class MainForm : Form { Form child1; Form child2; public MainForm() { Text = "MainForm"; child1 = new Form { Text = "Child1" }; child2 = new Form { Text = "Child2" }; child1.Show(this); child2.Show(this); } } I would like to allow the user to Alt+Tab into all of them, but surprisingly, I found that if any of the child forms is active, the owner form cannot be selected from the Alt+Tab menu.

Why is the Backslash key being reported as OemQuote under WPF?

被刻印的时光 ゝ 提交于 2019-12-08 04:37:27
问题 In our WPF application, we were wondering why our CTRL-Backslash keyboard shortcut wasn't firing. Wrote a quick test app to log what key was being pressed, and in the OnKeyDown override, e.Key was being reported as OemQuote and not OemBackslash as expected. Worse, on someone else's machine (but also with a US keyboard and the US layout too, but a different manufacturer), they get a different value for e.Key altogether. Yes, I know that's what 'Oem' stands for, but shouldn't all OEMs know what

CodeRush not working?

≯℡__Kan透↙ 提交于 2019-12-08 04:23:45
问题 I was using Resharper and I wanted to try CodeRush so I suspended Resharper and installed CodeRush Xpress. When I installed CodeRush version 2010.1.4 (from this downlad page) the shortcuts did not work. I tried F2 and other shortcuts that schold work but they did not. However I was able to invoke some CodeRush functions by clicking right mouse button and choosing "Refractor" from the drop down menu. When I choose it there is CodeRush action menu where I can select for example "Rename" but as

How to construct Qt::Key out of KeySym or KeyCode?

女生的网名这么多〃 提交于 2019-12-08 03:54:25
问题 I have a low-level key logger that receives scan codes, without QKeyEvent's since the QApplication doesn't have focus. The scan codes can be converted into key syms using system specific library calls. Scan codes correspond to Qt's QKeyEvent->nativeScanCode() and key syms correspond to QKeyEvent->nativeVirtualKey(), but Qt's Qt::Key values seems independently mapped. I would like to either take a given Qt::Key and convert to either sym key or scan code, or construct a Qt::Key out of a sym key

Java - How to apply a keyboard shortcut of 3 keys for a JButton?

浪子不回头ぞ 提交于 2019-12-08 03:34:59
问题 Currently i am using "Ctrl + Space" shortcut to fire a JButton event in my Java code like this : this.getRootPane().registerKeyboardAction( addStudentButtonActionListener, KeyStroke.getKeyStroke( KeyEvent.VK_SPACE, KeyEvent.CTRL_MASK ), JComponent.WHEN_IN_FOCUSED_WINDOW ); But i want to assign a shortcut of "Shift + Ctrl + Space" for this event instead. How can i do that ? 回答1: Then use the following key stroke: KeyStroke.getKeyStroke(KeyEvent.VK_SPACE, KeyEvent.SHIFT_MASK | KeyEvent.CTRL

Angular.js keypress events and factories

佐手、 提交于 2019-12-08 01:04:17
问题 I'm building an app in Angular and I'd like to have keypress events. However, I'd prefer not to litter my code with a keypress here and a keypress there, but rather to put all keypress events into a single factory (or service) and then import this factory into my controllers to use. I HOPE that doing things this way will make it easier for me to manage the keypress events and make sure I don't have conflicts (two events tied to the same keypresses) or something like that. Does anybody have

grabbing keyboard doesnt allow changing focus

ⅰ亾dé卋堺 提交于 2019-12-07 15:55:24
问题 as soon as i use display.grab_keyboard, no other window seems to know of its own focus. with the keyboardgrab running i can select other windows and even send keyevents to them, but if this window is a text input there will be no blinking cursor. i read something about grab_keyboard generating focusevents, but that doesnt mean it blocks all focus events, does it? what am i not getting here? from Xlib import X,XK from Xlib.display import Display import signal,sys root = None display = None def

Take my web page focus to browser address bar using javascript / jquery

喜夏-厌秋 提交于 2019-12-07 15:36:25
问题 Desired behavior : When a Tabkey press happens on a particular dom element in a webPage I want my cursor focus to go to address bar. (I want it via Javascript. Using any browser extension is not what is desired here) When you press Control + L shortcut in a webpage, it takes your focus to address bar. But when I try to trigger this via javascript it does'not work. <div id="1" tabindex="1"></div> <div id="2" tabindex="1"></div> <div id="3" tabindex="1"></div> <script> var some = $('#1'); some

block ALL keyboard access, mouse access and keyboard shortcut events

时光怂恿深爱的人放手 提交于 2019-12-07 12:49:53
问题 In order to block ALL keyboard access, mouse access and keyboard shortcut events in one of my projects, I: Created a full screen transparent borderless window, in front of other windows, but invisible. Handle all keyboard and mouse events with simple return; the window itself. Make the window modal [NSApp runModalForWindow:myWindow] in order to block keyboard shortcuts. Release window from touchpad's gesture events only. But this guy made it look simple in a tiny app -MACIFIER: How did he do