On Aug 26, 2004, at 1:43 AM, Stefano Franchi wrote:

Does anyone know where does MacOs X define the bindings for the various Mod keys? I use LyX/Qt for Mac and I would like to modify the setup of Control, Alt, Meta, and Compose, but do not know where to look for help. The Lyx docs assume you are using X11, which isn't the case with LyX/Qt (as far as I know).

I've created a new Mac.bind file that will be available in the next version of LyX-Mac. It uses standard Mac conventions for things like cursor movement, bold, underline, ellipses, etc. You can put this file in ~/.lyx/bind/ and then select it from within preferences as the Bind file. (The setting for this can be found under Preferences > Look and feel > User interface.) Then you'll have to quit and restart LyX.

If you're interested in exactly what keys do what, you can tell by looking at the .bind file, which is mostly self-explantory. For example, the line:

\bind "C-n"         "buffer-new"

will bind <Cmd>-n to opening a new file. (You'll have to do a little guesswork to determine what "buffer-new" means; or you can just try <Cmd>-n and see what it does. It shouldn't be too hard.)

In decoding the part in quotes after the "\bind" part, remember that "C-" means holding down the <Cmd> key, "M-" means the <Option> key, and "S-" means the <Shift> key.

The other thing to note in decoding that file is that the lines at the end, such as:

\bind_file menus.bind

basically just tells LyX to also load in the key bindings found in that file as well. (All .bind files can be found either in ~/.lyx/bind/ or within your LyX application itself. To access them within the application, you'll have to <Control>-click on the LyX application, select "Show Package Contents" from the contextual menu that pops up, and navigate to Contents/Resources/lyx/bind/.)

A nice thing about LyX is that you can modify the key bindings (or add your own) to make them as you please. For example, for my own personal .bind file, I've added

\bind "S-C-F"         "footnote-insert"

to bind "<Shift><Cmd>f" to creating a new footnote. Perhaps the easiest way to do this is to create a new .bind file ("my-bindings.bind", say), and have a list of all your additional bindings, followed by the line

\bind_file mac.bind

to read in the standard Mac bindings.

One of these days, I'll create a nicely formatted list of standard Mac bindings.

I hope that helps.

Bennett


Attachment: mac.bind
Description: Binary data

Reply via email to