espidf_ble_keyboard · ESPHome Component Reference
sleep shutdown mute volume_up play_pause and more are documented in the
README.
| Modifier | Hex |
|---|---|
| None | 0x00 |
| Left Ctrl | 0x01 |
| Left Shift | 0x02 |
| Left Alt | 0x04 |
| Left GUI / Win / Cmd | 0x08 |
| Right Ctrl | 0x10 |
| Right Shift | 0x20 |
| Right Alt / AltGr | 0x40 |
| Right GUI / Win / Cmd | 0x80 |
| Key | Hex | Key | Hex |
|---|---|---|---|
| F1 | 0x3A | F7 | 0x40 |
| F2 | 0x3B | F8 | 0x41 |
| F3 | 0x3C | F9 | 0x42 |
| F4 | 0x3D | F10 | 0x43 |
| F5 | 0x3E | F11 | 0x44 |
| F6 | 0x3F | F12 | 0x45 |
| Key | Code | Key | Code | Key | Code |
|---|---|---|---|---|---|
| a / A | 0x04 | j / J | 0x0D | s / S | 0x16 |
| b / B | 0x05 | k / K | 0x0E | t / T | 0x17 |
| c / C | 0x06 | l / L | 0x0F | u / U | 0x18 |
| d / D | 0x07 | m / M | 0x10 | v / V | 0x19 |
| e / E | 0x08 | n / N | 0x11 | w / W | 0x1A |
| f / F | 0x09 | o / O | 0x12 | x / X | 0x1B |
| g / G | 0x0A | p / P | 0x13 | y / Y | 0x1C |
| h / H | 0x0B | q / Q | 0x14 | z / Z | 0x1D |
| i / I | 0x0C | r / R | 0x15 |
| Key | Code | Shifted |
|---|---|---|
| 1 | 0x1E | ! |
| 2 | 0x1F | @ |
| 3 | 0x20 | # |
| 4 | 0x21 | $ |
| 5 | 0x22 | % |
| 6 | 0x23 | ^ |
| 7 | 0x24 | & |
| 8 | 0x25 | * |
| 9 | 0x26 | ( |
| 0 | 0x27 | ) |
| Key | Code | Key | Code |
|---|---|---|---|
| Enter | 0x28 | Up Arrow | 0x52 |
| Escape | 0x29 | Down Arrow | 0x51 |
| Backspace | 0x2A | Left Arrow | 0x50 |
| Tab | 0x2B | Right Arrow | 0x4F |
| Space | 0x2C | Insert | 0x49 |
| Caps Lock | 0x39 | Delete (Fwd) | 0x4C |
| Print Screen | 0x46 | Home | 0x4A |
| Scroll Lock | 0x47 | End | 0x4D |
| Pause / Break | 0x48 | Page Up | 0x4B |
| Menu / App | 0x65 | Page Down | 0x4E |
| Key | Code | Shifted |
|---|---|---|
| - / _ | 0x2D | _ |
| = / + | 0x2E | + |
| [ / { | 0x2F | { |
| ] / } | 0x30 | } |
| \ / | | 0x31 | | |
| ; / : | 0x33 | : |
| ' / " | 0x34 | " |
| ` / ~ | 0x35 | ~ |
| , / < | 0x36 | < |
| . / > | 0x37 | > |
| / / ? | 0x38 | ? |
| Key | Code | Key | Code |
|---|---|---|---|
| Numpad 0 | 0x62 | Numpad 6 | 0x5E |
| Numpad 1 | 0x59 | Numpad 7 | 0x5F |
| Numpad 2 | 0x5A | Numpad 8 | 0x60 |
| Numpad 3 | 0x5B | Numpad 9 | 0x61 |
| Numpad 4 | 0x5C | Numpad . | 0x63 |
| Numpad 5 | 0x5D | Numpad Enter | 0x58 |
| Numpad + | 0x57 | Numpad - | 0x56 |
| Numpad * | 0x55 | Numpad / | 0x54 |
| Num Lock | 0x53 |
| Action | action: value |
|---|---|
| Win + R (Run) | combo:0x08:0x15 |
| Win + L (Lock) | combo:0x08:0x0F |
| Win + D (Desktop) | combo:0x08:0x07 |
| Win + E (Explorer) | combo:0x08:0x08 |
| Ctrl + C (Copy) | combo:0x01:0x06 |
| Ctrl + V (Paste) | combo:0x01:0x19 |
| Ctrl + Z (Undo) | combo:0x01:0x1D |
| Ctrl + A (Select All) | combo:0x01:0x04 |
| Alt + F4 (Close) | combo:0x04:0x3D |
| Alt + Tab (Switch) | combo:0x04:0x2B |
| Ctrl+Shift+Esc (Tasks) | combo:0x03:0x29 |
| Ctrl + Alt + Del | ctrl_alt_del |
consumer:0x0192| Application Launch | ||
|---|---|---|
| App | Code | |
| Calculator | 0x0192 | |
| Email Client | 0x018A | |
| File Explorer | 0x0194 | |
| Media Player | 0x0183 | |
| Browser Home | 0x0223 | |
| Browser Search | 0x0221 | |
| Browser Bookmarks | 0x022A | |
| Screen Saver | 0x019E | |
| Control Panel | 0x019F | |
| Task Manager | 0x01A9 | |
| Media & Volume | ||
|---|---|---|
| Action | Code | |
| Play / Pause | 0x00CD | |
| Stop | 0x00B7 | |
| Next Track | 0x00B5 | |
| Previous Track | 0x00B6 | |
| Mute | 0x00E2 | |
| Volume Up | 0x00E9 | |
| Volume Down | 0x00EA | |
| Fast Forward | 0x00B3 | |
| Rewind | 0x00B4 | |
| Brightness Up | 0x006F | |
| Brightness Down | 0x0070 | |
Report ID 4| Named Actions | |
|---|---|
| Action | Value |
| Left Click | left_click |
| Right Click | right_click |
| Middle Click | middle_click |
| Parameterised Actions | |
|---|---|
| Format | Example |
| Click by mask | mouse_click:0x01 |
| Move cursor | mouse_move:50:-20 |
| Scroll wheel | mouse_scroll:3 |
| Action | Description |
|---|---|
switch_host:0 | Switch to host slot 0–9. Reconnects via directed advertising or advertises for new pairing. |
forget_host:0 | Remove BLE bond for host slot 0–9 and clear the stored address. |
button: - platform: espidf_ble_keyboard keyboard_id: ble_keyboard name: "Open Run Dialog" action: "combo:0x08:0x15" # Win + R - platform: espidf_ble_keyboard keyboard_id: ble_keyboard name: "Type Hello" action: "Hello World" # send a string directly - platform: espidf_ble_keyboard keyboard_id: ble_keyboard name: "Left Click" action: "left_click" # mouse left click - platform: espidf_ble_keyboard keyboard_id: ble_keyboard name: "Ctrl+Alt+Del" action: "ctrl_alt_del" # built-in action - platform: espidf_ble_keyboard keyboard_id: ble_keyboard name: "Ctrl+Shift+A" action: "combo:0x03:0x04" # 0x01+0x02=0x03 (Ctrl+Shift), 0x04=A