Keyboard: Difference between revisions
Jump to navigation
Jump to search
| Line 48: | Line 48: | ||
else: | else: | ||
print("Error: " + result.text) | print("Error: " + result.text) | ||
</source> | |||
If you find this too complicated, you can use the daskeyboard [https://gitlab.socsci.ru.nl/wilberth/daskeyboard Python library]. Just put the file [https://gitlab.socsci.ru.nl/wilberth/daskeyboard/-/raw/master/daskeyboard.py?inline=false daskeyboard.py] in the same directory as the experiment and use: | |||
<source lang="python"> | |||
import daskeyboard | |||
daskeyboard.keyColor("g", "blue") # G key becomes blue | |||
</source> | </source> | ||