"You only have to press that button."
Translation:Je hoeft alleen maar op dat knopje te drukken.
"Moet" is fine, but you missed a preposition.
"Je moet alleen maar op die knop drukken" or "Je moet alleen maar die knop indrukken"
No, that doesn't work. "Moeten" is not followed by "te". Also, the preposition "op" must come before the noun it refers to ("dat knopje"). See xMerrie's answer above.
Why is hoeft used is in this sentence? I thought it was only used in negative sentences, and there is no niet, niemand, nooit, etc here.
That's an interesting point! "Hoeven" usually indicates a lack of obligation, so it's almost always used with a negation (niet or geen).
In this case "je hoeft alleen maar..." can be interpreted as: You don't have to do anything but ....
So it's still a lack of obligation, even though there's no explicit negation. In this case, it can be replaced by "moeten" without a significant change in meaning. Another example with such an implicit negation is:
- We hoeven pas om 10 uur thuis te zijn. - We only have to be home at 10 = We don't have to be home before 10.