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

ENG: Keyboard Bindings #110

Open
StefanDeYoung opened this issue Jul 3, 2020 · 2 comments
Open

ENG: Keyboard Bindings #110

StefanDeYoung opened this issue Jul 3, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@StefanDeYoung
Copy link
Contributor

  1. Catalog all of the existing keybindings in OrbitV
  2. Add keyboard bindings to eng_gui
@StefanDeYoung StefanDeYoung added the enhancement New feature or request label Jul 3, 2020
pmelanson added a commit that referenced this issue Jul 13, 2020
@pmelanson
Copy link
Member

Added a text file of the keys that hopefully can be easily changed into an "if elif elif elif" or similar block.

@StefanDeYoung
Copy link
Contributor Author

StefanDeYoung commented Jul 13, 2020

Excellent! In terms of writing the elif chain, I think it would look like this:

def keybinds(event):
    if event.char.lower() == 'a':
        my_function()
   elif event.char.lower() == 'b':
        my_other_function()

button = tk.Button(parent)
button.bind("<Key>", keybinds)
button.pack()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants