Update client generator to trigger middleware and modal for keys

This PR closes #138.