WPF Global Keyboard Shortcuts / Global Keyboard Shortcuts

First, I would like to know what is the difference between global hot keys and global key hooks and their use as hot keys?

Secondly, I want to use global hot keys in my application, it will have 2 parts: 1. I will create a window showing the user which keys he is pressing right now, with the KeyUp function, he will save the combination. 2. When the combination from step 1 is pressed, it will call a specific function

The user can have several hotkey combinations at the same time, each of which combines a combination of DIFFERENT calls.

I found many solutions / explanations / something on the Internet, but I don’t know what will be better for my needs - here where I need your help.

Here are some (possibly all) solutions / explanations / everything I found:

Using global keyboard (WH_KEYBOARD_LL) in WPF / C #

https://gist.github.com/Ciantic/471698

http://www.dreamincode.net/forums/topic/180436-global-hotkeys/

http://msdn.microsoft.com/en-us/library/windows/desktop/dd375731.aspx

http://www.codeproject.com/Tips/274003/Global-Hotkeys-in-WPF

http://www.pinvoke.net/default.aspx/user32/RegisterHotKey.html

How to register a global hotkey to say CTRL + SHIFT + (LETTER) using WPF and .NET 3.5?

WPF global hotkeys working from every window



Thank your help

+6
source share

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


All Articles