1

The following is simple code that accepts a line of text from a user:

from tkinter import *
from tkinter import ttk
root= Tk()
entry= ttk.Entry(root, width=30)
entry.pack()

text box

I am running this code on a raspberry pi using an external keyboard with a 7 inch touch display. But what I want is that as soon as I click in the text field a simple on-screen keyboard pops up and I am able to enter a string using this keyboard via the touch panel.

I want to know what are the different approaches to accomplish this. Specifically I need a simple small size on-screen keyboard that only needs to have letters a-z.

2

There're a few different keyboard solutions. Two of the most popular are matchbox-keyboard and florence. For matchbox-keyboard, they have a library to interact with auto-hide and auto-show. florence attempts to detect when it should auto-hide and doesn't seem to support auto-show. I'm still looking for an ideal solution myself.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.