I have LyX 2.0.4 installed on Mac OS X Mountain Lion. In earlier versions, there was a shortcut to trigger environment

enter image description here

without touching the mouse - allowing a more efficient write flow. I wonder if somone knows how to achieve that? I already looked inside the short cut reference of LyX for macs, but I wasn't succesful in finding the desired shortcut.

Edit: Meanwhile I digged up a link where such a feature is explained. I quote Sven who quoted Paul from some mailing list:

M-p (alt-p) followed by a space opens the environment list. From there, repeatedly typing the same letter cycles through all environment names starting with that letter.

Unfortunately the Shortcut only triggers a π...

  • 1
    Very nicely written up question (good explanation of problem, screen shot, and what you expected to get and what you actually got).
    – scottkosty
    Oct 27 '12 at 16:58
  • 1
    @Aufwind: LyX itself provides a very rich interface and key bindings. For virtually everything else (on Windows), AutoHotKey can be of help.
    – Werner
    Oct 27 '12 at 20:04

What bind file are you using? Go to Tools > Preferences > Editing > Shortcuts. If you are using "mac" or "cua" as your bind, it should work already. If not, you might need to set it yourself. In the "Show key-bindings containing:" text box put in "drop-layouts-choice" :

enter image description here

If a shortcut is shown for you under the shortcut column, then you should be able to use that. If no shortcut is shown, select it and click on the "Modify" button in the bottom right and enter the shortcut you would like.

  • Thank you very much for the explanation. The menu told me, that Ctrl+P+Space is responsible for my desired behaviour.
    – Aufwind
    Oct 27 '12 at 18:05

With the "mac" bind file for keyboard shortcuts – which is the default on LyX for Mac OS X, the current environment can be selected by <Ctrl>+<p><key>, with key being one of the choices that is displayed in the status bar after pressing <Ctrl>+<p>:

enter image description here

<Space> opens, as already figured out by the OP, the layout selection menu. However, the others are also pretty useful, as they directly switch to the respective layout: <0> to <6>, for instance, insert a section of the respective level, whereas <e> starts an enumeration and <i> an itemize environment.

With the "mac" bind file, LyX basically uses always <Ctrl> instead of the meta key (<Alt>) used from other bindings. The rationale behind this is that the <Alt> key is used on OS X to insert special characters, whereas the <Ctrl> is only rarely used for keyboard shortcuts, as the Mac also has the <Cmd> key ("Apple key").


Just for people who are using Windows, Lyx 2.0.6 and need help,

It is ALT+P, "Space", and then the dropdown menu to change paragraph environment comes out .


Based on the answer of scottkosty (who deserves the upvotes) : Use Ctrl+p [...] where ... stand for the type of layout you want. It will not really trigger the banner but you will be able to choose the layout. For instance Ctrl+pa will display the content as an abstract. Just some shortcut to remember.

Edit : Ctrl+p+Space is exactly what you want ! It works for me and I have the same OS with the same LyX version.

  • Thank you, this is exactly what I just figured out with the help of @scottkotsy, hence I excepted his answer. :-) But your first hint is really useful, too.
    – Aufwind
    Oct 27 '12 at 18:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.