private void KeyEvent(Keys key, bool down) { foreach (var keyMap in KeyMapDictionary.Values) { if (keyMap.KeyboardKey.Key == key) { UpdateButtonsState(down, keyMap.GetKeyMask(down)); SerialWriter.WriteState((byte)Index, buttons); break; } } }
internal void AllButtonsUp() { SerialWriter.WriteState((byte)Index, 0xff); }