2

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.

Benjamin Ashbaugh
  • 1,087
  • 7
  • 18
gpuguy
  • 149
  • 3
  • 10

2 Answers2

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.

Archonic
  • 183
  • 9
-1

You could use matchbox keyboard: sudo apt install matchbox-key

goldilocks
  • 60,325
  • 17
  • 117
  • 234