Key event handlers and scalars.