0
In order for the button to enter the value into the object, set its command so that:
Button(command=lambda: entry.insert(END,'1'))
If '1' is the value to be inserted. The process would be the same for the other buttons, then changing only the value to be inserted. In this context I would advise you to create a function that contains all the buttons on your Keyboard.
To recognize which of the input objects is in focus you would use a bind of the type <FocusIn>
In this way their input objects could associate themselves both to the same function that contains the settings of the buttons, so that when realizing which one is in focus, they would change which entry they must refer to.
example of syntax for bind:
entry.bind('<FocusIn>', keyboard)
From what I understand, you want an event that’s active the moment entrys are clicked. Take a look at the events you can use on Tkinter
– Tuxpilgrim