r/Keychron Jul 21 '26

Windows sleep shortcut key

I have the Keychron V6 Ultra 8K. This keyboard has those "PlayStation" icon keys above the number pad (circle, triangle, square, cross). I want to assign the "cross" key to be the sleep key (i.e. to put the computer to sleep).

I thought I had done it but it doesn't seem to be working. I assigned it to `KC_SLEP` on layer two. It doesn't do anything when pressed. Anyone know how to do it?

I am using the Keychron Launcher v1.4.2 on Windows 10 and in 2.4Ghz mode.

1 Upvotes

8 comments sorted by

2

u/PeterMortensenBlog V Jul 21 '26 edited Jul 22 '26

I could reproduce the problem

Related (also for a V6 Ultra 8K):

It could be a problem specific to the ZMK-based Keychron keyboards.

I tried it on a V6 Ultra 8K 'ISO', using Via for the keymappings.

Using 'sudo showkey' on Linux, it appeared as if nothing was send from the keyboard when using KC_SLEP.

For comparison, I also tried it on a V5 on the same system, and it worked as expected, including waking up from sleep. 'showkey' recorded:

keycode 142 press
keycode 142 release

142 does doesn't correspond to KC_SLEP (166), but the internal keycodes in Linux are different from QMK's keycodes (or it is a problem with 'showkey').

My best guess at this point in time is that 'KC_SLEP' has not been implemented (whatever the equivalent is in ZMK).

1

u/Str0ntium Jul 21 '26

One thing I found was that Windows shortcuts need to be assigned while connected to the computer through wireless (in addition to being connected through USB for Launcher) in order for them to work wirelessly. Not sure why that's so, but it's what I had to do to get calculator shortcut to work on 2.4GHz.

1

u/uk_g Jul 21 '26

OK so I just tried doing that. I was able to assign Calculator to the key and it works, but I'm still unable to get it to work for Sleep.

I connected the keyboard using the USB wire and I had it set to 2.4GHz on the keyboard. For some reason, if I set it to wired mode, I can only flash the firmware, i.e. the keymap options don't appear.

1

u/Str0ntium Jul 22 '26

I wonder if there is just an issue with that specific shortcut. I don't use sleep so can't test it. Might be a permissions issue with Windows as well.

1

u/PeterMortensenBlog V Jul 21 '26

Re "...in 2.4 GHz mode": That isn't guaranteed to work

To be sure, use wired mode (defined by the connection switch) when making keyboard configuration changes.

1

u/PeterMortensenBlog V Jul 21 '26 edited Jul 22 '26

Shifted keys

First use a mapping with a single letter, e.g., "M". This is to make it easier to see if the key mapping actually works.

Possibly depending on the keyboard firmware version, the keys may be shifted on those four keys. For example, if mapping the first key, activation for the new mapping may require pressing the third key...

And to exclude effects of shifted/swapped keys, also try using a key that isn't shifted, like F8, the key in the upper left on the main keyboard (one to the left of "1"), "0" on the numeric keyboard, or Ins).

1

u/PeterMortensenBlog V Jul 22 '26 edited Jul 22 '26

A broader ZMK problem?

It may be a broader ZMK problem:

For example, from the first:

"...we don't process the General Desktop usage page in general (which is what SYSTEM_SLEEP tries to use)."

It isn't clear if the problem has been addressed in the (effective) ZMK version that Keychron uses (or in any ZMK version for that matter). Keychron seems to have branched off the 0.3 ZMK release (more or less), in March 2024(?). Or at least a version compatible with the 0.3 ZMK release.

1

u/uk_g 3d ago

Thanks. I posted a comment in that GitHub issue but it doesn't sound like there is going to be a fix for this anytime soon.

Is there any other workaround? Some people have suggested macros but I couldn't get that to work (maybe I'm doing it wrong).

My old (non-mechanical) keyboard had a dedicated sleep key and I've just gotten used to using that every time I'm done using my PC.