I have an Apple Magic Keyboard connected over bluetooth:
[Magic Keyboard]# info
Device 2C:33:61:E5:1A:F8 (public)
Name: Magic Keyboard
Alias: Magic Keyboard
Class: 0x00000540
Icon: input-keyboard
Paired: yes
Trusted: yes
Blocked: no
Connected: yes
WakeAllowed: no
LegacyPairing: no
UUID: Human Interface Device... (00001124-0000-1000-8000-00805f9b34fb)
UUID: PnP Information (00001200-0000-1000-8000-00805f9b34fb)
Modalias: bluetooth:v004Cp0267d0100
After an hour or so of Googling and experimenting I am giving up and asking for help.
I’m guessing that battery status is part of the Bluetooth standard, so Linux should be able to know the current battery percentage of the Magic Keyboard, I just have no idea where to look.
What I have tried:
❯ upower --dump
Device: /org/freedesktop/UPower/devices/DisplayDevice
power supply: no
updated: Fri 23 Oct 2020 02:02:26 PM CEST (125419 seconds ago)
has history: no
has statistics: no
unknown
warning-level: none
icon-name: 'battery-missing-symbolic'
Daemon:
daemon-version: 0.99.11
on-battery: no
lid-is-closed: no
lid-is-present: no
critical-action: PowerOff
No Magic Keyboard there.
❯ ls /sys/class/power_supply
hidpp_battery_1
No Magic Keyboard there either, that’s my wireless Logitech mouse.