This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: KeyPress bindings don't work
Type: Stage:
Components: Tkinter Versions: Python 2.2
process
Status: closed Resolution: wont fix
Dependencies: Superseder:
Assigned To: Nosy List: effbot, reaux74
Priority: high Keywords:

Created on 2002-10-23 22:52 by reaux74, last changed 2022-04-10 16:05 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
KeyBind.py reaux74, 2002-10-23 22:52 Simple Tkinter app with button-1 mouse and keypress bindings
Messages (2)
msg12919 - (view) Author: Roman Khramets (reaux74) Date: 2002-10-23 22:52
Hi,

I don't think keypress bindings work properly in
Tkinter. When I bind "<Any-KeyPress>" to a method of a
Frame-derived class, it does not work under Windows XP
(not sure about other OSes).

Here is a code snippet I am using. Please, see the file
attached for the actual code.


Thanks,
..Roman
msg12920 - (view) Author: Fredrik Lundh (effbot) * (Python committer) Date: 2002-10-27 13:28
Logged In: YES 
user_id=38376

the canvas doesn't have keyboard focus, so all keyboard
events goes elsewhere.  to move focus to the canvas, call
self.canvas.focus_set() at the appropriate place (e.g. in the
onButton1 handler)

</F>
History
Date User Action Args
2022-04-10 16:05:46adminsetgithub: 37360
2002-10-23 22:52:05reaux74create