Merge pull request #283 from adafruit/ladyada-patch-2
Update keycodes.py
This commit is contained in:
commit
0a9cf5c37c
1 changed files with 3 additions and 2 deletions
|
|
@ -7,9 +7,10 @@ kbd = Keyboard()
|
||||||
while True:
|
while True:
|
||||||
if cpx.button_a:
|
if cpx.button_a:
|
||||||
kbd.send(Keycode.SHIFT, Keycode.A) # Type capital '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
|
pass
|
||||||
|
|
||||||
if cpx.button_b:
|
if cpx.button_b:
|
||||||
kbd.send(Keycode.CONTROL, Keycode.X) # control-X key
|
kbd.send(Keycode.CONTROL, Keycode.X) # control-X key
|
||||||
while cpx.button_b:
|
while cpx.button_b: # Wait for button to be released
|
||||||
pass
|
pass
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue