Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!ecngs!feeder2.ecngs.de!217.188.199.168.MISMATCH!takemy.news.telefonica.de!telefonica.de!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'root': 0.04; 'key.': 0.07; 'mouse': 0.07; 'msg': 0.07; 'key)': 0.09; 'received:openend.se': 0.09; 'received:theraft.openend.se': 0.09; 'cc:addr:python-list': 0.10; 'def': 0.14; "%r'": 0.16; 'bind': 0.16; 'cc:addr:lac': 0.16; 'cc:addr:openend.se': 0.16; 'event.keysym': 0.16; 'from:addr:lac': 0.16; 'from:addr:openend.se': 0.16; 'from:name:laura creighton': 0.16; 'general.': 0.16; 'message-id:@fido.openend.se': 0.16; 'received:89.233': 0.16; 'received:89.233.217': 0.16; 'received:89.233.217.133': 0.16; 'received:fido': 0.16; 'received:fido.openend.se': 0.16; 'tk()': 0.16; 'laura': 0.18; 'runs': 0.18; 'cc:addr:python.org': 0.21; 'cc:2**1': 0.22; 'keys': 0.22; 'tkinter': 0.22; 'import': 0.24; 'header:In-Reply-To:1': 0.24; 'installed,': 0.29; 'received:se': 0.29; 'cc:no real name:2**1': 0.29; 'lab': 0.31; 'run': 0.32; 'subject:: ': 0.37; 'charset:us-ascii': 0.37; 'learn': 0.60; 'your': 0.60; 'header :Message-Id:1': 0.62; 'box.': 0.66; 'online': 0.71; 'prompt': 0.79; 'received:89': 0.80 To: John McKenzie cc: python-list@python.org, lac@openend.se From: Laura Creighton Subject: Re: Keypress Input In-Reply-To: Message from John McKenzie of "Wed, 03 Jun 2015 18:22:15 +0000." References: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <7426.1433357944.1@fido> Content-Transfer-Encoding: quoted-printable Date: Wed, 03 Jun 2015 20:59:04 +0200 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.3.9 (theraft.openend.se [89.233.217.130]); Wed, 03 Jun 2015 20:59:07 +0200 (CEST) X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 24 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1433357959 news.xs4all.nl 2822 [2001:888:2000:d::a6]:33748 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:91986 Tkinter runs on raspberry pi. Get it installed, and then run this program. from Tkinter import * root =3D Tk() prompt =3D 'Press any key. Remember to keep your mouse in the cyan box. ' lab =3D Label(root, text=3Dprompt, width=3Dlen(prompt), bg=3D'cyan') lab.pack() def key(event): msg =3D 'event.char is %r and event.keysym is %r' % (event.char, event= .keysym) lab.config(text=3Dmsg) root.bind_all('', key) root.mainloop() = Now you will have to bind the various keys to do what it is you want. You need to read online dociumentation for tkinter to learn how to do this, as well as how to use tkinter in general. Laura