keyboard - How to get a combination of keys in c# -


how can capture ctrl + alt + k + p keys on c# form? thanks

it chord, cannot detect without memorizing having seen first keystroke of chord. works:

public partial class form1 : form {     public form1() {         initializecomponent();     }     private bool prefixseen;      protected override bool processcmdkey(ref message msg, keys keydata) {         if (prefixseen) {             if (keydata == (keys.alt | keys.control | keys.p)) {                 messagebox.show("got it!");             }             prefixseen = false;             return true;         }         if (keydata == (keys.alt | keys.control | keys.k)) {             prefixseen = true;             return true;         }         return base.processcmdkey(ref msg, keydata);     } } 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -