ProcessEditorInput
The ProcessEditorInput function is called from the internal
editor every time there is user input (mouse or keyboard) to process.
int WINAPI ProcessEditorInput(
const INPUT_RECORD *Rec
);
Parameters
Rec
Points to the
INPUT_RECORD
structure. This structure is defined in Win32 API and contains information about the last
input (keyboard or mouse) event.
Return value
If the plugin returns 0, the input event is processed by the FAR editor.
The plugin should return 1 if it has completely processed the event or if the event should be
discarded.
Remarks
- A plugin should correctly process incoming events by analysing
INPUT_RECORD.EventType fields and in the case of an unhandled even to return
control back to FAR.
- While in macro playback keyboard events (KEY_EVENT) have a new type - the
INPUT_RECORD.EventType field equals 0x8001.
- EditorControl commands can be called from
this function, but be careful when calling
ECTL_PROCESSINPUT
from here, because this command calls the ProcessEditorInput function again. So the
plugin should take steps to prevent recursion at this place.
- A plugin does not receive the following key combinations: Ctrl-W, F11,
Alt-F9, F12, Ctrl-Tab, Ctrl-Shift-Tab,
Alt-Ins and Ctrl-Alt-Shift.
- A plugin receives the following key combinations with the following restrictions:
- Alt-F5 - if the PrintMan plugin is not installed
- Alt-F11 - if the editor is modal
- F6 - if switching to viewer is disabled (when calling
Editor
with the EF_ENABLE_F6 flag omitted).
See also: