I'm using Lyx 2.0.2

I would like to define keyboard shortcuts for creating mathematical sections such as Theorem, Lemma etc. I'm pretty sure those do not exist ...

1 Answer 1


While trying to solve a different problem, I was looking in the LyX wiki about keyboard shortcuts. One thing you can find there is a .bind file created by Bo Peng. A .bind file is a text file where definitions of keyboard shortcuts are stored, and among those defined in that on are keyboard shortcuts for adding theorems, lemmas etc.

I haven't tried to use this file in itself, though that should be possible I would think, but it does show you how to create those shortcuts yourself. The LyX function needed is layout <nameoflayout>. I.e., to create a shortcut for adding a theorem, you need layout Theorem.

What Rasmus writes in this answer also goes for theorems etc. That is, if you add a theorem or something the corresponding function is shown briefly in the bottom statusbar, as seen in this screenshot:

enter image description here

To add such shortcuts within LyX:

  1. Go to Tools --> Preferences --> Editing --> Shortcuts.

  2. Click the "New" button in the bottom right corner.

  3. In the "Function" field, type layout Theorem for theorem, layout Lemma for lemmas, etc.

  4. Click the empty box to the left of "Delete key", and then press the shortcut you wish to use. It will then appear in the box.

If the keyboard shortcut is already in use, LyX will notify you of this when you press OK. You then have to redo the process, and find another shortcut (or redefine/delete the existing one first).

enter image description here

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .