How could I make something similar to shiftlock?

Take a look at this maybe?