Menu

Override key press

Help
Chancy
2017-02-14
2017-02-14
  • Chancy

    Chancy - 2017-02-14

    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!

     
  • CFrank

    CFrank - 2017-02-16

    Is it possible to override a key press?

    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

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.