Both should work, it’s just a static text conversion of the final expression (string).
Reason of it not working might be the method - special keys [k(keycode)] don’t work with SimulateType method.
By the way - if you’ll need to type the actual [ character with either default or WIndowMessages method, you’ll need to escape it (use [[, similar to slash escaping in C#), otherwise it will cut the string on this character.
PS. The double bracket escaping ( [[ ) is only needed if you don’t want to use a special key, like enter or tab, but want the robot to type the actual bracket [ character in the text.