Skip to content

Brackets "[" and "]" writing or inserting does not work in Python 3.13 interactive shell (Portuguese keyboard) #132871

Closed as duplicate
@Muhrat

Description

@Muhrat

Bug Summary
In Python 3.13 (tested in the interactive shell), the AltGr key combinations used to input brackets ([, ], ) on a Portuguese (Portugal) keyboard do not work as expected. The same combinations work perfectly in Python 3.11 and 3.12.

Environment
OS: Windows 10 / 11

Python version: Python 3.13

Keyboard layout: Portuguese (Portugal)

Terminal: PowerShell and Command Prompt (default Windows terminals)

Steps
Install Python 3.13 on Windows

Open PowerShell or Command Prompt

Type python to enter the interactive shell

Attempt to type brackets using:

AltGr + 8 → expected [

AltGr + 9 → expected ]

Nothing appears or delayed characters appear

Expected Behaviour

The bracket characters [ and ] should appear as normal using AltGr on a Portuguese keyboard, as they do in Python 3.11 and 3.12.

Additional Info
This may be related to how Python 3.13 handles input in the interactive shell.

Switching to US keyboard layout avoids the issue, but it’s not a usable workaround for native Portuguese users.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions