Merge pull request #283 from adafruit/ladyada-patch-2

Update keycodes.py
This commit is contained in:
Limor "Ladyada" Fried 2018-08-01 09:05:25 -07:00 committed by GitHub
commit 0a9cf5c37c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -7,9 +7,10 @@ kbd = Keyboard()
while True:
if cpx.button_a:
kbd.send(Keycode.SHIFT, Keycode.A) # Type capital 'A'
while cpx.button_a:
while cpx.button_a: # Wait for button to be released
pass
if cpx.button_b:
kbd.send(Keycode.CONTROL, Keycode.X) # control-X key
while cpx.button_b:
while cpx.button_b: # Wait for button to be released
pass