简体   繁体   中英

Best way to register hotkey dynamically in c#?

i am developing a server-client (client may be multiple ) application, in which server app should have functionality to switch controls over client for i need to define some hotkey like 'Ctrl + 1' for first client, 'Ctrl + 2' for second client and so on. For this i have to register a new hotkey when a new client is connected to the server.

My question : Is it possible to register 'Ctrl + 11' as a global hotkey? If yes then how?

My question : Is it possible to register 'Ctrl + 11' as a global hotkey?

No it is not possible. It is not possible because keyboards do not have an 11 key. They have keys 0 to 9 and then if the user needs to input 10, that is done with two key presses, first 1 and then 0 . You cannot create a global hot key that involves two key presses.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM