In the sciLexer itself you can assign sciLexer-built-in actions to keys. But to perform your own custom commands you will need to handle the keypress before it reaches the sciLexer.
We have done that in a "hard coded" fashion to deal with the tab mechanism we want(ed).
I think it makes sense to make this hard coded thing into a "soft" facility instead. So we will do that, but it will include the extra determ level that Gukalov suggests, because it unnatural that the keys revert to their sciLexer assignments if you do not handle the keypress.
Try for example to assign the "shell open" action to Alt+up:
predicates
assignCmdKey :(unsigned KeyDefinition, integer SciCommand).
% This assigns the given key definition to a Scintilla command identified by sciCommand. % sciCommand can be any SCI_* command that has no arguments.% Notice that custom key bindings (see #assignCustomKey) will shadow the sciLexer assignments.predicates
clearCmdKey :(unsigned KeyDefinition).
% This makes the given key definition do nothing by assigning the action SCI_NULL to it.predicates
clearAllCmdKeys :().
% This command removes all keyboard command mapping by setting an empty mapping table.predicates
assignCustomKey :(vpiDomains::keyModifierKeyModifier, vpiDomains::keyCodeKeyCode, runnable Action).
% Assign a key (#KeyModifier+#KeyCode) to a custom command.% If a custom action is assigned to a key the normally assigned Cmd will not have any effect.% See also #assignCmdKey.% By default copy and cut operations are assigned to custom actions that place HTML format on the clipboard.% Also by default tab ans shift+tab are assigned to indent/unintent behvior.predicates
clearCustomKey :(vpiDomains::keyModifierKeyModifier, vpiDomains::keyCodeKeyCode).
% Clear the custom key binding of the key: #KeyModifier+#KeyCode.predicates
clearAllCustomKeys :().
% Clear all custom key bindings (including the default assignments, see #assignCustomKey).s