Phones
From ShawnReevesWiki
Sonim XP phones
I was annoyed at how whenever I accidentally pressed the yellow side button, the TDC app would start. I learned from a discussion at T-Mobile support site, https://www.t-mobile.com/community/discussions/devices-orders/sonim-xp3plus-issues-apps-how-to-stop-direct-connect-asking-me-to-activate/132775 , that I could assign the yellow button to any app, so I assigned it to Calculator, and now it opens Calculator if phone is open and does nothing if phone is closed.
Options > System settings > System > Programmable Keys > Select PTT Key app