[FEAT] Add macOS-specific keys (OPTION, FN) to Keys enum for improved…#15910
[FEAT] Add macOS-specific keys (OPTION, FN) to Keys enum for improved…#15910diemol merged 8 commits intoSeleniumHQ:trunkfrom
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
OPTIONandFNto theKeysenum inorg.openqa.selenium. These keys are part of the macOS keyboard layout but were not previously represented in the enum.🔧 Implementation Notes
\uE050and\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 keysjava/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