Not really anymore nowadays. The Apple Extended Keyboard[0] did have that feature. Similarly, Cherry used to produce a lock variant of their MX switches[1] that could be used for a such purpose. However this switch really only ever saw use in industrial applications.