How to setup htc vive motion controller button to interact

Hi, recently, I am working on a project to use htc vive motion controller to interact with an elevator, for example, I want to use to right hand vive trigger button. Once it gets pressed, the elevator will move up, then it (or other button) get pressed again , the elevator will move down but I have tried several times, it does not work yet.