python / python/cpython

Broken Number Pad on macOS in New Interactive Interpreter in 3.13.0

Open
#125,494 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

3.13 3.14 OS-mac topic-repl type-bug
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Bug report

Bug description:

When using the new interactive interpreter, digits can no longer be entered using the number pad on a standard full-size Mac keyboard. This did not occur in 3.12 or earlier and is likely not desired behaviour.

Workaround:
Pressing the "clear" button on the keyboard will fix this (acting like a toggle). I suspect this is because the Mac clear key shares a key code with "Num Lock" on Windows, where this is standard behaviour.

This is NOT standard behaviour on macOS, however. MacOS keyboards do not have a "Num Lock", nor do their keyboards have markings for secondary actions as with windows keyboards.
MQ052
I imagine that very few users would recognize that their number pad is not working in the new Python interpreter because of a mis-applied platform-specific key binding of the "clear" key.

CPython versions tested on:

3.13.0

Operating systems tested on:

macOS

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the number-pad behavior in the new interactive interpreter on macOS with Python 3.13.0, comparing it with Python 3.12 or earlier. Trace the interpreter's macOS key handling, especially the clear-key behavior; done means number-pad digits work normally without pressing clear and existing behavior remains intact.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.