I got tired of shutting down the machine manually, so I made this:
Install this package, stick two pieces of foam to your Reform’s bezel, and voila: your MNT Reform will shut down when you close the lid like the big boys
I got tired of shutting down the machine manually, so I made this:
Install this package, stick two pieces of foam to your Reform’s bezel, and voila: your MNT Reform will shut down when you close the lid like the big boys
Funny that you also chose to press F1 and F12 because those are the keys which @invictvs also chose in their very similar solution: Sleep reform automatically while closing the screen I guess that this is the idea of multiple discovery in action. @grimmware also has a solution but for the Pocket Reform: put an accelerometer in the bottom and the top and if both accel sensors are facing the same way, then that must mean that the top and bottom parts are closed.
Haha, I wasn’t aware of that one Great minds think alike I guess.
But the choice kind of imposes itself: they’re the only keys that generate scancodes that are more or less lined up with the hinges. It doesn’t really matter that the foam pads are above the hinges, but it somehow seems better visually. Also, F1-F12 are the function keys farthest apart, to avoid accidental shutdowns.
One thing I didn’t want to do is configure the key combo in Sway though, because I want the laptop to shutdown when I’m not logged in also, or when I’m in the Linux terminal. That’s why I made the little systemd unit script.
That is genius. I love it.
Would holding down those keys prevent the keyboard microcontroller from going to sleep and waste power?
Honestly, it might be possible to reprogram the keyboard to send the lid switch SW_LID message and handle all of that in hardware so that configuring it on the Linux side of things is no different than any other laptop.
Let’s hope not I’ll know soon enough.
I guess @invictvs knows by now though, since they came up with the idea.
If it does, I’ll just solder a reed switch in there somewhere.
I have some totally untested code for the LPC kernel module and the sysctl firmware that I’m waiting to rebase on top of the latest SPI changes which will hopefully allow forwarding of i2c over SPI so that i2c devices can be generically used without having to maintain firmware forks, but it’s not top of my list of projects right now. If the big reform has i2c exposed from the sysctl then we might be able to port the solution across.
One note is that I wasn’t able to fit the accelerometers in the same orientation so it took me a hot minute to try to figure out the transformation I needed to do for correct detection heh.
My only issue with this solution is that you are constantly pressing those keys whenever the screen is closed.
A hall sensor installed near the front edge of the Reform keyboard deck would allow the magnets in the top edge of the screen to close a circuit that the KB controller could be programmed to issue a key combo similar to this without having to depress the keys constantly. HECK, you could probably get it to automatically issue the suspend resume command or power on as well assuming you are still powering the system as you would during suspend.
Not quite: the foam I use is PORON: when compressed for some time, it conforms to the shape of whatever is compressing it. I use that stuff to make optical couplers for equipment that doesn’t really like to have any kind of mechanical force applied to it.
The foam will deform and release the keys eventually.
But ultimately it doesn’t matter: even if it damages the switch, meh… replace the switch and do something better I highly doubt it will do that thought.
This is great, thanks!
I may actually just use it manually for starters. As you said, the key combination seems unlikely to occur by chance.
Yeah, the primary use is manual. Hit the keys, shutdown, regardless of which environment you happen to be in. That’s the main use case. The bits of foam are just a nice add