Key switch locks