Skip to content
Showing 1-2 of 2 items.
@renovate
Admin 20/05/2021 18:30
Detecting or Restricting some keys on the Keyboard in Wpf Application

Sometimes you might want to detect when some special keys are pressed from your app. Some of which the regular onKeyDown or OnKeyUp just wont suffice. You may want to restrict them or simply detect when pressed only so in the episode ill show you how to easily hook your keyboard. Create a class KeyHook.cs KeyHook.cs class KeyHook { public delegate IntPtr LowLevelKeyboardProc(int nCode, IntPtr wParam, IntPtr lParam); private const int WH_KEYBOARD_LL = 13; private const int WM_KEYDOWN...

WPF