I am not sure what I am missing here but after following your instructions, all that happens when I press the shortcut key is that Kwrite opens displaying the code. It doesn't execute it, I guess.