-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[dotnet] Add representations for right modifier keys in Keys class #15960
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: trunk
Are you sure you want to change the base?
[dotnet] Add representations for right modifier keys in Keys class #15960
Conversation
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
dotnet/src/webdriver/Keys.cs
Outdated
/// <summary> | ||
/// Represents the macOS Options key (same Unicode value as RightShift). | ||
/// </summary> | ||
public static readonly string Options = Convert.ToString(Convert.ToChar(0xE050, CultureInfo.InvariantCulture), CultureInfo.InvariantCulture); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On macs, Option is equivalent to Alt (left and right)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That means Java key codes should be updated as well, along with the other implementations in this feature request. OPTION here is also equal to SHIFT
selenium/java/src/org/openqa/selenium/Keys.java
Lines 116 to 122 in d50a168
RIGHT_SHIFT('\uE050'), // aligns with ChromeDriver usage | |
RIGHT_CONTROL('\uE051'), | |
RIGHT_ALT('\uE052'), | |
RIGHT_COMMAND('\uE053'), | |
// Symbolic macOS keys not yet standardized | |
OPTION('\uE050'), // TODO: verify Unicode value with WebDriver spec |
I noticed that there are no additional numpad keys in the code. Can I add them in this commit?
|
User description
🔗 Related Issues
fixes #15945
💥 What does this PR do?
This pull request adds support for several new keyboard keys to the
Keys
class in the WebDriver library, including right-side modifier keys and macOS-specific keys. It also updates theGetDescription
method to include descriptions for these new keys.Additions to supported keys:
dotnet/src/webdriver/Keys.cs
: Added constants for right-side modifier keys (RightShift
,RightControl
,RightAlt
,RightCommand
) and macOS-specific keys (Options
,Function
).Updates to key descriptions:
dotnet/src/webdriver/Keys.cs
: Updated theGetDescription
method to include descriptions for the newly added keys.🔧 Implementation Notes
💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
Add right-side modifier keys (RightShift, RightControl, RightAlt, RightCommand)
Add macOS-specific keys (Options, Function)
Update GetDescription method for new key descriptions
Changes walkthrough 📝
Keys.cs
Add right modifier and macOS keys
dotnet/src/webdriver/Keys.cs