I have a function that is run when a key is pressed, this is done using the following:
root.bind("<Key>", lambda event:KeyPressed(event, string_x, ...)
This function appends the letter associated with the key that was pressed to string_x
. Once it's done this, I need it to return the new value of string_x
so that it can be used in main.py
. My file structure is as follows:
-> main.py
-> keypressed.py
I have tried parsing the function bound to the event another "callback" function, that should run a function in main.py
, but it doesn't seem to do anything at all, and I'm not sure why.