Back

If your email is not recognized and you believe it should be, please contact us.

  • You must be logged in to reply to this topic.Login

Keyboard Shortcut to for "edit text of selected frame"?

Return to Member Forum

  • Author
    Posts
    • #74854
      Jack Brannen
      Member

      I’m trying to find a keyboard shortcut that can jump me into the text of a frame when I have the frame selected.

      I know there is a way to do this with table cells (ESC key) or with frames that contain graphics (Object menu > Select > Content). But I can’t find any way to do it with frames that contain text.

    • #74855
      David Blatner
      Keymaster

      Great question. I don’t know of a KBSC that will do that. But you can always double-click (with the Selection tool).

    • #14324138

      Do we have any update on this topic, I have been searching for this, months.

    • #14324137
      David Blatner
      Keymaster

      Nope. Shift-Esc is “Select Content” but it doesn’t work with text frames (just groups or image frames).
      Probably best bet would be to get a script (I bet it’s relatively simple) and then assign a shortcut to the script.

    • #14324136

      Thanks a lot, David for reply so quickly, that sound amazing but I have not explored the wonders of using scripts, it’s in my bucket list.

    • #14324135

      It indeed isn’t too difficult. For your consideration, two scenarios:

      1. To only put the text cursor at the very start of the text in a selected text frame:

      try {
      	app.selection[0].texts[0].insertionPoints[0].select();
      } catch (_)
      {
      	/* beep beep */
      }

      2. To select all of the text in the frame:

      try {
      	app.selection[0].texts[0].select();
      } catch (_)
      {
      	/* beep beep */
      }

      In both these scripts it is blindly assumed there is a selection, and it has at least one item (if you select multiple objects it will probably work at random, depending on what order you selected in!), and it contains some text. Now usually, for a more robust script, you would add some checking for each and every item that can possibly go wrong. It takes a lot of checking, not only because there are tons of different things to click on, but, surprisingly, users can also get incredibly creative at how to indicate what they want to do – click frame, click in frame, multiple selections, linked captions, not-a-textframe-at-all, et cetera.

      But it’s a simple function to use, and you would not be surprised if you accidentally try it on an embedded image and nothing happens. (Rather than, say, an alert popping up stating that you cannot edit the text in that image, or – worse – an aggressive “boing” sound and a scary error message from ExtendScript with lots of technical details.

      So here I wrapped the magic single line into a “try .. catch” sequence. This will bluntly run the script inside the “try” part and if something – *anything* – goes wrong, it will silently continue with the code in the “catch” part. Which … does nothing! There is just a comment there. So if nothing happens, it just means “yeah this ain’t gonna work and you probably should not have tried this”.

      Pick one of these scripts (or both), save under a useful filename in your Scripts Panel, and make sure to assign a Keyboard Shortcut Key to it for maximum efficiency.

      … Surprise! I assigned “Escape” with a context of “Default”, and lo! “Escape” toggles between having the text frame selected and having the text *in* it selected! I think that’s a keeper.

    • #14324134
      David Blatner
      Keymaster

      Jongware, this is GREAT! Thank you for jumping in on this. I just tried it, and I love it. I assigned Ctrl-Esc on the Mac.

      @Marcos: Here’s how to install it:
      https://indesignsecrets.com/how-to-install-a-script-in-indesign-that-you-found-in-a-forum-or-blog-post.php
      and how to apply a shortcut:
      https://indesignsecrets.com/assigning-keyboard-shortcuts-scripts.php

    • #14324132

      Thanks so much guys, is already installed, this will help me a lot.

    • #14331311
      Jack Brannen
      Member

      Wow, this is amazing! Who knew that a wish I asked for in 2015 would get granted in 2019! Theunis De Jong, thank you!

    • #14331312
      Lukáš Záleský
      Participant

      Thanks!

    • #14334997
      payam baharan
      Participant

      hello

      This was very helpful!

      May I ask you to guide me on how to put the text cursor at the very ent of the text in a selected text frame?

      Thanks!

Viewing 10 reply threads
  • The forum ‘General InDesign Topics (CLOSED)’ is closed to new topics and replies.
Forum Ads