Adafruit_Learning_System_Gu.../Make_It_A_Keyboard/strings.py
Mike Barela 280df0bb1f
Create strings.py
first commit
2018-07-26 09:47:19 -04:00

13 lines
370 B
Python

from adafruit_circuitplayground.express import cpx
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keyboard_layout_us import KeyboardLayoutUS
kbd = Keyboard()
layout = KeyboardLayoutUS(kbd)
while True:
if cpx.button_a:
# Type 'abc' followed by Enter (a newline).
layout.write('Jane Doe\n')
while cpx.button_a:
pass