Message Boards Message Boards

0
|
7336 Views
|
2 Replies
|
3 Total Likes
View groups...
Share
Share this post:

How to create custom keyboard shortcuts?

Posted 10 years ago

Hello, I'd like to create a keyboard shortcut the executes the FrontEndToken "MoveNextCell". I realize that "MoveNextCell" is not fully integrated.

However, this works: FrontEndTokenExecute["MoveNextCell"] just as this does SelectionMove[EvaluationNotebook[], Next, Cell].

Modifying this Item[KeyEvent["Right", Modifiers -> {Shift}], "SelectNext"] to Item[KeyEvent["Right", Modifiers -> {Shift}], "MoveNextCell"] in SystemFiles/FrontEnd/TextResources/Macintosh/KeyEventTranslations.tr (Mac) doesn't work as expected (after restarting the FrontEnd).

Any ideas? Thanks, Craig

POSTED BY: W. Craig Carter
2 Replies

Thanks Szabolcs, Yes, I restarted a second time just to be sure (thanks, asking the obvious is the best first step for me....).

The only other files that directory were in the SystemMenuSetup.tr~ left over from the vi-editor.

I removed those and now it works!

Thanks,

POSTED BY: W. Craig Carter

I just tested this with M10.0.1 on OS X and it works.

Some possibilities of why it didn't work for you:

  • Did you restart Mathematica? (Sorry about asking the obvious :) Sorry, I didn't read carefully.

  • Did you create any other files in that directory? I might be wrong about this, but I think that the first time I modified KeyEventTranslations.tr, I created a backup of that file in the same directory, also with the extension .tr, and this prevented things from working correctly. Just in case: make sure you place any backups outside of Mathematica's installation directory.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract