Questions tagged [hotkeys]

Hotkeys provide quick access to user interface application or system actions via combinatorial key presses.

Good software design assumes no point-and-click device present, and allows the user to access all application commands via the keyboard.

On Windows, main menu shortcuts are usually indicated by it's underlined letter, called a mnemonic. They are activated like so:

  • hold Alt
  • tap the mnemonic
  • release Alt

Menu item shortcuts could have mnemonics as well, and are activated by pressing their mnemonic key (no Alt-modifier necessary at this point). These menu items may also have application-wide shortcuts, normally displayed next to the menu item itself.

Some applications implement system-wide global shortcuts, which activate regardless of which application has the user's focus. These are called hotkeys, so see the [hotkey] tag for those questions.

Shortcuts can consist of a combination of Alt/Option, Ctrl, Shift, (on Macs), and function and character keys. Some applications use key-of-chord like shortcuts, where you press a combination (chord) of the above keys in sequence.

Consult the application's user manual for details on what shortcuts it provides.

Useful Links

1159 questions
-1
votes
1 answer

hotkey commands -- can't get them to work

I'm just learning to use AHK, and I'm very frustrated by the fact that no hotkey commands starting with #, ^ or ! leads to any action at all. First I tried the script by Andreas Borutta for simple inputting of a selected string in the script -- no…
-2
votes
0 answers

Cannot comment out code using ctrl+/ in different IDE in windows10

In windows10, when I press ctrl+/, it shows 3 dots: ... instead of commenting the code. This issue remains the same even I use different IDE, already checked the project setting, having the ctrl+/ hotkey
-2
votes
1 answer

Why is win32api.GetAsyncKeyState not a global hotkey?

I'm trying to make a bot that automatically moves the mouse to a specific location. Only problem now is that the function was global, but now isn't anymore for some reason. import mouse import configparser import win32api hexstring =…
joergttv
  • 1
  • 2
-2
votes
2 answers

Im trying to make macro/hotkey

It just doesnt work i get an error saying AttributeError: 'Controller' object has no attribute 'is_pressed' Code: from pynput.mouse import Button, Controller from pynput.keyboard import Key, Controller from pynput.keyboard import Controller from…
Lagis
  • 7
  • 1
  • 7
-2
votes
1 answer

C++ closing my process via hotkey

I'm trying to code a little "virus" (just a fun joke program which messes around with the cursor and makes some beep sounds). However, I want to close this process with my F9 key. Here's what I have so far: void executeApp() { while (true) …
krobeN
  • 5
  • 2
-2
votes
1 answer

Simple script to open window and press hotkey

I want to make a simple script that will run when pressing ctrl + k. This script will then press WINKEY + 3 and then press ctrl + a. I cant seem to figure out a way to do this. I was trying batch files but SendKeys method does not support the WINKEY…
randy
  • 17
  • 1
  • 3
-2
votes
1 answer

VB.Net Hidden Program Hotkeys

Is there a way to register hotkeys to toggle a form from an invisible(hidden) program? I’ve tired normal methods and they only work when the form is either visible, or the active window. Thank you in advance for any help! Private Sub…
gregknight
  • 43
  • 10
-2
votes
1 answer

Why is my tlistbox requiring me to double up my ampersands?

Is there a way to make it so you don't have to double up your &'s to make Delphi list box not register them as hotkeys? We've got a list of drug names that we populate in a ListBox, some of the drugs have &'s in them like "A & D Ointment", well…
Peter Turner
  • 11,199
  • 10
  • 68
  • 109
-2
votes
2 answers

Programming a hotkey utility

I've got a project, where I need to use hotkeys, that would work globally through the whole Windows OS. Now, from my knowledge I only know how to read Key events on current form. How would I go about programming a hotkey utility? And what would be…
Gregor Menih
  • 5,036
  • 14
  • 44
  • 66
-2
votes
1 answer

Keypress event trigger irrespective of window in focus [jQuery]

I want to run a function when someone presses ctrl+c, irrespective of whether he did it while reading a Wikipedia article and trying to copy text, or while copying an URL from the address bar. Also, if possible, could you tell me how I can pass the…
Pranay Prakash
  • 358
  • 4
  • 13
-2
votes
1 answer

Find when right click occurs, stop the effects of it and replace with shift click in java or python

Is there anyway to ignore a right click as it happens, and then replace it with a shift click at the spot of where the right click was in Java/Python? Note that this should happen globally throughout the entire computer. Also note that this is in…
Odinulf
  • 571
  • 2
  • 7
  • 18
-3
votes
1 answer

Send Keypress to specific window/programm only

I have a Script that toggle a source in SLOBS (OBS), how can I make it that the keypress get only send to OBS, mostly my games also react to the Hotkeys, maybe it's possible to get the keypress only send to OBS so that the game is not affected by…
Omexlu
  • 193
  • 1
  • 1
  • 7
-3
votes
2 answers

How can I type "{0}" more quickly in Visual Studio?

In C#, it's common to have to type {0}, {1}, etc. when formatting strings with string.Format() or Console.WriteLine(). Considering its frequency, it's an awkward set of key strokes. But despite my searches, I couldn't find any sort of shorthand or…
Kyle Delaney
  • 11,616
  • 6
  • 39
  • 66
-3
votes
1 answer

C++ Hotkey to run function

Hey looking to assign F1 as a hotkey to run a function. I have a windows 32 project with a Form, however the form will be in the background and not the active window when I press F1. Is there a way to code a hotkey or shortcut so when I press F1 it…
Brandy
  • 544
  • 2
  • 11
  • 30
-3
votes
1 answer

how to use android studio to find java file in sdk

such as Activity.java and View.java, I can't use CMD+O to find these file. I try like this: screenshot
zpy
  • 167
  • 2
  • 9
1 2 3
77
78