Keys preferences

Keys preferences page
Keys preferences page

The function of the keyboard can be extensively customized in CityEngine using the Keys preferences page. In CityEngine, key strokes and key sequences are assigned to invoke particular commands.

Key strokes, sequences, and bindings

A key stroke is the pressing of a key on the keyboard while, optionally, holding down Ctrl, Alt, or Shift.. For example, holding down Ctrl while pressing A produces the key stroke Ctrl+A. The pressing of the modifier keys themselves does not constitute a key stroke.

A key sequence is one or more key strokes. Traditionally, Emacs assigned two or three key stroke key sequences to particular commands. For example, the normal key sequence assigned to Close All in Emacs is Ctrl+X Ctrl+C. While Eclipse supports key sequences of arbitrary lengths, it is recommended that keyboard shortcuts be four key strokes in length (or less).

A key binding is the assignment of a key sequence to a command.


A scheme is a set of bindings. CityEngine includes two schemes:

  • Procedural CityEngine (default)
  • Autodesk Maya
  • Autodesk Revit
  • Google SketchUp
  • McNeel Rhino
  • Autodesk 3ds Max
  • Blender
  • Autodesk Autocad
  • Graphisoft ArchiCAD
  • Maxon Cinema4D
  • Emacs (do not use)
  • Default (do not use)

The Procedural CityEngine scheme contains a general set of bindings, in many cases recognizable as traditional key sequences for well-known commands. For instance, Ctrl+A is assigned to Select All, and Ctrl+S is assigned to Save.

Choose the scheme you are most comfortable with by changing the Scheme setting on the Keys preferences page.


Key bindings can vary based on the current context.

For instance, the active part may be a CGA shape grammar editor in which a different set of key sequence assignments may be more appropriate than if the active part was a 3D viewport. As a specific example, typically X, Y, and Z are assigned to normal typing actions in a context such as CGA shape grammar editing, while X, Y, or Z is assigned to axis alignment in a 3D viewport. This context is usually determined by the active window, but it can be influenced by the active dialog box as well. If the active window does not choose a particular context, the active context is set to In Windows.

CityEngine includes a number of contexts, for example:

  • In Dialogs and Windows
  • In Windows (extends In Dialogs and Windows)
  • In Dialogs (extends In Dialogs and Windows)
  • Editing Text (extends In Windows)
  • In Viewport
  • In Console

It is not recommended to promote a key binding to a context that it extends. For example, it is not recommended that you move an Editing Text key binding to the In Dialogs and Windows context. This may have unexpected results.

Some key bindings work in dialog boxes. Those key bindings are assigned to the In Dialogs and Windows context. One example of such a key binding is the key binding for cut. You can change these key bindings. For example, you can set Ctrl+X to cut in dialog boxes, but Ctrl+W to cut in windows.

Platform and locale

Key bindings also vary by platform and locale. In Chinese locales (zh), Alt+Slash is assigned to Content Assist, instead of the usual Ctrl+Spacebar.

The current platform and locale is determined when CityEngine starts and does not vary over the lifetime of a running CityEngine.

Customizing key bindings

With multi-stroke key sequences, schemes, and contexts, there are a lot of things to keep in mind when customizing key bindings. All key customization is done on the Keys preferences page.

For example, you want to bind Ctrl+5 to the About command. By default, the Keys preference page shows you all possible key bindings. You can see the About command listed in the Help category. You can bind the command by putting focus in the Binding text box and pressing Ctrl and 5 as if you were running the command.

When you type Ctrl+5, you have created a binding for About. The column on the right will indicate that this is a user binding by displaying a U. If there was a conflict with another key, this column would also display a C. The binding will be in the default context, In Windows. You can now use the When combination box to change the key binding context (for example, to move this binding to Editing Text).

To add a second key binding to About, you can use the Copy Command button to create a second command entry for you to bind another key to. To delete a binding, you can either use the Remove Binding button or give focus to the Binding text box and press Backspace.

Conflict resolution

There are only a finite number of common key strokes available to assign to a multitude of commands. Scheme, context, platform, and locale all partition key sequence assignments into domains where they don't conflict with one another.

If the user sets a key binding and creates a conflict, the conflicting bindings will be displayed in the conflicts list. This can be used to switch between conflicting key bindings so that they can be changed.

Resolve these conflicts by assigning the key sequence to one of the commands or remove it from the other.