Change default Windows keyboard shortcuts

Is there a way to change the standard Windows keyboard shortcuts like CTRL + C , CTRL + X etc. to my required shortcuts like CTRL + J , CTRL + Q etc. in .NET?

I can easily register a new RegisterHotkey hotkey. I just need to unregister the hotkeys that Windows has registered, and add their functionality to the new hotkey.

+4
source share
2 answers

I’m not sure that I understand exactly what you want to do, so I’m not sure that these recommendations are useful.

You can use the instructions on this page to disable keyboard shortcuts.

You can then use the instructions in these articles to create a global keyboard hook that can listen to key combinations. And then you can do everything you need in response to these events.

+1
source

You can try the following code to configure your hotkeys.

private void Form1_KeyDown(object sender, KeyEventArgs e) { if (e.Alt && e.KeyCode.ToString() == "F") { this.KeyPreview = false; MessageBox.Show("Alt Key and F Key Pressed"); } } 
-one
source

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


All Articles