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

How to assign shortcut to Cursor Key Increments

Return to Member Forum

  • Author
    Posts
    • #58531
      Pure Alpha
      Member

      In short, I need to alter the Cursor Key Increments up to 5-6 per minute when I am layouting magazines (that's how I work).

      I would very much like to be able to find a one-click way to reach Preferences > Units & Incerements > Keyboard Increments > Cursor Key. A short-cut will take me to Units & Incremnts, but as I cannot assign a short-cut to the Cursor Key, I still have to hit Tab five times.

      How can I solve this?

      Thanks :-)

    • #58533

      What an odd way to work :) Is that to move objects around very precisely? If I need that, I type the value right into the Control Panel position fields.

      The default Nudges include these ones:

      Nudge right — Default: Right Arrow
      Nudge right 1/10 — Default: Shift+Ctrl+Right Arrow
      Nudge right 1/10 duplicate — Default: Shift+Ctrl+Alt+Right Arrow
      Nudge right duplicate — Default: Alt+Right Arrow
      Nudge right x10 — Default: Shift+Right Arrow
      Nudge right x10 duplicate — Default: Shift+Alt+Right Arrow

      so by default you can use your standard increment, as well as 1/10th and x10 of its value — if you enter “10mm” as the default nudge, you can move around in 1 mm steps as well as 10 cm (that last one might be a bit too much).

      Here is a small script to change the values to some preset, but you need a different script for each of your values and (probably) assign a shortcut key to each of the scripts as well (since you're obviously a Keyboard Jockey, as I am!).

      This simple one-line Javascript sets the increment to whatever you fancy:

      app.activeDocument.viewPreferences.cursorKeyIncrement = “0.5mm”;

    • #58534

      Oh whatever, I'm bored — here is a longer script with a fancy dropdown list. You can populate the list with your favourite values, and assign a keyboard shortcut to this script to have all of them at the tips of your fingers.

      (It's a Javascript; copy, paste into Adobe's ESTK Editor, and save as “NudgeNudge.jsx” into your User Scripts folder.)

      //DESCRIPTION:Set Cursor Nudge Value
      // A Jongware Script 28-Jan-2011

      var yourList = [“0.01”, “0.1”, “0.25”, “0.5”, “1”, “2”, “5”, 10];
      var val = app.activeDocument.viewPreferences.cursorKeyIncrement;
      var aDialog = app.dialogs.add({name:”Nudge Nudge (Wink Wink)”, canCancel:true});
      with (aDialog)
      {
      with(dialogColumns.add())
      {
      with(dialogRows.add())
      {
      staticTexts.add({staticLabel:”&Nudge”, minWidth:80});
      var setWidth = realComboboxes.add({editValue:val, minWidth:100, largeNudge:10, smallNudge:1, minimumValue:0.01,maximumValue:100, stringList:yourList});
      }
      }
      }

      if (aDialog.show() == true)
      app.activeDocument.viewPreferences.cursorKeyIncrement = setWidth.editValue;

    • #58535
      Pure Alpha
      Member

      Thanks for this, I'll have to check it out when I get home from work …

      As for my need to alter the increments every instant … well, if you layout, say, an annual report with all kind of balance sheets and notes to balance sheets with different grids … I use the cursor key a lot …. more about this, if you are interested.

      But again, thanks for your script (I had a notion that a script would be necassary, only – I haven't worked with script so far) …

    • #58536
      Pure Alpha
      Member

      Just had another look at your answer … A drop-down menu would save me a huge amount of time … Thanks a million – will check it out tonight.

    • #58537
      Pure Alpha
      Member

      Just had another look at your answer … A drop-down menu would save me a huge amount of time … Thanks a million – will check it out tonight.

    • #58545

      Just a comment from an interested forum reader: Jongware = awesome.

    • #58552
      Pure Alpha
      Member

      @Jongware Thanks again for making the script for me!

      1

      I downloaded the ESTK software

      2

      I made the nudgenudge.jsx file

      3

      Now I can't locate the 'User Scripts' folder to save it in (no, I am not a computer expert) … could you help me? I am on a Windows computer … I have been looking here: C:Program Files (x86)AdobeAdobe InDesign CS4ScriptsScripts PanelSamplesJavaScript … and have tried to place the .jsx file here – then go to InDesign and see if the NudgeNudge script showed up in the Scripts window … but no! (Hmm, should i have rebooted first?) Anyway, do you know where to save it on the computer, and – next – how to access it in InDesign. Thanks again :-)

    • #58554

      Locating the proper folder is extremely easy, using the following trick:

      Start your InDesign, and make sure the Scripts panel is visible.

      Right-click the “User” folder; the friendly pop-up offers you the choice of one item only: “Reveal in Explorer” (Windows; Mac users will see “Reveal in Finder”).

      Windows will open an Explorer Window, with (most likely) just one folder inside it: “Scripts Panel”. Double-click that to open, and that's where the script ought to go.

      When saved in the proper place, it will immediately appear in the Scripts Panel — no re-start required!

    • #58559
      Pure Alpha
      Member

      Everything is up and running.

      Fantastic … this is going to save a LOT of time …

      Thanks a million … I'll buy you a beer next time you visit Denmark!

    • #103667

      Jongware, as always comes up with a beutiful solution!

      I know this thread is old, but i’ll mention it here anyway: I am looking for the same solution, but for chanining increments for kerning faster. I often go through magazines with large headers, copy, and smaller text. Sometimes I need to swap bettween like 20, 10, 5 and 1 a lot. Any ideas?

      Thanks if anyone is still watching this thread :)

    • #103668

      Ah Richard, you’re in luck! You basically only have to change “cursorKeyIncrement” to “kerningKeyIncrement”. The Kerning Key Incement value is not in ViewPreferences, but in TextPreferences. Other than that, it looks pretty much the same:

      app.activeDocument.textPreferences.kerningKeyIncrement = setWidth.editValue;

      A few notes, though: when copying the above script, I noticed double quotes were translated to curly “smart” quotes, and scripts do not like these at all. Also, the last value in yourList is missing its quotes altogether – it will throw an error, because the dropdown list expects only text strings. Finally, Nudge values allow fractions (0.01 is fine) but Kerning accepts whole numbers only. So, you need to populate yourList with a range of acceptable values. And finally finally, you must replace the dialog title with a bad pun based on kerning, not nudging:

      //DESCRIPTION:Set Kern Nudge Value
      // A Jongware Script 11-May-2018
      var yourList = ["1", "2", "5", "10", "20", "50"];
      var val = app.activeDocument.textPreferences.kerningKeyIncrement;
      var aDialog = app.dialogs.add({name:"Kern you feel it", canCancel:true});
      with (aDialog)
      {
        with(dialogColumns.add())
        {
          with(dialogRows.add())
          {
            staticTexts.add({staticLabel:"&Kern", minWidth:80});
            var setWidth = integerComboboxes.add({editValue:val, minWidth:100, largeNudge:10, smallNudge:1, minimumValue:1,maximumValue:100, stringList:yourList});
          }
        }
      }
      if (aDialog.show() == true)
          app.activeDocument.textPreferences.kerningKeyIncrement = setWidth.editValue;
      

      Some other changes in the dialog itself: as Kerning only supports whole numbers, no need to ask for a “real” (fractional) number, “integers” (whole numbers only) are fine. The minimum and maximum allowed Kern Step values are 1–100, so best not to allow anything outside that range.

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