mirror of
https://github.com/IAmTomShaw/f1-race-replay.git
synced 2026-05-09 08:25:56 +02:00
[PR #219] refactor: Implement Command pattern for input event handling #227
Labels
No labels
bug
enhancement
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/f1-race-replay#227
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/IAmTomShaw/f1-race-replay/pull/219
Author: @anirudhk06
Created: 2/5/2026
Status: 🔄 Open
Base:
main← Head:key_events📝 Commits (2)
6fca128refactor: clean up speed commands and update key event handlingac5ec91Merge branch 'main' into key_events📊 Changes
7 files changed (+206 additions, -106 deletions)
View changed files
➕
src/inputs/__init__.py(+0 -0)➕
src/inputs/base.py(+8 -0)➕
src/inputs/key_press.py(+113 -0)➕
src/inputs/key_release.py(+13 -0)➕
src/interfaces/__init__.py(+0 -0)📝
src/interfaces/race_replay.py(+51 -84)📝
src/ui_components.py(+21 -22)📄 Description
Summary
Refactored input handling to use the Command pattern for both keyboard and mouse events, improving code consistency and maintainability.
Changes
src/inputs/:TogglePauseCommand- Play/pause toggleStartForwardCommand/StopForwardCommand- Hold-to-forward functionalityStartRewindCommand/StopRewindCommand- Hold-to-rewind functionalityIncreaseSpeedCommand/DecreaseSpeedCommand- Playback speed controlsBenefits
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.