1 person found this helpful
You can create character styles that do only a color, and assign a shortcut to them. Style shortcuts are restricted to the Numpad keys and a modifier, so the possibilies are not endless, but you ought to be able to get enough.
Thanks, but how do I assign a shortcut to the character style I create?
Excellent, I found that, but when my cursor is in that box, I cannot input anything. I get error tones as I try key combinations.
1 person found this helpful
You can ONLY enter a number from the NUMERIC KEYPAD + Command/Ctrl, Option/Alt or Shift (or combinations thereof). If you don't have a numeric keypad, use the Quick Apply method for calling out keyboard shortcuts. (See InDesign Help.) That's what I use because I have a Mac laptop with no numeric keypad.
Yeah, I have a MacBook.
So I have to hit Command+Return, then type in "White" for example, then hit return again to get the change to happen? That's hardly a keyboard shortcut. It's easier to mouse over to the box.
Well, I feel better about asking the qustion, since it isn't possible on a MacBook.
Thanks for your time, guys.
Quick Apply is faster than that. You just need to type the first couple letters and, intelligently, it will jump to your character style.
It also helps if you UNCHECK the options that you don't want to use. Uncheck everything but the character and paragraph styles.
Then it just becomes Cmd+Return+wh+Return
I find it easier to remember than archane combinations of Cmd+Option+number.
For anyone else who has this problem - I actually found out an easy workaround.
There's another forum that addresses the NumPad issue for MacBooks (http://forums.adobe.com/thread/324960) and I did a modified version for character styles v. paragraph styles per the final comment by Kaj-Ettore.
(1) Open text edit and copy the below script (for me it was changing the text to white):
Watch the number '(1)' in brackets on the last line: This is the Style number according to the Styles listed in the 'Character Styles' Panel of InDesign (following "[None]").
Per my setup, "White" is 1 and "Black" is 2.
Decrement the style you'd like to be applied via this script from the styles listed in the InDesign-applet 'paragraph styles'.
*Note - This Workaround only works for specific Documents – since InDesign links Styles with document templates.
(2) Save the Script to:
or name the file as you like. You'll have to assign a keyboard-shortcut to this and other files later, so it is wise to choose a common and memorable syntax for naming, e. g. numbers or style-names. (I used Style(White).jsx)
(3) Repeat this step for every style you'd like to be applicable via a keyboard shortcut...
This is my "Black" script:
Saved as: Style(Black).jsx
Assign a Shortcut to the Script
(1) Open InDesign > Preferences > Keyboard Shortcuts > %YourSetOfShortcuts%
(2) Select 'Scripts'
(3) Choose the first script you've written, e. g. 'style(body).jsx'
(4) Create Shortcuts for Standard- and Text-Environment
(5) Repeat for any script you've written
This worked perfectly for me and I can now use ONE keyboard shortcut (albeit 3 simultaneous keys) to change from black text to white text.
I'm glad you have a solution! It's worth pointing out you can accomplish this with a lot less circumlocuation. You can simply use a script like:
app.selection.fillColor = "Black";
Without using Character Styles. The color must be the name of an existing swatch.
Quite possibly you find the use of character styles to be advantageous over color overrides -- if so, then you're golden (Tramauntra.fillColor = "Golden";).
Also, I would suggest that instead of using numbers, you use the names. At least in CS5. Much more reliable. That is,
I'm not sure why you have the 2nd parameter (true) there, but it's not doing any harm...
Excellent, thanks a lot. I didn't write the script, so the insight is nice to know.