private void keyUpEvent2(object sender, RawKeyEventArgs args) { if (args.VKCode == lastKeyDown) { return; } else { int vkCode = args.VKCode; bool addKeyToList = iProcessor.processInput(vkCode, false); lastKeyDown = vkCode; } }
private void keyDownEvent(object sender, RawKeyEventArgs args) { if (args.VKCode == lastKeyUP) { return; } else { int vkCode = args.VKCode; bool addKeyToList = iProcessor.processInput(vkCode, true); lastKeyUP = vkCode; if (addKeyToList && vkCode != 81) { keyList.Items.Add(args.Key.ToString()); } } }