Save the key’s current binding
Choose a free key, such as F6. Enter bind F6 in the console and note the result. If it performs an action you need, use another key in the examples.
Assign the purchase
For a smoke grenade, enter bind "F6" "buy smokegrenade". For a flashbang, use buy flashbang instead. In practice, enter the buy zone at the start of a round, check that you have enough money and press the key.
Check why a purchase fails
If the item does not appear, check buy time, money and grenades already held. If the old action returns after a restart, look for another binding in your CFG. Restore the saved command to roll back, or enter unbind F6 if the key used to be free.