Skip to main content
Minor wording change, retaining GUI-agnostic request
Source Link
user3.1415927
  • 171
  • 1
  • 1
  • 6

Is this the proper (pythonic) way to bind a keyboard key and GUI button in tkinter?

Is this the proper (pythonic) way to bind a keyboard key and GUI button in tkinter?

Is this the proper (pythonic) way to bind a keyboard key and GUI button?

I'm specifically asking about binding a keyboard keystroke to a button in a GUI. Originally I planned to bind the keystroke to the GUI button itself, but that seemed impossible, and potentially unwise after I considered it later.`

Is this the proper  (, pythonicpythonic) way to bind a keyboard key and GUI button in tkinter?

I'm specifically asking about binding a keyboard keystroke to a button in a GUI. Originally I planned to bind the keystroke to the GUI button itself, but that seemed impossible, and potentially unwise after I considered it later.`

Is this the proper(, pythonic) way to bind a keyboard key and GUI button?

I'm specifically asking about binding a keyboard keystroke to a button in a GUI. Originally I planned to bind the keystroke to the GUI button itself, but that seemed impossible, and potentially unwise after I considered it later.

Is this the proper  (pythonic) way to bind a keyboard key and GUI button in tkinter?

Rolling back edit #4 without destroying edit #5; edit #4 mis-attributed a comment and added the content to the post. The content should remain in a comment and may not be useful in the body of the post itself.
Source Link
user3.1415927
  • 171
  • 1
  • 1
  • 6

This is the actual code I'm using. I haven't implemented the other functions yet, and I was hoping to just get the code implemented thus-far reviewed. In fact, the original question was just asking about reviewing one specific portion of the code - that is, the binding of the keystrokes in association with the buttons in the GUI. However, that specific-level of question was downvoted and given a recommendation to adhere to the guidance in the help center. I understand there may be a common issue of incomplete code segments posted, but I have truly included the entire module.

This is the actual code I'm using. I haven't implemented the other functions yet, and I was hoping to just get the code implemented thus-far reviewed. In fact, the original question was just asking about reviewing one specific portion of the code - that is, the binding of the keystrokes in association with the buttons in the GUI. However, that specific-level of question was downvoted and given a recommendation to adhere to the guidance in the help center. I understand there may be a common issue of incomplete code segments posted, but I have truly included the entire module.

Tweeted twitter.com/StackCodeReview/status/983093079308689409
edited tags; edited title; edited title
Link
200_success
  • 144.2k
  • 22
  • 188
  • 473
Loading
Add context from comment by OP
Source Link
Loading
Post Reopened by Mast, Simon Forsberg
Post Closed as "Not suitable for this site" by πάντα ῥεῖ, 301_Moved_Permanently, Mast, Stephen Rauch, Grajdeanu Alex
Updated post to line up with guidelines
Source Link
user3.1415927
  • 171
  • 1
  • 1
  • 6
Loading
Source Link
user3.1415927
  • 171
  • 1
  • 1
  • 6
Loading