Palmitoyltransferase that catalyzes the addition of palmitate onto various protein substrates and is involved in a variety of cellular processes (PubMed:19596852, PubMed:21343290, PubMed:25589740). Has no stringent fatty acid selectivity and in addition to palmitate can also transfer onto target proteins myristate from tetradecanoyl-CoA and stearate from octadecanoyl-CoA (By similarity). In the nervous system, plays a role in long term synaptic potentiation by palmitoylating AKAP5 through which it regulates protein trafficking from the dendritic recycling endosomes to the plasma membrane and controls both structural and functional plasticity at excitatory synapses (PubMed:25589740). In dendrites, mediates the palmitoylation of DLG4 when synaptic activity decreases and induces synaptic clustering of DLG4 and associated AMPA-type glutamate receptors (PubMed:19596852). Also mediates the de novo and turnover palmitoylation of RGS7BP, a shuttle for Gi/o-specific GTPase-activating proteins/GAPs, promoting its localization to the plasma membrane in response to the activation of G protein-coupled receptors. Through the localization of these GTPase-activating proteins/GAPs, it also probably plays a role in G protein-coupled receptors signaling in neurons (PubMed:21343290). Also probably plays a role in cell adhesion by palmitoylating CD9 and CD151 to regulate their expression and function. Palmitoylates the endoplasmic reticulum protein CKAP4 and regulates its localization to the plasma membrane. Could also palmitoylate LCK and regulate its localization to the plasma membrane (By similarity). hexadecanoyl-CoA + L-cysteinyl-[protein] = CoA + S-hexadecanoyl-L-cysteinyl-[protein] L-cysteinyl-[protein] + tetradecanoyl-CoA = CoA + S-tetradecanoyl-L-cysteinyl-[protein] L-cysteinyl-[protein] + octadecanoyl-CoA = CoA + S-octadecanoyl-L-cysteinyl-[protein] Monomer. Homodimer. The monomeric form has a higher catalytic activity. Translocates to postsynaptic density when synaptic activity decreases. The DHHC domain is required for palmitoyltransferase activity. Autopalmitoylated. Belongs to the DHHC palmitoyltransferase family.