I make the app PowerKey, which allows you to remap a tap of the power key to input Forward Delete or another command. Might be useful for some who find this answer. It does not modify the hold-to-shutdown behavior, however, and that is not the goal of the app.
However, there was an issue with OS X Mavericks that had people searching for a way to modify the power key tap and hold behavior. That lead binchewer
to release several tools and patches in that vein such as power_fixer
.
http://web.archive.org/web/20160202223452/http://binchewer.org/blog/index.php?id=1
https://github.com/binchewer/power_fixer
https://github.com/binchewer/power_fixer/pull/8
https://www.reddit.com/r/apple/comments/1u5v5e/mavericks_power_button_fix/ceisg91/
https://www.reddit.com/r/OSXTweaks/comments/1yguq4/request_fix_the_power_button_back_to_how_it_was/
On the reddit link, binchewer
posted a command that, at least at the time, disabled the power key completely.
I'm not sure if it will work today, especially with System Integrity Protection enabled.
WARNING: likely many side effects. Your computer will not sleep automatically when you close the lid. No way to force a restart if your computer hangs. Etc.
Investigating further. Expect to finish in a week. Small hint for those, who want to simply turn the button off:
kextunload /System/Library/Extensions/AppleACPIPlatform.kext/Contents/PlugIns/AppleACPIButtons.kext/
Will need to be run with sudo
. Please use and experiment at your own risk.