hotkeys

RegisterHotKey not working with invisible forms (c#)

偶尔善良 提交于 2020-01-24 04:43:42
问题 I'm trying to put an icon in the system tray and then give it a global keyboard shortcut to carry out a function. I'm using RegisterHotKey to set the global keyboard shortcut, and it works if the main form associated with the icon is visible. But if the form is invisible then the WndProc method is never invoked. Any ideas? Edit: What I mean by "hidden" is that the following is added to the main form: protected override void OnLoad(EventArgs e) { hotKey = new GlobalHotkey(GlobalHotkey.WIN,

C#: How to capture global mouse/HID events

≡放荡痞女 提交于 2020-01-24 01:32:07
问题 I wish to write a small tool that will capture a global event when the user presses the Windows button and scrolls the mousewheel up or down. When such an event is captured, I wish to redirect said output to a virtual keystroke combination of Win-+ or Win-- (plus/minus). Can this be done? If the windows key is reserved, ctrl-alt or such would do. 回答1: Since it uses the windows key, the key can be captured globally using a hotkey binding. RegisterHotKey at msdn. Edit: It seems the mousewheel

SAS: Execute SAS code using hotkey

女生的网名这么多〃 提交于 2020-01-24 00:53:07
问题 I want to execute code which is independent of my current program via keyboard shortcuts within the Enhanced Editor in SAS 9.4 for Windows. I've achieved this with limited success being able to execute only macro statements. However, I want to be able to execute non-macro statements, too. How do I do this? Here's what I've figured out so far. General Setup Get to the KEYS menu by either entering "KEYS" into the command prompt or submitting dm 'keys'; For one of the keys, enter the definition

How can I disable specific Windows hotkeys from inside a software using C++?

被刻印的时光 ゝ 提交于 2020-01-16 03:29:37
问题 I want to put inside a software the necessary codes for it to disable Windows (Xp, Vista, specially 7 and sucessors) hotkeys that could allow the user to get away from the software. Details: The commands must be valid only while the software is running; when its not running, Windows hotkeys must be enabled (so: if the user starts the software, the hotkeys are disable; if he closes it, must be re-enabled). I don't want to disable all windows hotkeys (some key hotkeys such as ctrl+alt+del must

Netbeans hotkey to turn off highlighted search text?

半城伤御伤魂 提交于 2020-01-14 09:56:28
问题 I've googled this question but found none. Please share if you know how to. 回答1: For 7.0: Tools -> Options -> Keymap -> 'Toggle Highlight Search'. Mine is Alt+Shift+H. 回答2: If I am not mistaken what you are looking for it Alt+Shift+H 来源: https://stackoverflow.com/questions/6657064/netbeans-hotkey-to-turn-off-highlighted-search-text

Make a “hotkey” to focus a TextBox in WPF

≡放荡痞女 提交于 2020-01-14 07:34:08
问题 I am trying to make a hot key (ie Ctrl + Y) that will change the focus to a text box. I am a transplant from Delphi, and this is confusing me. In Delphi 5 this was so, so easy. (On the caption of the label you could just add an & before the letter you want to make the hot key. After you point the label at the TextBox the hotkey would work.) For WPF, I am seeing horrific examples in WPF involving calling out to Win32 calls or making a command for each hotkey (and other such heavy

Excel VBA to list key bindings (OnKey ?)

你。 提交于 2020-01-11 05:11:35
问题 I am working with a large set of Excel vba scripts and some of them are bound to Ctrl-key combinations. I know how to set one at a time in the user interface for Excel: Pull up the list of vba scripts (Alt-F8), select a script, and click Options. Then you can bind/unbind the script to a Ctrl-key combo. However, you can bind more than one script to the same key, and Excel will pick one (probably the first one it finds in some manner) and ignore the other bindings. So, I want to assign Ctrl-e

Catching “global hotkeys” (Windows)

南楼画角 提交于 2020-01-06 05:38:08
问题 Now I've been trying to create a similar functionality as there is in Push-To-Talk voice chat applications, but so far I couldn't find any fitting solutions to this. I am not using MFC or CLR. The problem is quite simple. My window should be usually out of focus (ie minimized etc), but I need to react to keypresses (basically, I don't even want to know if the button is being held down or not). Unfortunately, WM_KEYDOWN only works if the window has keyboard focus. I do know that for example

Catching “global hotkeys” (Windows)

百般思念 提交于 2020-01-06 05:38:06
问题 Now I've been trying to create a similar functionality as there is in Push-To-Talk voice chat applications, but so far I couldn't find any fitting solutions to this. I am not using MFC or CLR. The problem is quite simple. My window should be usually out of focus (ie minimized etc), but I need to react to keypresses (basically, I don't even want to know if the button is being held down or not). Unfortunately, WM_KEYDOWN only works if the window has keyboard focus. I do know that for example

RegisterHotkey Fn Modifier?

戏子无情 提交于 2020-01-03 18:50:54
问题 I know you can use CTRL , ALT , SHIFT , etc. modifiers for RegisterHotKey, but what about the Fn key? I used to have some bloatware on my laptop that changed brightness when Fn+Up/Down was pressed. I removed all the bloatware, and I want to write a program that does the same thing. Any help is appreciated! 回答1: Fn key is modifier but not software like ALT , SHIFT , etc. which are processed by operation system. Fn is hardware key modifier so it changes keycode keyboard sends to operation