From 2c04636e7b70539e86ad73c359c1130d51425c5a Mon Sep 17 00:00:00 2001 From: iDONi <30952073+Aidoni0797@users.noreply.github.com> Date: Fri, 15 Aug 2025 20:19:46 +0500 Subject: [PATCH 1/3] Update keys.py Improve wording in docstring and comment in keys.py --- py/selenium/webdriver/common/keys.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/py/selenium/webdriver/common/keys.py b/py/selenium/webdriver/common/keys.py index 8d2bf29c5e8d3..4d8a9550876af 100644 --- a/py/selenium/webdriver/common/keys.py +++ b/py/selenium/webdriver/common/keys.py @@ -18,7 +18,7 @@ class Keys: - """Set of special keys codes.""" + """Set of special key codes for keyboard actions.""" NULL = "\ue000" CANCEL = "\ue001" # ^break @@ -58,7 +58,7 @@ class Keys: SEMICOLON = "\ue018" EQUALS = "\ue019" - NUMPAD0 = "\ue01a" # number pad keys + NUMPAD0 = "\ue01a" # Keys representing number pad digits. NUMPAD1 = "\ue01b" NUMPAD2 = "\ue01c" NUMPAD3 = "\ue01d" From 699326b18604a5237fe26a32aa0efaed5bfc9894 Mon Sep 17 00:00:00 2001 From: iDONi <30952073+Aidoni0797@users.noreply.github.com> Date: Fri, 15 Aug 2025 21:17:36 +0500 Subject: [PATCH 2/3] Refine docstring and clarify NUMPAD comment as per review feedback Refine docstring and clarify NUMPAD comment as per review feedback --- py/selenium/webdriver/common/keys.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/py/selenium/webdriver/common/keys.py b/py/selenium/webdriver/common/keys.py index 4d8a9550876af..01781c10a2585 100644 --- a/py/selenium/webdriver/common/keys.py +++ b/py/selenium/webdriver/common/keys.py @@ -18,7 +18,10 @@ class Keys: - """Set of special key codes for keyboard actions.""" + """Set of special key codes for input actions. + + Primarily intended for keyboard usage, but also applied in other contexts + such as Action Chains and IME interactions.""" NULL = "\ue000" CANCEL = "\ue001" # ^break @@ -58,7 +61,8 @@ class Keys: SEMICOLON = "\ue018" EQUALS = "\ue019" - NUMPAD0 = "\ue01a" # Keys representing number pad digits. + # Keys representing number pad digits (NUMPAD0–NUMPAD9) + NUMPAD0 = "\ue01a" NUMPAD1 = "\ue01b" NUMPAD2 = "\ue01c" NUMPAD3 = "\ue01d" From 9e8eb0a0511184567fec1d91c98594cc265a584e Mon Sep 17 00:00:00 2001 From: Corey Goldberg <1113081+cgoldberg@users.noreply.github.com> Date: Fri, 15 Aug 2025 15:08:44 -0400 Subject: [PATCH 3/3] Minor formatting --- py/selenium/webdriver/common/keys.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/py/selenium/webdriver/common/keys.py b/py/selenium/webdriver/common/keys.py index 01781c10a2585..d07cdc3159c81 100644 --- a/py/selenium/webdriver/common/keys.py +++ b/py/selenium/webdriver/common/keys.py @@ -14,14 +14,16 @@ # KIND, either express or implied. See the License for the # specific language governing permissions and limitations # under the License. + """The Keys implementation.""" class Keys: """Set of special key codes for input actions. - Primarily intended for keyboard usage, but also applied in other contexts - such as Action Chains and IME interactions.""" + Primarily intended for keyboard usage, but also applied in other contexts + such as Action Chains and IME interactions. + """ NULL = "\ue000" CANCEL = "\ue001" # ^break @@ -61,7 +63,7 @@ class Keys: SEMICOLON = "\ue018" EQUALS = "\ue019" - # Keys representing number pad digits (NUMPAD0–NUMPAD9) + # Keys representing number pad digits NUMPAD0 = "\ue01a" NUMPAD1 = "\ue01b" NUMPAD2 = "\ue01c" @@ -72,6 +74,7 @@ class Keys: NUMPAD7 = "\ue021" NUMPAD8 = "\ue022" NUMPAD9 = "\ue023" + MULTIPLY = "\ue024" ADD = "\ue025" SEPARATOR = "\ue026" @@ -79,7 +82,8 @@ class Keys: DECIMAL = "\ue028" DIVIDE = "\ue029" - F1 = "\ue031" # function keys + # Function keys + F1 = "\ue031" F2 = "\ue032" F3 = "\ue033" F4 = "\ue034"