The photoelectric shaft encoder is a sensor to measure angles based on a code disc or a metrological grating disc. Recently, to meet the requirements of miniaturization, intelligence, integration of the photoelectric shaft encoders, a lot of research work are developed to reduce the sizes of photoelectric shaft encoders in many countries, especially in research on the coding modes. In this paper, the coding modes and coding theory are introduced. Then, based on explaining the coding modes in detail, the restricted factors of miniaturizing photoelectric shaft encoders are analyzed. The results indicate that effect factors on coding modes are the sizes of luminescent and receive elements. Finally, it discusses the developing trend of the coding modes of photoelectric shaft encoders and suggests that the variety of coding modes and miniaturization of code lines will be conductive to minimize the sizes of encoders and speed up the development of photoelectric shaft encoders.