We propose the 1-D Two-Distinct codes with two-code keying (TCK) using two mutually orthogonal states of polarizations (SOPs) in spectral components as a new code family for spectral amplitude coding (SAC) in optical code division multiple access (OCDMA) networks. Our proposed structure of the proposed codes operates the 1-D Two-Distinct codes with TCK using two mutually orthogonal SOPs in spectral components to achieve the simple architecture. The modified cross-correlation within the 1-D Two-Distinct codes with TCK facilitates the transition from one code keying (OCK) to the generation of TCK. We design the 1-D Two-Distinct codes with TCK to eliminate the multiple user interferences (MUIs) caused by other simultaneous users through modified cross-correlation, thereby improving code operation. Although the recovered bits are affected by the phase-induced intensity noise (PIIN), our proposed system can suppress the PIIN. Numerical results show that our proposed system supports up to a number of simultaneous users of 45 and provides higher data transmission rates of 2.5 Gbps compared to the other systems using 1-D SP codes with TCK, 1-D BIBD codes, and 1-D BDS codes with TCK.INDEX TERMS cross-correlation, multiuser interference, one code keying, optical code division multiple access, and two code keying.