Skip to main content
Topic: New keychron Q5 pro keyboard. Looking for a way to query the battery level. (Read 1143 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

New keychron Q5 pro keyboard. Looking for a way to query the battery level.

I've been scouring the internet for an answer and maybe I'm just bad at it but I've found nothing to answer my question so far.

I just bought the Q5 Pro keyboard from Keychron and right now I've got it operating wirelessly in 2.4gz mode.  Anyone know if there's a way to query battery level from within the os?  There's a key combo you can hit and the keyboard lights up leds to indicate it's level so I'm not without options but I like having battery levels for devices built into waybar.

Of course I could just switch the thing to bluetooth mode and then I'm assuming I'd have a battery indicator available through upower but I was just wondering if anyone here has experience with this?  Or if someone much smarter and/or experienced than me knows where I could be looking to track down info on this device.

Re: New keychron Q5 pro keyboard. Looking for a way to query the battery level.

Reply #1
upower is the only non-GUI method I know. GNOME power manager et. al might be able to report battery level too, but as far as I know they're just front ends for upower in this respect.

Re: New keychron Q5 pro keyboard. Looking for a way to query the battery level.

Reply #2
I recently got the new Keychron Q5 Pro keyboard and I'm loving the build quality and typing experience so far! However, I'm trying to figure out how to query the battery level. Is there a built-in way to check the battery status directly on the keyboard or through software? Would appreciate any tips or suggestions from others who have used it! Thanks!

Re: New keychron Q5 pro keyboard. Looking for a way to query the battery level.

Reply #3
I'm using a wireless mouse, so I'm not sure if it'll work the same for both of you.

Notes:
The <number> could be any number assigned by the system. Usually starting with 0

I've used this to query the mouse battery percentage.

First see if you can go to:
Code: [Select]
/sys/class/power_supply/hidpp_battery_<number>/

From there check the files named with model_name and capacity.
The model_name verifies that this device in this directory/folder is indeed for the keyboard.
capacity for the battery percentage.

If you can't find anything (such as the directory) then try these commands: (I don't recommend these for a status script(such as for status bars) it's gonna be slow/bloated.)

for finding the keyboard: (The first line reported should be the name of the device, second line being the directory it is at.)
Code: [Select]
find /sys -type f -iname 'model_name' -exec cat {} \; -execdir pwd \; 2> /dev/null

if the output does say that it's from Keychron Q5/wireless keyboard
then:

Go to the directory: (If you have more than 1 wireless device this command may not work. You will have to go to it manually.)
Code: [Select]
cd $(find /sys -type f -iname 'model_name' -execdir pwd \; 2> /dev/null)

From there there should be a file named model_name and capacity.

Re: New keychron Q5 pro keyboard. Looking for a way to query the battery level.

Reply #4
I also use Keychron keyboard and afaik its battery status does not get exposed to Linux.
Just charge it at the 1st day of each month; that should do. ;)

artist
Linux is simple; use Artix, or Submit Your System To Evil Malicious D(a)emons

 

Re: New keychron Q5 pro keyboard. Looking for a way to query the battery level.

Reply #5
I recently got the new Keychron Q5 Pro keyboard and I'm loving the build quality and typing experience so far! However, I'm trying to figure out how to query the battery level. Is there a built-in way to check the battery status directly on the keyboard or through software? Would appreciate any tips or suggestions from others who have used it! Thanks!

You can get a nice (interesting?) onboard battery query by hitting Fn+b.  This will illuminate the number keys, it will illuminate 1 through 0 (all 10 of them) if the thing is at 100%, and only 1 through 5 (5 of them) for 50%, etc.

Yeah I'm very happy I returned the logitech thing I bought and ordered one of these.

*Although* one thing I can complain about is the (maybe I'm wrong) inability to disable the numlock & capslock backlight indicator.  Or if that is disableable and I just gave up to quickly, I can at least complain the that indicator backlight pulses off and then on after a second seemingly randomly.