lundi 3 octobre 2016

Creating User-defined Shortcuts in Qt?

I want to allow the user to set their own shortcuts for various tasks by capturing their next input after pressing a push button.

I also need these tasks to be able to be run without having the window in focus, which I've done by setting a hardcoded hotkey such as the following.

if (GetAsyncKeyState(VK_F1))
{
//do stuff
}

So basically I'd like the user to be able to capture exactly one keyboard/mouse event following a button click, no modifiers (shift/alt/ctrl) necessary.

Aucun commentaire:

Enregistrer un commentaire