/// <summary> /// Sets the key code. /// </summary> public async void SetKeyCode() { var key = await this._getKey(this.NameValue); var code = (KeyCode)key.KeyValue; if (code == KeyCode.Escape) { return; } this.KeyCode = code; if (key.Control) { this.Modifier = Modifiers.Control; } else if (key.Alt) { this.Modifier = Modifiers.Alt; } else if (key.Shift) { this.Modifier = Modifiers.Shift; } }
/// <summary> /// Sets the key code. /// </summary> public async void SetKeyCode() { var key = await this._getKey(this.NameValue); this.KeyCode = (KeyCode)key.KeyValue; if (key.Control) { this.Modifier = Modifiers.Control; } else if (key.Alt) { this.Modifier = Modifiers.Alt; } else if (key.Shift) { this.Modifier = Modifiers.Shift; } }
/// <summary> /// Removes this instance. /// </summary> public void Remove() { this.KeyCode = KeyCode.None; this.Modifier = Modifiers.None; }