@Dineshkumar.S , Welcome to Microsoft Q&A, based on my test from the answer, I reproduced your problem.
As Viorel suggested, we could get the error code to check where is the problem.
I change the following code in the RegisterHotKeyInternal
method to get the error code.
If used the following code to register hotkey Windows+D, I will get the error code1409
.
Based on the description from the GitHub, the error means that Hot key is already registered
.
Therefore, Windows +D
could not be registered as hotkeys.
I recommend that you don't use Windows Key
as the hotkey, because Windows Key
already defined many hotkeys.
Hope my explanation could help you.
Best Regards,
Jack
If the answer is the right solution, please click "Accept Answer" and upvote it.If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.