Component of heterochromatin that recognizes and binds histone H3 tails methylated at 'Lys-9' (H3K9me), leading to epigenetic repression (PubMed:40440427). In contrast, it is excluded from chromatin when 'Tyr-41' of histone H3 is phosphorylated (H3Y41ph) (PubMed:19783980). Also recognizes and binds histone H1.4 methylated at 'Lys-26' (H1.4K26me) (PubMed:16127177). Excluded from chromatin when histone H1.4 is Simultaneously methylated at Lys-26 (H1.4K26me) and phosphorylated at Ser-27 (H1.4S27Ph) (PubMed:16127177). May contribute to the association of heterochromatin with the inner nuclear membrane by interactions with the lamin-B receptor (LBR) (PubMed:19783980). Involved in the formation of kinetochore through interaction with the MIS12 complex subunit NSL1 (PubMed:19783980, PubMed:20231385). Required for the formation of the inner centromere (PubMed:20231385). {ECO:0000269|PubMed:16127177, ECO:0000269|PubMed:19783980, ECO:0000269|PubMed:20231385, ECO:0000269|PubMed:40440427}. This is the function of Ensembl gene identifier ENSG00000094916 (CBX5, chromobox 5).