I've seen this option in one Ubuntu machine and I want to replicate it in my mac:

Hold a Key for 2 second to activate it.

What I have seen is this:
Hold down a Key for 2 second (SHIFT for example).
Then write something and the write was as the SHIFT key is pressed (and it acts like the Caps Lock pressed).
Press the key one time for deactivate it.

Is it possible to achive this on a mac too?