Software lockscreen button can help you get rid of worrying about your physical
button's life. Floating button can keep you in your working app and don't need
to go back to home screen in order to lock your screen.
Long-clicking would send your custom Broadcast/Intent.