tsadarsh / Pymanujan

Calculator but without eval() :infinity:
https://tsadarsh.github.io/Pymanujan/
MIT License
6 stars 5 forks source link

Num-pad and keyboard bindings #10

Closed tsadarsh closed 4 years ago

tsadarsh commented 4 years ago

Number pad bindings in Tkinter seem to be platform-specific :computer: . Please refer to query1 and query2, some discussions happened over there.

The following structure seems to be a good start to bind keysboard inputs :keyboard: :

def callback(e):
    if e.char in _layout.values():
        button_invoke(e.char)

gui_instance.bind("<Key>", callback)

Further where-to-implement discussion to re-use _layout defined in GUI._create_buttons is much needed.

tsadarsh commented 4 years ago

Issue solved in commit: 692e20f497f7550a5401f594a28dab393732891d