lordmauve / lordmauve/pgzero

Documentation out of date

Open
#343 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
611
Forks
211
PR merge metrics
No merged PRs in 30d

Description

The current documentation gives the keynames for `keyboard` capitalized [here](https://pygame-zero.readthedocs.io/en/stable/hooks.html#buttons-and-keys). When using these in PGZero projects however, warnings are emitted, that capitalized keynames are deprecated: `DeprecationWarning: Uppercase keyboard attributes (eg. keyboard.M) are deprecated.`

This could lead to confusion since the docs seem outdated.

If the idea was to align key names with pygame, where the alphabet is not capitalized (e.g. `K_a`, `K_b`, etc.), this still doesn't work as the warnings are also emitted for keys that are capitalized in pygame (e.g. `K_SPACE` is used in pygame, but `keyboard.SPACE` still gives the warning `DeprecationWarning: Uppercase keyboard attributes (eg. keyboard.SPACE) are deprecated.`).

It would also probably be good to align usage between `keyboard` and `keys`.

In summary, we need a consistent naming scheme to avoid confusion and update the docs when it is implemented. I see three broad possibilites: all capitalized, none capitalized, mixed capitalization following pygame.

Contributor guide

No contributing guide indexed for this repository

Research direction

Read the Buttons and Keys section in the linked documentation and compare its capitalized key names with the deprecation warnings produced by keyboard attributes. Decide on a consistent naming scheme for keyboard and keys, verify that the chosen usage no longer emits those warnings, and update the documentation to match.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.