I've done both ways:
end of boil in the kettle it wont ferment so it stays sweet, or like you said, boil some in water and add at kegging time.
I wouldn't just add it dry though-you want it to dissolve into solution by boiling. Then add it to the keg first, then rack the beer into the keg-it will be mixed in well then.
-Those that know donít close the door on those that donít know (The Gourds, "Education Song")...
-The brewer's yeast ferments, and forgives, all that you did...(The Gourds, "Right in the Head")...