-
-
Notifications
You must be signed in to change notification settings - Fork 8.5k
[FEAT] Add macOS-specific keys (OPTION, FN) to Keys enum for improved… #15910
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
[FEAT] Add macOS-specific keys (OPTION, FN) to Keys enum for improved… #15910
Conversation
… platform support
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
…COMMAND) follow conventions already in use by ChromeDriver and allow for more accurate key simulations. While not currently in the W3C WebDriver specification, they represent a practical standard used in the field.
Can you explain why you're deleting documentation? |
- Added RIGHT_SHIFT, RIGHT_CONTROL, RIGHT_ALT, and RIGHT_COMMAND using Unicode PUA codes observed in ChromeDriver. - Included symbolic macOS keys OPTION and FN, marked with TODO comments for future validation against W3C WebDriver spec. - Updated class-level Javadoc to clarify the role of PUA mappings and their interoperability considerations. These additions improve platform representation and lay the groundwork for consistent macOS key handling.
@AutomatedTester you are right, my bad, solved. |
User description
🔗 Related Issues
N/A
💥 What does this PR do?
This PR adds the missing macOS-specific symbolic keys
OPTION
andFN
to theKeys
enum inorg.openqa.selenium
. These keys are part of the macOS keyboard layout but were not previously represented in the enum.🔧 Implementation Notes
\uE050
and\uE051
, consistent with the existing keys.💡 Additional Considerations
🔄 Types of changes
PR Type
Enhancement
Description
• Add macOS-specific OPTION and FN keys to Keys enum
• Use Unicode Private Use Area code points for consistency
• Improve platform-specific keyboard support
Changes walkthrough 📝
Keys.java
Add macOS OPTION and FN keys
java/src/org/openqa/selenium/Keys.java
• Added OPTION key with Unicode code point \uE050
• Added FN key with
Unicode code point \uE051
• Positioned keys after COMMAND key
definition