pqrs-org / Karabiner-Elements

Karabiner-Elements is a powerful utility for keyboard customization on macOS Sierra (10.12) or later.
https://pqrs.org/osx/karabiner/
The Unlicense
18.73k stars 836 forks source link

Pressing Escape on lock screen doesn't sleep M1 MacBook Pro with Karabiner-Elements running #3379

Open bikrrr opened 1 year ago

bikrrr commented 1 year ago

I usually sleep my M1 MacBook Pro by pressing Cmd + Control + Q to lock it and then pressing the Escape to sleep it. With Karabiner running, pressing Escape on the lock screen will briefly make the screen go black, but then it turns right back on.

If I use my mouse to click the Cancel button at the bottom of the lock screen, it does sleep the computer. So this seems to only be a problem with the Escape key. This happens with both the built-in keyboard and an external Bluetooth Apple keyboard. If I quit Karabiner-Elements, pressing Escape does sleep the computer.

I also deleted the one modification I use Karabiner for (Caps Lock → Cmd+Control+Option+Shift) and even with no modifications enabled, the problem still occurs.

Interestingly, this is not a problem on the Intel iMac on which I have also installed Karabiner.

Karabiner-Elements version 14.11.0. But this has happened on previous versions, at least since Jul 2022, when I first installed Karabiner.

ps18ychoker commented 1 year ago

Also i have the same problem. you can have a look issue#2519. My solution is forbid my apple internal keyboard and quickly press Esc when screen lock. Yes,if you press enough fast the screen will sleep.

itu-itis22-gokalpay22 commented 1 year ago

Can confirm same behaviour on Macbook Air M2

EmmmaTech commented 1 year ago

I experience similar behavior with a MacBook Pro 16-Inch from 2019 (the Intel version, not the Apple Silicon one).

bikrrr commented 1 year ago

Since posting this issue I've switched to the Hyperkey utility, which doesn't have this problem. It doesn't have all the functionality of Karabiner Elements, but mapping a "hyperkey" is all I need.

saurabhsharan commented 1 year ago

Can confirm this also happens with a MacBook Pro M1 connected to a Studio Display. When I press Esc on the lock screen the display will sleep and then immediately wake up again. This is also extra annoying if you have an apple watch since it will then try to auto-unlock your mac with your watch when the display wakes up again.

ronaldsuwandi commented 1 year ago

Duplicate of #2880

Poitubaren commented 11 months ago

I confirmed this on my MacBook Pro 13" M1 and MacBook Pro 14" M1 Pro. When I press the Esc key on the lock screen, the display goes to sleep briefly and then immediately wakes up again. When left alone, it automatically go to sleep again with blank screen. But this is quite annoying.

I've found a solution to prevent it from waking up when I press esc. Pressing the esc key on an unmanaged keyboard is all that's needed. For instance, you can turn off unused devices on the Karabiner's Devices page and use that keyboard only when moving to the lock screen. Just in my setup, pressing the esc key on both of the two machines never resulted in waking them up

krizajb commented 9 months ago

+1