Conversation
Summary of ChangesHello @matthewturk, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request enhances the EmulatorJS player experience by providing a configurable option to lock the keyboard during fullscreen gameplay. This feature addresses issues where system-level keybindings (like the Escape key exiting fullscreen) can disrupt emulation, particularly for games that rely on these keys. By integrating this setting into both the backend and frontend, users gain more control over their gaming environment, ensuring a more immersive and uninterrupted experience within the emulator. Highlights
Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request introduces a new configuration option, EJS_KEYBOARD_LOCK, to allow locking the keyboard when the EmulatorJS player is in fullscreen mode. The changes span across the backend and frontend, including configuration management, API endpoints, tests, and the Vue player component. The implementation is solid, with updates to tests and documentation. I have one suggestion on the frontend to improve the event listener handling for better resource management.
Greptile SummaryAdded keyboard lock API integration to enable escape key and other system keys to function as regular inputs when the EmulatorJS player is in fullscreen mode. The implementation listens for fullscreen changes and locks specific keys ( Key changes:
Note: Despite the PR description mentioning a config option, the implementation applies keyboard lock universally when the API is available (commit Confidence Score: 5/5
Important Files Changed
Last reviewed commit: d00b762 |
Description
This adds a config option to enable keyboard lock for the EmulatorJS player. If the config option is set, it adds a listener for when fullscreen changes. When the element goes fullscreen, the keyboard is locked; among other things, this allows escape to be used as a normal keypress in
dosbox_pure, although there may be other uses available as well. When the element ceases to be fullscreen, the keyboard is explicitly unlocked.This lets games that use escape to function normally in fullscreen mode, and while I believe it may not be implemented in all browsers, I've put the functionality behind a conditional to check before attempting to execute it. By default the option is off. I've prepared a pull request for the documentation repository pending any changes/rejections here.
I did use Gemini as a sounding board for finding information about fullscreen mode, but every text character in this was written by me with no autocomplete or other copilot/AI enhancement.
Checklist
Please check all that apply.