Jump to content

Photo

Is there a way to confirm shut down?

keyboard power shutdown keybinding

  • Please log in to reply
4 replies to this topic

#1 Reuben

Reuben

    Member

  • Members
  • 37 posts
  • LocationChicago, IL (USA)

Posted 19 December 2016 - 06:55 PM

The current behavior is that when I press the power button on my keyboard, my unit instantly powers down.

 

The desired behavior is that when I press the power button (unless, I suppose, there were a way to distinguish between a short press and long-hold-and-press), I would be prompted with a confirmation script, even one as simple as "Are you sure?"

 

I've been meaning to post about this, but I haven't remembered to bring it up the aftermath when I've accidentally pressed the power button in the past. I'm just grateful it hasn't happened to me lately. *fingers crossed*

 

I guess depending on the user this is either a common courtesy or an obtrusive script. But it feels almost as elemental, if not more so, than being able to turn off a car while it's in drive—should it really be so easy?

 

Like most Chromebook keyboards, the power button on my ACER C740-C4PE is directly above the <backspace> key. As a result, I have become increasingly cautious in my keystrokes since installing Bodhi. "Save early, save often" has become almost a mantra when I'm typing. However, this is one of those occasions that I actually I would like to be able to rely on my operating system to help protect me from myself.





A big thank you to everyone who contributes to Bodhi Linux


#2 gogolink

gogolink

    Member

  • Members
  • 78 posts

Posted 20 December 2016 - 02:31 AM

I circumvented the problem on my previous 3.2 installation (on an Acer C720 Chromebook) by installing xfce4-power-manger and have it autostart (while deleting the ACPI-binding for the power button); that power manager gives you the option to have it do just what you want it to do.  (So when I accidentally hit power button, it would ask whether I wanted to shut down, restart, or have the machine hybernate.)

 

The downside was that the the installation pulled quite a bit of xfce stuff along.  It didn't really do anything bad, but just felt messy.  That's why I haven't installed xfce4-power-manager in Bodhi 4.0.  I have somehow become used to not hitting the power button.  I do miss a forward-delete button, though...



#3 Jeff

Jeff

    Lead Developer

  • Developer
  • 12493 posts
  • LocationBloomington, IL

Posted 20 December 2016 - 03:56 AM

If you open the "ACPI Bindings" dialog it should have the option for what the power button is doing.



#4 Reuben

Reuben

    Member

  • Members
  • 37 posts
  • LocationChicago, IL (USA)

Posted 22 December 2016 - 04:34 PM

Thanks @Jeff, I set the Power Button to System Controls in Settings > Input > ACPI Bindings. However, the unit still shuts down instantaneously. None of the other options—that is Log Out, Power Off Now, Power Off [default], Reboot, Suspend Now, Suspend, Hibernate Now, Hibernate—seems like what I wanted either.

 

I've been known to mistake easier instructions, but I'm pretty sure that I didn't mistake yours this time.

After setting/reseting and testing several times with a mixture of "OK/Apply/Close" sequences in the Settings Panel, there was one instance when a "Yes/No" dialogue appeared, but that was as the system was shutting down and switched to the splash screen—I was powerless to stop it. I experienced similar results when I tried changing the setting to Suspend instead. What kind of behavior should I expect? I'm not sure if it's a mapping issue, a timing issue, a kernel issue, a user issue . . . ? Is there a setting somewhere for delay too? Is there a log of some kind somewhere I could read/share for insight?

PS, @gogolink, I'm not fond of the xfce option. I avoid pressing the power button too, but I also know I'm human. The delete button is one reason I acquired a USB keyboard (so is the lack of a power button on said keyboard), but my Chromebook and it are not always in the same place.



#5 Jeff

Jeff

    Lead Developer

  • Developer
  • 12493 posts
  • LocationBloomington, IL

Posted 23 December 2016 - 04:46 AM

Check into the systemd / logind settings. I recall these over riding Moksha's settings in the past. A quick google search should tell you were to find them - don't recall which files they are buried in off hand.







Also tagged with one or more of these keywords: keyboard, power, shutdown, keybinding

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users