# How can I add arbitrary code into DefaultKeyTranslations.tr?

The solution to this question on how to get latex code for a text cell (which Mathematica doesn't do correctly) was formulated as a palette but I need it as a keyboard shortcut.

How can I add an item to DefaultKeytranslations.tr that executes this solution's code? And in general, how does one construct a key command that executes arbitrary code, not just front-end packets and tokens?

-
Did you see this mathematica.stackexchange.com/a/13992/29 ? Should work similarly for DefaultKeyTranslations.tr –  Rolf Mertig Nov 30 '12 at 14:30

Think I figured it out: you can't use special characters like _ or ~~ in DefaultKeyTranslations.tr, everything has to be full-form.

    Item[KeyEvent["y", Modifiers -> {Control}],
FrontEndExecute @ Module[{nb, t},
nb = NotebookCreate[Visible -> False];