8000 Add Keyboard.send(); add ConsumerControl classes. by dhalbert · Pull Request #12 · adafruit/Adafruit_CircuitPython_HID · GitHub
[go: up one dir, main page]

Skip to content

Add Keyboard.send(); add ConsumerControl classes. #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 3, 2018

Conversation

dhalbert
Copy link
Collaborator
@dhalbert dhalbert commented Apr 2, 2018
  1. Add the convenience method Keyboard.send() which does Keyboard.press() and then Keyboard.release_all(). So:
kbd.send(Keycode.SHIFT, Keycode.A)

is the same as

kbd.press(Keycode.SHIFT, Keycode.A)
kbd.release_all()

This should be a lot more convenient to use.

  1. Add ConsumerControl and ConsumerControlCode to send multimedia keypresses. New in CircuitPython 3.0. Tested on Linux.

  2. Fixes two indentation issues that unnecessarily sent multiple reports for combination keypresses.

Fixes #5.

@dhalbert dhalbert requested review from tannewt and ladyada April 2, 2018 22:28
@ladyada
Copy link
Member
ladyada commented Apr 3, 2018

tried w/3.0 and Metro M4 on win 7 w/no success

Copy link
Member
@tannewt tannewt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 send

@tannewt tannewt merged commit 524a8b5 into adafruit:master Apr 3, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Apr 10, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_HID to 3.0.0 from 2.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#15 from dhalbert/wait_for_ready
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#12 from dhalbert/consumer_control
  > Merge pull request adafruit/Adafruit_CircuitPython_HID#11 from sommersoft/new_docs
@dhalbert dhalbert deleted the consumer_control branch April 8, 2025 14:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0