Comments (10)
This works for me except if I have the terminal up the first a is consumed when opening the repl. If I change it to type 5 As then I get:
Adafruit CircuitPython 1.0.0-rc.3-1-g3cd710c8-dirty on 2017-07-03; Adafruit Gemma M0 with samd21e18
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Adafruit CircuitPython 1.0.0-rc.3-1-g3cd710c8-dirty on 2017-07-03; Adafruit Gemma M0 with samd21e18
>>> aaaa
My file is:
from adafruit_hid.keyboard import Keyboard
from adafruit_hid.keycode import Keycode
import time
kbd = Keyboard()
for i in range(5):
kbd.press(Keycode.A)
time.sleep(0.1)
kbd.release_all()
from adafruit_circuitpython_hid.
What happens if you just run that code manually from the REPL instead of as auto-reload? All the testing I have done is from the REPL.
If you insert a short sleep() before the loop, does the first a
appear?
I haven't added sleep() before release_all(). You should be able to omit it.
from adafruit_circuitpython_hid.
Yes, all five a
s are in the REPL when the same code is in REPL without the sleep.
from adafruit_circuitpython_hid.
How about with the sleep in the REPL? I am a little confused about whether it's the removal of the sleep or using the REPL that caused the problem to go away. If the sleep is causing the problem maybe it's messing up the USB output in some way.
from adafruit_circuitpython_hid.
I don't think there is an issue at all. The first a
is consumed by the "Press any key to enter the REPL".
from adafruit_circuitpython_hid.
Ah! (slaps own forehead) (replying while on vacation on phone maybe not such a good idea)
from adafruit_circuitpython_hid.
hiya just to check - scott are you using the old gemma or are you using metro/feather?
from adafruit_circuitpython_hid.
The old gemma.
from adafruit_circuitpython_hid.
oh weird...ok maybe its me? ill do more testing tonite
from adafruit_circuitpython_hid.
Ok, keep me posted!
from adafruit_circuitpython_hid.
Related Issues (20)
- ImportError: no module named '__future__' HOT 6
- Control Codes in keyboard_layout_us not supported HOT 4
- Examples using the keypad module for a keyboard and macros HOT 6
- Pico + keyboard + output to monochrome 20x4 LCD?
- Consumer Control not working HOT 3
- Support for zoom in/out
- adafruit_hid.keyboard.Keyboard.led_on only returns True once only HOT 2
- Keyboard press delay
- Generic HID device support HOT 29
- usb_hid behaviour at boot.. HOT 28
- Implement HID LampArray Support HOT 2
- BLE Keyboard Functionality Issue HOT 3
- BLE Keyboard Functionality Issue on EFR32xG24 Explorer Kit HOT 1
- Gamecontroller setup under mac HOT 7
- Add support for "Pan" or "Horizontal" wheel movement as well as Back/Forward Buttons
- `find_device` module missing in `adafruit_hid.keyboard.Keyboard` HOT 6
- Double key in Discord shortcuts HOT 2
- USB Keyboard no longer sends keystrokes after windows machine go to sleep HOT 14
- Possible error in Mouse movement library. HOT 2
- Control the speed of layout.write()? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from adafruit_circuitpython_hid.