In world of Warcraft, if you are an alliance race and a member of the horde is speaking to you in area chat, the text is mangled to simulate the fact that the different factions do not understand each other’s languages. “Kek” is how “lol” showed up in the chat every time. So kek became synonymous with lol.
In the original Starcraft, the Korean version of "Hahaha" is "ㅋㅋㅋ". Owing to the fact that the English version of the game didn't support Korean text, the represented text of a Korean player saying "ㅋㅋㅋ" was "kekeke."
This became an early meme of sorts and caught on. Blizzard honored that in WoW by adding the kek/lol translation.