C # / WPF hotkey on unfocused form (e.g. launch)

Is it possible to catch a hot key (for example, Ctrl+ Space) from an unfocused form so that it is displayed whenever someone uses this special hot key; And without the need to register this hotkey in the registry. A similar event can be seen in the application "Launchy".

thank


Language: C # (WPF) // OS: Windows

+3
source share
2 answers

You need to call the RegisterHotKeyAPI function .
Here is the WPF shell.

+5
source

I think you will need to do this in active form by handling the KeyDown event

+1
source

Source: https://habr.com/ru/post/1788500/


All Articles