OCESS/orbitx

ENG: Keyboard Bindings

Opened this issue · 2 comments

  1. Catalog all of the existing keybindings in OrbitV
  2. Add keyboard bindings to eng_gui

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

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()