I know that default Lua library does not provide such functionality.
But I do remember BrunoRZ ( currently never online for recent 2 years ) made script that firing projectiles by pressing key F6 or F7 and other effects by pressing numbers in keyboard ( e.g : 0 ~ 9 )
Actually I thought it's possible to make functions by pressing numbers in cs2d with cs2d hook - parse and cs2d command - slot0 ~ slot9.
However parse can not handle client's parsing but only server.
So I want know if anyone knows the Lua library related in such things exist or other ways to work.