Assigning a callback to Ctrl+Enter

  • SCINTILLANOTIFICATION.KEY doesn't seem to be firing at all (I've read this thread and STILL can't figure out when it's supposed to fire, but that's a question for another day). SCINTILLANOTIFICATION.CHARADDED doesn't fire either, I guess because the Ctrl prevents the Enter keypress from inserting anything.

    How can I capture Ctrl+Enter?

  • As I noted in the previous thread, SCINTILLANOTIFICATION.KEY is (according to the scintilla docs) only used on GTK, so it won't be called, ever, under N++.

    CHARADDED isn't called when you press Ctrl-Enter because no character is actually inserted. Ctrl-Enter is handled by N++, and is mapped to "Word Completion" in the shortcut mapper, at least on my copy.

    The easiest way to capture this is to make a new script with what you want to happen on Ctrl-Enter, and assign it the Ctrl-Enter shortcut in the shortcut mapper (you'll need to add it to the Python Script menu in the PS configuration option first).


  • Thanks.