Akki-jaiswal / Akki-jaiswal/pong-game

[Feature] Add Keyboard Shortcut: Press “P” to Pause/Resume Game

未关闭
#90 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
JavaScript
星标
22
派生
116
PR 合并指标
30 天内没有已合并 PR

描述

🔍 Have You Searched Existing Issues?

Yes, this is not a duplicate of #87, which adds a clickable pause/resume button. This feature improves gameplay control via keyboard shortcuts.

----

💡 Problem Description

During fast-paced gameplay, using the mouse to pause or resume interrupts the player’s flow. Keyboard support for pausing/resuming is expected in modern games and improves accessibility.

----

✅ Proposed Solution

Introduce keyboard shortcuts:
- Press **P** to toggle Pause/Resume
- (Optional) Press **Esc** to pause and **R** to restart the match

These shortcuts would work alongside any existing UI buttons without replacing them.

----

🔄 Alternatives Considered

Only having mouse buttons for pause/resume, but this limits accessibility and speed for advanced players.

---

🖼️ Screenshots or Diagrams (Optional)

None required; functionality is keyboard-based.

---

📘 Additional Context

This feature improves game fluidity, accessibility, and UX. I would love to work on this enhancement as part of GSSoC'25. 🎮⌨️

----

🙌 Contributor Checklist

[x] I have checked for similar feature requests

[x] I agree to follow this project's Code of Conduct

[x] I am a GSSOC'25 contributor

[x] I want to work on this issue

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。