I have always been hardcoding hotkeys using GetAsyncKeystate()
(hotkey is used to show/hide the Application).
Now I've been wondering how the automatic keydetection in PC-games works: .
How can I do it?
Asked
Active
Viewed 282 times
0
-
What do you mean by automatic key detection? They are just keys set by default by game and you can change them. – Ben sin aspa Jan 19 '16 at 14:50
-
you click on the option and then it waits until you press a key, detects which key it was and changes the hotkey to the key you just set. – nice Jan 19 '16 at 15:46
-
that depends on the platform you are going to implement this. what are you using? WinForms? WPF? – Waescher Jan 19 '16 at 19:06
-
I'm trying to implement on WinForms. – nice Jan 19 '16 at 21:35
1 Answers
-1
I suggest you get keypressed event and set string as event args, and save that string as applictacion settings hotkeys.

Ben sin aspa
- 100
- 11
-
I thought about that but this method does not work with combinations like Ctrl+V. – nice Jan 20 '16 at 13:56
-
@nice what about keypressed event fires up string hotkey+=ctrl, event fired again hotkey+=v. Hotkey setting finished save hotkey in app settings. – Ben sin aspa Jan 20 '16 at 14:27
-