Re: SciLexer tab key - line indent vs. tab insert
Posted: 23 Nov 2022 10:21
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:
Now Alt+up will either open a hyperlink or move the current line upwards.
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:
Code: Select all
Lexer:addAssignedKey(vpiDomains::c_alt, gui_native::vk_up, ...