generic input callback skeleton