How to type option-] on a French keyboard (AZERTY)

I need to type option-] on a French keyboard (AZERTY). But to type the closing bracket ] you must type shift-option-). Thus it is impossible to type “option shift-option-)”, and I’m wondering if there’s a way to use Keyboard Maestro to do this.

Thanks for any help.

It depends a lot on the target application. Keyboard Maestro can simulate keypresses, but the results are interpreted by the system through the keyboard layout.

What are you trying to accomplish by typing option-]? Can that be done some other way?

The target application is Photoshop (latest version: CC 2014). Many shortcuts can be edited in the Keyboard Shortcuts dialog but some can’t. Among those, the ones that use the square bracket character don’t work at all on a French keyboard and can’t be remapped. They are linked to the character itself and not to the hardware key. The key where the “]” character is on an American QWERTY keyboard types a “$” on a French keyboard, and the “[” types a “dead” key for the “^”, the circumflex accent. Typing option-$ does nothing. And actually, when you type option-[ you’re really typing a “ and option-] is a ‘. Trying that by typing “ or ‘ on a French keyboard does nothing.

I’ve seen a number of people asking how to get around this in other forums and have never seen a workable answer.

Of course, the action can be done with the mouse, but the whole point here is in not using the mouse whenever possible. The commands are “Select Next Layer Up” and “Select Next Layer Down”. Meaning you have to move your hand to the mouse or other input device, hide the current layer by clicking on the active eyeball, select the next layer, click on its eyeball. Three precise moves instead of one keyboard action.

Not simple…


I’m afraid Keyboard Maestro can generally only accomplish what you can accomplish. If there is no sequence of keystrokes, then there isn’t any way for Keyboard Maestro to do it.

As an extreme hack, you could try a macro that changed the keyboard layout, performed the action, and then changed the keyboard layout back (after some period of time). However that is likely to be disruptive and/or fragile. The only way I know of switching the keyboard layout is via the UI scripting the system preferences or the keyboard layout status menu. The later would be relatively straight forward in Keyboard Maestro using the click on found image action.

I had already managed “an extreme hack” but was hoping to find something more elegant.

In System prefs/Keyboard/Shortcuts I activated control-option-command-i as a shortcut for “Select next source in Input menu”. Then, in Keyboard Maestro, I made an action that types this shortcut, which switches the keyboard layout, pauses for 0.3 seconds, types option-], pauses 0.3 seconds, types the switch keyboard shortcut again (actually twice because I have three keyboard layouts). I assigned a hotkey to this mess and it works.

I really felt this was something I wouldn’t want to show anyone :slight_smile: but it does get the job done. If there is a better way, I’d be glad to use it.

What is “the click on found image action”? I can’t find it.



The Mouse Click action can click relative to an image found on the screen - very useful for dealing with some otherwise intractable problems.