Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect mouse and keyboard mapping #84594

Closed
Jah-On mannequin opened this issue Apr 28, 2020 · 3 comments
Closed

Incorrect mouse and keyboard mapping #84594

Jah-On mannequin opened this issue Apr 28, 2020 · 3 comments
Labels
3.8 only security fixes topic-tkinter type-bug An unexpected behavior, bug, or error

Comments

@Jah-On
Copy link
Mannequin

Jah-On mannequin commented Apr 28, 2020

BPO 40414
Nosy @terryjreedy, @serhiy-storchaka, @Jah-On

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2020-05-01.22:59:21.883>
created_at = <Date 2020-04-28.02:06:14.101>
labels = ['3.8', 'type-bug', 'expert-tkinter', 'invalid']
title = 'Incorrect mouse and keyboard mapping'
updated_at = <Date 2020-05-01.22:59:21.882>
user = 'https://github.com/Jah-On'

bugs.python.org fields:

activity = <Date 2020-05-01.22:59:21.882>
actor = 'terry.reedy'
assignee = 'none'
closed = True
closed_date = <Date 2020-05-01.22:59:21.883>
closer = 'terry.reedy'
components = ['Tkinter']
creation = <Date 2020-04-28.02:06:14.101>
creator = 'Jah-On'
dependencies = []
files = []
hgrepos = []
issue_num = 40414
keywords = []
message_count = 3.0
messages = ['367481', '367504', '367893']
nosy_count = 3.0
nosy_names = ['terry.reedy', 'serhiy.storchaka', 'Jah-On']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue40414'
versions = ['Python 3.8']

@Jah-On
Copy link
Mannequin Author

Jah-On mannequin commented Apr 28, 2020

Hi all,
On Ubuntu Cinnamon Remix, with python3, and tkinter,

canvas.bind("<1>", callback)
canvas.bind("<2>", callback)
canvas.bind("<3>", callback)
canvas.bind("<4>", callback)
canvas.bind("<5>", callback)

are now mapped to mouse buttons, instead of keyboard number buttons.

@Jah-On Jah-On mannequin added 3.8 only security fixes topic-tkinter type-bug An unexpected behavior, bug, or error labels Apr 28, 2020
@serhiy-storchaka
Copy link
Member

On which platform and Python version they were mapped to keyboard number buttons?

@terryjreedy
Copy link
Member

Sequences 'a' and '1' are unambiguously interpreted as abbreviating '<Keypress-a>' and '<Keypress-1>', and similarly for any other printable ascii char. '<a>' is interpreted also as '<Keypress-a>', but there is no reason to add the brackets. In any case, binding a specific printable key is fairly rare. '<1>' is ambiguous is that it could also mean '<Button-1>'. Since '1' is available to abbreviate '<Keypress-1>', tcl currently chooses the button interpretation, and has AFAIK for at least a decade or more. In any case, what tcl does is not a Python bug, and it does not matter what it might have done in old versions.

Note. Buttons 4 and 5 are used on Linux for a mousewheel. On Windows, they correspond to actual buttons, if present. I just tested with a mouse with two side buttons. '<6>', etc, is seen as key-6.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.8 only security fixes topic-tkinter type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

2 participants