# Keyboard Shortcuts in paclets?

I’m trying to add simple keyboard shortcuts (together with menu item) to my paclet through FrontEndExecute which works fine in notebook, but as soon as I put it into my paclet and import it the menu item is stripped from the keyboard shortcut. Is this due to security requirements on paclets or is there perhaps a way around it? I know about KeyEventTranslations.tr but I’d rather not use it.

FrontEndExecute[FrontEndAddMenuCommands["DuplicatePreviousOutput",


• Try to replace MenuKey and Modifiers with SystemMenuKey and SystemModifiers, respectively. (Note how those two symbols are blue when you copy your code into a notebook, suggesting the kernel doesn't know about those symbols, meaning they will be created in the paclet context instead of the correct one when you execute your code from within a paclet) – Lukas Lang Jan 22 at 19:55
• It works! Thank you, that has been very quick and straight to the point! – Ranza Jan 22 at 20:09
• closely related: 102189 – Kuba Jan 23 at 9:32