Можно ли настроить кнопку питания как комбинированную?

1286
Ooker

В Mac возможны комбинации кнопки питания (Shift + Power или двойное нажатие для перезагрузки), как будто это обычная кнопка на клавиатуре. Он также может быть настроен в Windows 8.1 и Linux, но только для одного нажатия. Можно ли иметь больше комбинаций с этой кнопкой? Может быть, будет работать твик в BIOS или установка стороннего софта?

1
Нет. Контроллер клавиатуры и источник питания работают раздельно, поэтому блок питания не распознает никаких клавиш, включая клавишу Shift. phuclv 9 лет назад 2

1 ответ на вопрос

4
phuclv

Everything is done differently on a Mac. The power button is a normal button which generates some scancodes. Even the Fn button is normal on a Mac, whereas its not visible to the OS on a PC, which is why you often have no way to remap the Fn button except swapping it with Ctrl. In PCs the power button connects with the power supply instead.

So you can set the power button to sleep, and run a command to restart on sleep event, or capture the power button directly and restart.

But if you just want to force a hard reset then it's much simpler to hold down power button for a few seconds to force shutdown, then start it again.

It's a bit easier if you want to start the PC, since most desktop BIOSes allow you to wake up or start the computer from off state by pressing a key or key combination on the mouse/keyboard, probably because in many situations the CPU case is put in somewhere not reachable by the user. But I've never seen a laptop with that feature, and no laptop BIOS allows you to press both a key on keyboard and power key too, since you always have easy access to the laptop's power button.