refactor(Key): extract KeyRegistry to remove the need for `Key.clear`