KeyEventArgs KeyData.ToString() returns backwards key press

166 views Asked by At

I have a KeyEvent called Bind that captures two key presses (Ctrl + Ins) I want to return this as a string but when I do using (Bind.KeyData.ToString()) the string is backwards and instead of ( Control, Insert ) it returns ( Insert, Control ). How do I fix this?

private KeyEventArgs Bind = new KeyEventArgs(Keys.Control | Keys.Insert);

And to call I use

Bind.KeyData.ToString()
1

There are 1 answers

0
SᴇM On BEST ANSWER

Construct you result string manually:

string result = $"{Bind.Modifiers}, {Bind.KeyCode}";