GithubHelp home page GithubHelp logo

Comments (4)

T-vK avatar T-vK commented on August 21, 2024 2

You could try to replace

USAGE(1), 0xE2, // USAGE (Mute) ; bit 4: 16

with

  USAGE(1),           0xB8,          //   USAGE (Eject)                ; bit 4: 16

And also replace

const MediaKeyReport KEY_MEDIA_MUTE = {16, 0};

with

const MediaKeyReport KEY_MEDIA_EJECT = {16, 0};

Then you should be able to use:

bleKeyboard.write(KEY_MEDIA_EJECT);

If you think your project could help other people, consider creating a repository for it here on GitHub.

from esp32-ble-keyboard.

msmithkey avatar msmithkey commented on August 21, 2024

Awesome thanks! will do. I will test this out when i get home tonight. I'm planning on open sourcing it, even though it will be pretty simplistic. Right now I'm just doing proof of concepts and learning new platforms. Appreciate the help

from esp32-ble-keyboard.

DhruvGupta5 avatar DhruvGupta5 commented on August 21, 2024

KEY_MEDIA_EJECT

Hi i have two questions

You could try to replace

USAGE(1), 0xE2, // USAGE (Mute) ; bit 4: 16

with

  USAGE(1),           0xB8,          //   USAGE (Eject)                ; bit 4: 16

And also replace

const MediaKeyReport KEY_MEDIA_MUTE = {16, 0};

with

const MediaKeyReport KEY_MEDIA_EJECT = {16, 0};

Then you should be able to use:

bleKeyboard.write(KEY_MEDIA_EJECT);

If you think your project could help other people, consider creating a repository for it here on GitHub.

hi i am new to cpp,
can you kindly answer my two questions

  1. whats the role of bit in the following line ?
    USAGE(1), 0xE2, // USAGE (Mute) ; bit 4: 16 (copied from
    const MediaKeyReport KEY_MEDIA_MUTE = {16, 0};
    )
  2. in reference to the value of HID_CONSUMER_EJECT = 0xB8 from
    https://github.com/NicoHood/HID/blob/d4938ddcff7970bc1d32a040a08afeac4915e4a9/src/HID-APIs/ConsumerAPI.h#L154
    do we still have to use KEY_MEDIA_EJECT for this library ?

from esp32-ble-keyboard.

paulruvolo avatar paulruvolo commented on August 21, 2024

I tested T-vK's suggested modification to support the eject key, and it works! The only caveat (and maybe this is obvious to others) is that you should unpair with the keyboard and then repair to make sure the device you are connecting to is using the new mapping.

from esp32-ble-keyboard.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.