Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
UppHub
Status & Roadmap
FAQ
Authors & License
Forums
Funding U++
Search on this site











SourceForge.net Logo

SourceForge.net Logo

GitHub Logo

Discord Logo

HotKey

 

Ctrl::RegisterSystemHotKey demonstration

 

 

main.cpp

 

#include <CtrlLib/CtrlLib.h>

 

using namespace Upp;

 

GUI_APP_MAIN

{

    TopWindow win;

    int id = Ctrl::RegisterSystemHotKey(K_CTRL|K_F1, [] { PromptOK("Ctrl+F1"); });

    Ctrl::RegisterSystemHotKey(K_ALT|K_CTRL|K_SHIFT|K_A, [] { PromptOK("Ctrl+Alt+Shift+A"); });

    win.Run();

    Ctrl::UnregisterSystemHotKey(id);

    win.Run();

}

 

 

 

 

Do you want to contribute?