public KeyLocation(Tiedye.Hardware.Keypad.KeyScanCode key) { this.Group = 0; this.Key = 0; this.On = false; this.KeyCode = key; }
public KeyLocation(int Group = 0, int Key = 0, bool On = false) { this.Group = Group; this.Key = Key; this.On = On; KeyCode = ScanCode.None; }
protected override void OnKeyUp(KeyEventArgs e) { //Log("RAW release: " + e.KeyCode.ToString()); ScanCode x = TranslateKeyCode(e); if (x == ScanCode.None) { base.OnKeyUp(e); return; } //Log("Release " + x.ToString()); KeyReleased(this, new KeyLocation(x)); }
protected override void OnKeyDown(KeyEventArgs e) { //Log("RAW press: " + e.KeyCode.ToString()); ScanCode x = TranslateKeyCode(e); if (x == ScanCode.None) { base.OnKeyDown(e); return; } //Log("Press " + x.ToString()); KeyPressed(this, new KeyLocation(x)); }