--- uid: input-system-step-5-optional --- # Step 5 current and all (optional) For convenience, you can quickly access the last used device of a given type, or list all devices of a specific type. To do this, add support for a `current` and for an `all` getter to the API of `MyDevice`. ```CSharp public class MyDevice : InputDevice, IInputCallbackReceiver { //... public static MyDevice current { get; private set; } public static IReadOnlyList all => s_AllMyDevices; private static List s_AllMyDevices = new List(); public override void MakeCurrent() { base.MakeCurrent(); current = this; } protected override void OnAdded() { base.OnAdded(); s_AllMyDevices.Add(this); } protected override void OnRemoved() { base.OnRemoved(); s_AllMyDevices.Remove(this); } } ```