There are lots of using form of -ki and it is hard to sort them even for Turk.
For example -ki can be used as a suffix (like your 1st, 2nd, 3rd and 4th example) and -ki is a suffix it is not written apart.
2nd usage of ki is as a conjuction. (like your 5th example) if -ki is a conjuction it is written apart from previous word.
Good luck in your studies! :)