I can't say how to use the G19 keyboard. But you type in this command in the chat box, same as you would talk to your teeammates. Replace the <key> with the key you actually want bound. You only need to do this once, STO will remember it next time you login.
For example, I rebound Z, X, C, and V. (This overwrites the Scan, which can be rebound using the Option: Key Binding dialog). To do this, I typed the following into the chat window:
/bind z genbuttonclick powerlevel_preset_0
/bind x genbuttonclick powerlevel_preset_1
/bind c genbuttonclick powerlevel_preset_2
/bind v genbuttonclick powerlevel_preset_3