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