Added keyRes parameter to @DefaultXXX annotations

Implements #826.