You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
MouseEvent and KeyEvent references are missing #631
There are no reference sections for MouseEvent and KeyEvent.
All mouse*() key*() methods accept such an object, but most reference pages for these methods have no examples for it (one exception: https://processing.org/reference/mouseWheel_.html).
Suggested correction
Suggestion 1:
Add reference pages for these classes.
Add a few examples of their use.
Suggestion 2:
describe that for all practical end-user scenarios the global variables (like mouseX, mousePressed, key, keyCode, etc.) contain all necessary information; in that case, I would suggest to even remove the methods taking an event from the documentation.
mouseWheel() could be exception: the getCount() method is not backed by a global.
Special focus on mouseWheel() with getCount() method documentation
Key Files Added:
MouseEvent.json + Spanish translation
KeyEvent.json + Spanish translation
6 new example files with real-world usage scenarios
Enhanced documentation for all mouse/keyboard functions
The solution provides everything users need to effectively work with mouse and keyboard event objects, with clear guidance on when to use event objects vs global variables.
@KeesR Thank you! I’m glad the solution worked well.
Just a quick note the pull request hasn’t been merged yet. Once it’s reviewed and approved (possibly by SabelRaf), the issue can be closed.
Please let me know if any changes are needed on my end. I’m happy to update the PR if required.
Activity
yashodipmore commentedon Jun 16, 2025
@KeesR I'd love to work on these issues. Could you please assign them to me?
yashodipmore commentedon Jun 19, 2025
@SableRaf
Solution Ready for Review
I've implemented a comprehensive solution for this issue and submitted PR #632 .
What's Included:
Complete MouseEvent class reference - All methods documented (getX, getY, getButton, getCount, modifier keys)
Complete KeyEvent class reference - All methods documented (getKey, getKeyCode, modifier keys, isAutoRepeat)
Enhanced all mouse/key functions - Updated mousePressed(), keyPressed(), etc. to document event parameters
6 comprehensive examples - Practical demonstrations of event object usage
Spanish translations - Full internationalization support
Cross-references updated - Proper linking throughout documentation
Addresses Both Suggestions:
Key Files Added:
MouseEvent.json+ Spanish translationKeyEvent.json+ Spanish translationThe solution provides everything users need to effectively work with mouse and keyboard event objects, with clear guidance on when to use event objects vs global variables.
Ready for maintainer review!
yashodipmore commentedon Jun 19, 2025
#632
KeesR commentedon Jun 19, 2025
Thank you a lot, yashodipmore ! Very comprehensive and complete, with nice examples.
Let me know when you expect me to close the ticket. Also fine if SabelRaf will do this after his pull request review.
yashodipmore commentedon Jun 19, 2025
@KeesR Thank you! I’m glad the solution worked well.
Just a quick note the pull request hasn’t been merged yet. Once it’s reviewed and approved (possibly by SabelRaf), the issue can be closed.
Please let me know if any changes are needed on my end. I’m happy to update the PR if required.