NextPrevUpTopContentsIndex

interface-keys-style

Generic Function
Summary

Determines the emulation for an interface.

Package

capi

Signature

interface-keys-style interface => keys-style

Arguments

interface

An instance of a subclass of interface.

Values

keys-style

A keyword, :pc , :emacs or :mac .

Description

The generic function interface-keys-style returns a keyword indicating a keys style, or emulation. It is called when interface starts running in a new process, and keys-style determines how user input is interpreted by output panes (including editor-pane) in interface .

The editor (that is, instances of editor-pane and its subclasses) responds to user input gestures according to one of three basic models.

When keys-style is :emacs , the editor emulates GNU Emacs. This value is allowed on all platforms.

When keys-style is :pc , the editor emulates standard MS Windows keys. This value is allowed in the Windows and the X11/Motif implementations.

When keys-style is :mac , the editor emulates Mac OS X editor keys. This value is allowed only in the Mac OS X Cocoa implementation.

The most important differences between the styles are in the handling of the Alt key on Windows, selected text, and accelerators:

:emacs

Alt is interpreted on Windows as the Meta key (used to access many Emacs commands).

The :meta modifier is used in an output-pane input-model gesture specification.

Control characters such as Ctrl+S are not interpreted as accelerators.

The selection is not deleted on input.

:pc

Alt is interpreted as Alt on Windows and can be used for shortcuts.

The :meta modifier is not used in an output-pane input-model gesture specification.

Control keystrokes are interpreted as accelerators. Standard accelerators are added for standard menu commands, for example Ctrl+S for File > Save .

The selection is deleted on input, and movement keys behave like a typical Windows editor.

:mac

Emacs Control keys are available, since they do not clash with the Macintosh Command key.

The selection is deleted on input, and movement keys behave like a typical Mac OS X editor.

By default keys-style is :pc on Windows platforms and :emacs on Unix/Linux and Mac OS X platforms. You can supply methods for interface-keys-style on your own interface classes that override the default methods.

In the Cocoa implementation, Command keystrokes such as Command+X are available if there is a suitable Edit menu, regardless of the Editor emulation.

See the chapter "Emulation" in the LispWorks Editor User Guide for more detail about the different styles.

See also

editor-pane


LispWorks CAPI Reference Manual - 25 Jul 2006

NextPrevUpTopContentsIndex