esphome-blekeyboard icon indicating copy to clipboard operation
esphome-blekeyboard copied to clipboard

[BUG] Media buttons don't get released

Open Sr-psycho opened this issue 6 months ago • 1 comments

Describe the bug A clear and concise description of what the bug is.

Please complete the following information:

  • ESPHome version: [e.g. 2021.11.6]
  • Component version [e.g. 2.3.1]
void Esp32BleKeyboard::press(MediaKeyReport key, bool with_timer) {
  if (this->is_connected()) {
    if (with_timer) {
      this->update_timer();
    }
    bleKeyboard.press(key);
	   delay(100);//<--
    bleKeyboard.release(key);//<--
  }
}

Hello Dmitry! Please make this correction, because without it the media buttons remain enabled, even if you write the necessary ble_keyboard.release commands in the config file.

Sr-psycho avatar Dec 16 '23 00:12 Sr-psycho