Example #1
0
 /// <summary>
 /// Sends the key.
 /// </summary>
 /// <param name="key">The key.</param>
 /// <param name="mode">The mode.</param>
 /// <returns></returns>
 public async Task <bool> SendKey(Key key, PressKeyMode mode = PressKeyMode.SinglePress)
 {
     return(await this.ExecuteSimpleOperation(ServiceOperation.SendKey, new Dictionary <string, object>() { ["key"] = key.GetOrangeServiceId(), ["mode"] = mode.GetOrangeServiceId() }));
 }
 public async Task <bool> SendKey(Key key, PressKeyMode mode = PressKeyMode.SinglePress)
 {
     PackageHost.WriteInfo($"Sending key #{key.GetOrangeServiceId()} ({key.ToString()}) as {mode.ToString()}");
     return(await this.orangeBox.SendKey(key, mode).ContinueWith(taskAfterSTBAction));
 }
 public bool SendKey(Key key, PressKeyMode mode = PressKeyMode.SinglePress)
 {
     PackageHost.WriteInfo($"Sending key #{key.GetOrangeServiceId()} ({key.ToString()}) as {mode.ToString()}");
     return(this.orangeBox.SendKey(key, mode).Result);
 }