I lump those together into what I call Dependency-Driven Development.
Manage and reduce dependencies first, both external dependencies and internal dependencies within code, and better code will follow.
It's not always 100%, but in general the fewer the dependencies the better the code.
I’ve done a project connecting hall effect sensors to vibration motors.
You could put a tiny vibration motor in each key cap and set different vibration intensity and timing patterns based on the hall effect readings.
You could have the intensity slowly rise as you approach an activation point, then suddenly drop off right before and at activation to mimic the resistance of a physical switch.
Something along these lines is my guess. Focus on the batteries. You can replace individual cells with explosives and cause the remaining cells to overheat to start the explosion.
Most battery packs have integrated power management chips, so you could focus on modifying the battery firmware.
You could have another component send a message to the power management controller to trigger it.
You could also use the power controller's internal current sensor and clock to watch for a device event (power draw from the screen at a certain time or the power profile for a specific set of CPU instructions), giving you means to trigger it without modifying any other part of the device.
I'll add the the flagging UX on HN is very broken, and I've seen it brought up before only to get a "won't fix".
I have two pages of links I've "flagged" while having never intentionally clicked the flag link myself.
That said, your topic doesn't sound like most people would consider on topic for HN. It shouldn't be flagged, but I'd expect it to be buried.
It's not always 100%, but in general the fewer the dependencies the better the code.