Determines the emulation for an interface.
capi
interface-keys-style interface => keys-style
interface⇩ |
An instance of a subclass of interface. |
keys-style⇩ |
A keyword, :pc , :emacs or :mac . |
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 Microsoft Windows keys on Windows, and KDE/Gnome keys on GTK+ and Motif. This value is allowed in the Windows, GTK+ and X11/Motif implementations.
When keys-style is :mac
, the editor emulates macOS editor keys. This value is allowed only in the macOS Cocoa implementation.
The most important differences between the styles are in the handling of the Alt
key on Microsoft Windows, selected text, and accelerators:
:emacs |
The modifier
Control characters such as The selection is not deleted on input. |
:pc |
The modifier
The selection is deleted on input, and movement keys behave like a typical Microsoft Windows or KDE/Gnome editor. |
:mac |
Emacs The selection is deleted on input, and movement keys behave like a typical macOS editor. |
By default keys-style is :pc
on Microsoft Windows platforms and :emacs
on other 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 Editor User Guide for more detail about the different styles.
On Motif the code to implement accelerators and mnemonics clashes with the LispWorks meta key support. Therefore the keyboard must be configured so that none of the keysyms connected to mod1 (see xmodmap) are listed in the variable capi-motif-library:*meta-keysym-search-list*
, which must be also be non-nil. Note also that Motif requires Alt to be on mod1.
CAPI User Guide and Reference Manual (Unix version) - 01 Dec 2021 19:32:42