Correct, if PTT is pressed down and you change control to another pc your mic is left in an open state until PTT is pressed again, This can lead to embarrassing open mic situations and this happens many times with both me and other guild members. So I want to prevent switching while PTT is being held down. But it's also not just PTT keys that are the problem. Sometimes I'm moving the character when switching screens in game and those keys get stuck as well which can cause your character to just run off. Hence the "any" key request.
In theory you could keep it to just common keys like 1-9 a-z all the f keys, numpad keys, space bar, etc... I wrote a list in my program with all the key codes mapped out.
public static readonly Dictionary<string, ushort> KeyDictionary = new Dictionary<string, ushort>
{
{ "0", 0x30 },
{ "1", 0x31 },
{ "2", 0x32 },
{ "3", 0x33 },
{ "4", 0x34 },
{ "5", 0x35 },
{ "6", 0x36 },
{ "7", 0x37 },
{ "8", 0x38 },
{ "9", 0x39 },
{ "a", 0x41 },
{ "b", 0x42 },
{ "c", 0x43 },
{ "d", 0x44 },
{ "e", 0x45 },
{ "f", 0x46 },
{ "g", 0x47 },
{ "h", 0x48 },
{ "i", 0x49 },
{ "j", 0x4A },
{ "k", 0x4B },
{ "l", 0x4C },
{ "m", 0x4D },
{ "n", 0x4E },
{ "o", 0x4F },
{ "p", 0x50 },
{ "q", 0x51 },
{ "r", 0x52 },
{ "s", 0x53 },
{ "t", 0x54 },
{ "u", 0x55 },
{ "v", 0x56 },
{ "w", 0x57 },
{ "x", 0x58 },
{ "y", 0x59 },
{ "z", 0x5A },
{ "/", 0xBF },
{ ".", 0xBE },
{ ",", 0xBC },
{ "'", 0xDE },
{ "-", 0xBD },
{ "=", 0xBB },
{ "[", 0xDB },
{ "]", 0xDD },
{ "`", 0xC0 },
{ ";", 0xBA },
{"f1" , 0x70},
{"f2" , 0x71},
{"f3" , 0x72},
{"f4" , 0x73},
{"f5" , 0x74},
{"f6" , 0x75},
{"f7" , 0x76},
{"f8" , 0x77},
{"f9" , 0x78},
{"f10", 0x79},
{"f11", 0x7A},
{"f12", 0x7B},
{"space", 0x20},
{"num0", 0x60},
{"num1", 0x61},
{"num2", 0x62},
{"num3", 0x63},
{"num4", 0x64},
{"num5", 0x65},
{"num6", 0x66},
{"num7", 0x67},
{"num8", 0x68},
{"num9", 0x69},
{"num*", 0x6A},
{"num+", 0x6B},
{"num-", 0x6D},
{"num.", 0x6E},
{"num/", 0x6F},
{"enter", 0x0D},
{"lwin", 0x5B},
{"lshift", 0xA0},
{"lctrl", 0xA2},
{"lmenu", 0xA4},
{"rwin", 0x5C},
{"rshift", 0xA1},
{"rctrl", 0xA3},
{"rmenu", 0xA5}
};