# Does TeXShop for Mac have key bindings?

There's a Macro's and Key Binding option in the Preferences Menu, but the only way to utilize these macros is to click through the menus.

How do I get the good ol' classic Ctrl+B -> \textbf{} behaviour that I am so accustomed to?

Do I really have to write my own KeyEquivalents.plistfile? Say it ain't so.

Example:

I have written a block of text and want to mark that entire passage and make it bold. I know I can select Bold from the Macros menu, but is there a keyboard shortcut for this?

-
Excellent last question. I don't need key bindings to auto-complete environments/commands when writing. Mostly I write a text section first and then I want to format it. So it would be nice to have the text section selected and then do something like right-click and choose from a menu of formatting commands / environments, URL linking etc. –  Paglia Orba Aug 15 '13 at 12:17

## 1. Built-in Short Cuts:

When you pull down the menu items you see the keyboard shortcuts. Here is an example of the Source menu:

## 2. Command Completion:

If you simply start typing the command you want

hit esc you get:

Hitting esc again:

## 3. Abbreviations:

Besides command completion there are also abbreviations. All abbreviations for environments start with a ‘b’. For example if you type \bite and hit esc you get the itemize environment:

## 4. System Preferences:

Furthermore, you can always add your own keyboard shortcuts. For example going to System Preferences → Keyboard, you can define the COMMAND-B option to select the Bold pull down (which does not have a keyboard shortcut defined):

After restart, COMMAND-B yields:

## 5. Key-Bindings Editor

Under the Source → Key Bindings you can access the key-bindings editor with which (I assume, have not tried this myself) you can set up other keyboard sequences:

From Page 6 of the TeXShop Tips & Tricks which can be accessed from the Help menu:

e.g. pressing Opt-, with a US keyboard layout, usually enters ≤ into your document but with Key Binding enabled \leq will be entered. Similarly, with some text selected pressing " will surround the selected text with  and ''.

## 6. Macros Editor:

From Page 7 of TeXShop Tips & Tricks:

Text macros are simple text substitutions. You can also tell TEXShop to insert any selected text using #SEL#, place the cursor using #INS# and even put in multiple lines in the macro itself. Then you can assign the text macro to a keyboard shortcut. I like to use Cmd-B and Cmd-I to insert \textbf{...} and \emph{...} into the document where ... is any possible selected text. Macros to do that are already under the Macros → Text Styles Menu so we need only assign keyboard shortcuts to them. To assign Cmd-I to the emphasize macro: open the Macro Editor where the form of the Macros menu appears in the left hand pane; click the emphasize macro found under Text Styles; click the Key insertion box and simply insert a lower case ‘i’ (the Cmd key is assumed and additional modifier keys can be checked off ).

-
Ah, I did not know about the autocompletion part. Is it possible to change the button from 'esc'? I do know that those menu items' shortcuts are visible. But for more common commands such as producing italic, bold, emphasized text, are there any shortcuts? –  Parham Nov 12 '12 at 9:47
@Parham: updated answer. –  Peter Grill Nov 12 '12 at 10:00
It's a general tendency that things that use Ctrl elsewhere show up with Cmd on Mac. –  Mikael Vejdemo-Johansson Nov 12 '12 at 10:40
@MikaelVejdemo-Johansson: It was just my way of referring to commonly known shortcuts; I am aware of Mac shortcut customs! –  Parham Nov 13 '12 at 4:54
check out this tutorial I made, which shows how to do this this: youtube.com/watch?v=_N5F8ZBywPI –  macmadness86 Jan 9 '13 at 18:00