How to make a simple 'make highlighted text' lowercase macro?

Chris,

Don’t all of these, except K, have standard Mac OSX shortcuts:

A Go to beginning of paragraph.
E Go to end of paragraph.
F Forward one character.
B Backward one character.
F Forward one word.
B Backward one word.

And with all of the movements, just add to select the text.

I make heavy use of the key in my KM macro triggers, so using it for movements is pretty much out for me.

Try ⌥D in TextEdit and see what you get. If you are getting a MacRoman character it means I did something a great many years ago to activate the traditional Emacs/terminal/Cocoa text editor ⌃ and ⌥ bindings and there is no way I would remember how. Would have to search the web. I know I made a few changes to my DefaultKeyBinding.dict but I don’t think anything so radical as to enable those keystrokes.

These bindings are built in to the Cocoa Text Editor component.

Hey Mitchell,

I have. :smile:

You've made changes to your system.

-Chris

It may come down to whether ⌥ is enabled as meta, since yes, in a default user, most of the ⌥ keybindings I claimed work don’t. I don’t know of a way to enable meta as a single action, though.

The default Cocoa bindings are in /System/Library/Frameworks/AppKit.framework/Resources/StandardKeyBinding.dict, but I can’t figure out to read or convert that. It used to be readable by Xcode I think. Text System Defaults and Key Bindings

User keybindings, if any, go in ~/Library/KeyBindings/DefaultKeyBindings.dict/. It is not necessary to repeat the bindings assigned by the system — you can just add your own to add to or override the system bindings.

See Text System Defaults and Key Bindings and many examples of full /DefaultKeyBindings.dict files on the web.

The following should work out of the box — again, this is only in Cocoa Text Editor components — applications like BBEdit do whatever they feel like. Browser Text Boxes are not Cocoa Text Boxes, although control-commands generally work in them. (I think text boxes in some web pages support the option commands too, but I’m not sure.)

  • ⌃A beginning of line/paragraph (depending)
  • ⌃B back one character
  • ⌃D delete one character forward
  • ⌃E end of line/paragraph (depending)
  • ⌃F forward one character
  • ⌃H delete one character backward
  • ⌃K kill to end of line/paragraph (depending)
  • ⌃N next line
  • ⌃O open line (i.e., insert RETURN at cursor and stay before RETURN)
  • ⌃P previous line
  • ⌃Q “quote” — i.e., take literally — the next character, rather than treating it as keybinding
  • ⌃T transpose characters around cursor
  • ⌃V down one page (with a little bit skewed idea of “page”)
  • ⌃W “delete to mark” — complicated to explain
  • ⌃Y paste the most recent sequence of keystrokes that delete

No, not all the ⌃ bindings have OS X equivalents, and for the ones that do, some people find it more convenient to use letter-key commands rather than special-key commands, since they involve less finger/hand movement. Depends a lot on how much you’ve used these bindings in the past — terminal, Emacs, whatever.

Cocoa Text System is a 10-year old but still useful reference that includes basic information on changing Cocoa keybindings.

See osx - Emacs-like Meta (Option/Alt) key functionality in OS X Lion? - Super User to see how to enable the very most basic ⌥ commands.

Something is strange. This reply contains <kbd>⌃</kbd>. Here it looks like yours — — but the same ```kbd`` construction at the end of the first paragraph of this post yields different shading.