If you mean typing onto the HUD like a textbox, then you'd have to mod the source for that.
If you want to simply capture keyboard strokes, you use "scancodekeypressed" condition.
To keep the player from shooting when they click, you can either use the "plrfreeze" action from the official update or a couple Mods have their own actions to deal with such things.
The one and only,
Those who live in the past, are destined to insanity. Those who live only for the future, will be slaves to their ambitions.
Those who live in the moment... only they, are truly happy.