private void MainImage_KeyDown(object sender, KeyEventArgs e) { Keyboard.Coords c; if (!Keyboard.KeyCoords.TryGetValue(e.Key, out c)) { return; } SomeInterval t = _gridDrawer.GetKeyboardInterval(c.x, c.y, 0); if (t != null) { Debug.WriteLine("KeyDown {0} {1} -> {2}", c.x, c.y, t.ToString()); PlayNote(t); } }