Skip to content
← Back to Community
how do u implement keys in the python language?
Profile icon
MEOWsting
For example,how to define Key letter A if Key letter A brings up the home menu dasweat.weebly.com```
Voters
Profile icon
KaylaMurphy2
Comments
hotnewtop
Profile icon
[deleted]

In python 3, it would look like this:

import readchar#import the readchar module r = readchar.readkey()#get the key input if r == 'a': bringUpHomeMenu()#if a was pressed bring up the home menu
Profile icon
MEOWsting
Profile icon
[deleted]

@MEOWsting no problem

Profile icon
Geocube101

I'm confused
do you mean like detecting a key press?

Profile icon
MEOWsting