Many aspects of neural physiology, including processes that underlie learning (e.g. neurotransmitter release and long-lasting changes in synaptic strength), are regulated by brief and local changes in [μm] levels of free intracellular Ca2+. On this scale, changes in [Ca2+] are known to activate many Ca2+-sensors, including the Ca2+/calmodulin-dependent kinases (CaMKs). Although CaMK4 is known to function in long-term memory and its paralog, CaMK1, in nervous system development, there is no evidence indicating that they function in learning acquisition. Here we reveal that the Caenorhabditis elegans ortholog of CaMK1/4, CMK-1, regulates responses to mechanical stimuli and learning, specifically habituation, a conserved form of non-associative learning. The habituation phenotypes of cmk-1 mutants are sensitive to interstimulus interval (ISI), such that cmk-1 mediates habituation rate at short ISIs and habituation level at long ISIs. This is the first in vivo evidence that CaMK1/4 functions to modulate learning acquisition in awake, behaving animals and provides direct evidence to support the hypothesis that different mechanisms mediate habituation learning at different ISIs. From catalytic site analysis of the human and C. elegans CaMKs, we predicted potential CaMK phosphorylation targets and, through mutation studies, identified one of these, O-linked N-acetylglucosamine (O-GlcNAc) transferase, OGT-1, as also being necessary for wild-type responses to mechanical stimuli and learning. Detailed behavioral analysis of single and double mutants suggests that CMK-1 and OGT-1 function in parallel pathways that may converge on a common substrate to modulate the tap response. Our results provide the first evidence of a role for CaMK and O-GlcNAc post-translational modification in responding to mechanical stimuli and learning, which are fundamental biological processes present in all animals.