Add generic key handler helper.