Check if Entry widget is selected
<p>I'm making a program on the Raspberry Pi with a touchscreen display. 
I'm using Python Tkinter that has two entry widgets and one on screen keypad. I want to use the same keypad for entering data on both entry widgets. </p>

<p>Can anyone tell me how can i check if an entry is selected? Similar like clicking on the Entry using the mouse and the cursor appears. How can I know that in Python Tkinter?</p>

<p>Thank you.</p>

<p>There is always a widget with the keyboard focus. You can query that with the <code>focus_get</code> method of the root window. It will return whatever widget has keyboard focus. That is the window that should receive input from your keypad. </p>

python tkinter raspberry-pi touchscreen raspberry-pi3