Text fields in KM macros use smart quotes?

It seems that KM text fields use smart quotes when straight quotes are typed. I can't imagine where on my system that would be determined or how to change this.

KM fields should user dumb quotes — if the user wants smart quotes they could always enter those directly with⌥[, ⌥{ and ⌥], ⌥}.

Am I deluded here? Doing something to cause the smart quotes?

1 Like

I agree - I keep forgetting to mention it. This is especially bad when writing shell scripts, where the wrong kind of quotes can cause problems that are hard to detect.

Hey Mitchell,

It's OSX NOT Keyboard Maestro.

Scope out your “Text” panel in the “Keyboard” system prefs.

Look at both this setting:

And the replace settings.

-Chris

1 Like

Aha! Thanks. It didn’t make sense to me that KM would do this. I don’t recognize those options. Do they default to smart quotes or did I do something I don’t remember?

Maybe this post will help other people sort out their own confusion about this.

What is really a (probably unsolvable problem) is that any macro that pastes or types text that includes quotes ought to – right? – type the quotes according to the user’s settings you showed.

Automatic smart quotes don’t happen in every application – obviously not in Terminal, Script Editor, Script Debugger, Emacs, or any other development tool. I wonder what in OS X or in the individual applications determines whether or not they follow that preference.

Getting quotes right is often a difficult issue.

Hey Mitchell,

Yes. Apple decided that everyone should have smart-quotes.

Google:

“osx turn off smart quotes”

Many apps have settings that control various aspects of text-substitutions:

Obviously substitutions could be catastrophic in the Terminal, so there are none available in that app.

-Chris

Chris,

What bites me often is the "Smart Copy/Paste", since it often adds a space at the beginning or end of text I have selected.

I've turned this OFF many times in KM Editor, but it is always turned back ON the next time. How can I turn it OFF permanently?

Hey JM,

I've reported this issue to Peter before, and I just sent him a follow-up.

-Chris

Chris and all:

I have posted the below macro which I hope will ALWAYS make sure "Smart Copy/Paste" is turned OFF:

Turning on or off the entries in the Substitutions menu affects that field only and only for as long as that field remains. So it is essentially useless.

You can turn off “Smart” quotes in the system preferences.

Automatic Smart Quotes are forced off in the Execute Script actions. Most of the rest of the fields honour your settings for smart quotes.

Similarly, Smart Copy/Paste it turned off in Execute Script actions. I don’t know if there is a system wide way of turning that off.

By the way, in trying to put straight quotes into text I have had better luck with pasting them than typing them. I think typing them triggers the application’s handling of quotes. Unfortunately, if I put another straight quote in, it turns that and a previous one into smart quotes.

Are you all distinguishing smart quoting within text fields, or is this about full documents too?

It’s not so much an issue of turning of your General smart quote settings, it’s a question of doing what’s right by your macro users. You don’t want to tell them what settings to use, and you don’t want them to be surprised. Very complex situation with, I think, no resolution under all our constraints.

Not useless.

It (my macro) seems to work fine in Keyboard Maestro 7.1.1 (7.1.1) on OSX 10.10.5, but for some reason sometimes fails under 10.11.4.

But the real solution is to either remove "Smart Copy/Paste" from the KM Editor menu/features, or at least provide a KM Pref to always turn it off.

I have found many apps that do one or the other.