Next Prev Up Top Contents Index

interface-keys-style

Generic Function
Summary

Determines the editor keys style for an interface.

Signature

interface-keys-style interface => keys-style

Arguments

interface

An instance of a subclass of interface.

Values

keys-style

A keyword, :pc or :emacs .

Description

The generic function interface-keys-style returns a keyword indicating a keys style. It is called when interface starts running in a new process, and keys-style determines how user input is interpreted by the editor in interface .

The editor (that is, instances of editor-pane and its subclasses) responds to user input gestures according to one of two basic models. When keys-style is :emacs , the editor emulates GNU Emacs. When keys-style is :pc , the editor emulates standard MS Windows keys.

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

:emacs

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

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

:pc

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

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

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

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

See also

editor-pane


LispWorks CAPI Reference Manual - 13 Mar 2003

Next Prev Up Top Contents Index