How can I convert backslash key (\'\\\') to key code?
On my keyboard backslash code is 220, but the method below
(int)\'\\\\\'
ret
If
var char = System.Windows.Forms.Keys.OemPipe; // 220 var code = (int)char;
then
public static int ToKeyValue(this char ch) { return (int)(System.Windows.Forms.Keys)ch; }