private void PressSomeKey(KeyCode keyCode) { if (keyCode == COMBINED_KEY_CODE) { if (combineKey) { return; } combineKey = true; } else { KeyCollection keyCollection = new KeyCollection(); if (combineKey) { keyCollection.keyCodes.Add(COMBINED_KEY_CODE); keyCollection.keyCodes.Add(keyCode); SomeKeyPressd?.Invoke(keyCollection); combineKey = false; } else { keyCollection.keyCodes.Add(keyCode); SomeKeyPressd?.Invoke(keyCollection); combineKey = false; } } }
private void PressSomeKey(KeyCode keyCode) { if (keyCode == COMBINED_KEY_CODE) { if (combineKey) { return; } combineKey = true; } else { if (combineKey) { SomeKeyPressd?.Invoke(COMBINED_KEY_CODE | keyCode); combineKey = false; } else { SomeKeyPressd?.Invoke(keyCode); combineKey = false; } } }