From f59bb624a9852329a971b652908e1d176182f089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dar=C3=ADo=20Kondratiuk?= Date: Wed, 31 Jul 2019 08:02:03 -0300 Subject: [PATCH] Phone buttons support (#1233) --- lib/PuppeteerSharp/Input/KeyDefinitions.cs | 48 +++++++++++++++++++++- 1 file changed, 47 insertions(+), 1 deletion(-) diff --git a/lib/PuppeteerSharp/Input/KeyDefinitions.cs b/lib/PuppeteerSharp/Input/KeyDefinitions.cs index c80406c5d..27db0bf52 100644 --- a/lib/PuppeteerSharp/Input/KeyDefinitions.cs +++ b/lib/PuppeteerSharp/Input/KeyDefinitions.cs @@ -1592,10 +1592,56 @@ internal static class KeyDefinitions Key = "\"", Code = "Quote" }, + ["SoftLeft"] = new KeyDefinition + { + Key = "SoftLeft", + Code = "SoftLeft", + Location = 4 + }, + ["SoftRight"] = new KeyDefinition + { + Key = "SoftRight", + Code = "SoftRight", + Location = 4 + }, + ["Camera"] = new KeyDefinition + { + KeyCode = 44, + Key = "Camera", + Code = "Camera", + Location = 4 + }, + ["Call"] = new KeyDefinition + { + Key = "Call", + Code = "Call", + Location = 4 + }, + ["EndCall"] = new KeyDefinition + { + KeyCode = 95, + Key = "EndCall", + Code = "EndCall", + Location = 4 + }, + ["VolumeDown"] = new KeyDefinition + { + KeyCode = 182, + Key = "VolumeDown", + Code = "VolumeDown", + Location = 4 + }, + ["VolumeUp"] = new KeyDefinition + { + KeyCode = 183, + Key = "VolumeUp", + Code = "VolumeUp", + Location = 4 + } }; internal static KeyDefinition Get(string key) => Definitions[key]; - + internal static bool ContainsKey(string key) => Definitions.ContainsKey(key); } } \ No newline at end of file