Added directive to handle keys on tasks