Making use of buttons


I am trying to create a user interface for a client side of a socket
programming structure.I created those terminal using ruby ncurses and
it is working too.but problem is to create a button in that terminal
for making the transfer of data to be apossible one.
If anyone has some ideas plz reply me.bye.