1. Send a single KeyEvent
// Top of ur .cs file ... using AndroidCtrl.ADB.Binary; //or using AndroidCtrl.ADB.Socket; using AndroidCtrl.ADB.Device.Input; ... // Sends a single key-event to the device (bool)ADB.Instance().Device.Input.KeyEvent(AKey); // Sends a single key-event with the long pressed flag to the device (bool)ADB.Instance().Device.Input.KeyEvent(AKey key, bool longPress); // Sends a single key-event with the long pressed flag from a specific input source to the device (bool)ADB.Instance().Device.Input.KeyEvent(InputSource source, AKey key, bool longPress); //Sends a single, mapped (102 keys "en" layout), key-event to the device (bool)ADB.Instance().Device.Input.MappedKeyEvent(int key, KeyMap map, bool alt, bool shift) //Sends a single, mapped (102 keys "en, de" layout), key-event to the device (bool)ADB.Instance().Device.Input.MappedKeyEvent(int key, KeyMap map, string twoLetterISOLanguageName, bool alt, bool shift)
2. Send an KeyEvent stack
// Top of ur .cs file ... using AndroidCtrl.ADB.Binary; //or using AndroidCtrl.ADB.Socket; using AndroidCtrl.ADB.Device.Input; ... // Create a List<AKey> List<AKey> _stack = new List<AKey>() { AKey.Key1, AKey.Key2, AKey.Key3 }; // and send the stack to the phone (bool)ADB.Instance().Device.Input.KeyEventStack(_stack); // Create a List<KeyEvent> List<KeyEvent> _stack = new List<KeyEvent>() { new KeyEvent(AKey.Key1), new KeyEvent(AKey.Key2, true), new KeyEvent(AKey.Key3, false) }; // and send the stack to the phone (bool)ADB.Instance().Device.Input.KeyEventStack(_stack);