Is it possible to override a key press? Specifically I would like to override a Tab press to hook it for auto completion using Jedi, however Tab doesn't seem to be caught by the CHARADDED notification (but I think this would be after the tab is inserted anyways) and the KEY notification does not work on Windows (which might catch it?).
I'm trying to override Tab to display an autocompletion list if pressed after a period character or on a partial token immediately following a period character, otherwise insert a tab as usual.
Or any other workarounds for this behavior?
Thanks!
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Somehow, you could hook npp message queue using ctypes and win32 api or
you use the modified callback and check against SC_MOD_INSERTTEXT.
See http://www.scintilla.org/ScintillaDoc.html#SCN_MODIFIED for more information.
Cheers
Claudia
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Is it possible to override a key press? Specifically I would like to override a Tab press to hook it for auto completion using Jedi, however Tab doesn't seem to be caught by the CHARADDED notification (but I think this would be after the tab is inserted anyways) and the KEY notification does not work on Windows (which might catch it?).
I'm trying to override Tab to display an autocompletion list if pressed after a period character or on a partial token immediately following a period character, otherwise insert a tab as usual.
Or any other workarounds for this behavior?
Thanks!
Somehow, you could hook npp message queue using ctypes and win32 api or
you use the modified callback and check against SC_MOD_INSERTTEXT.
See http://www.scintilla.org/ScintillaDoc.html#SCN_MODIFIED for more information.
Cheers
Claudia