where is ctrl+newline handled in pywin editor?

Mark Hammond skippy.hammond at gmail.com
Wed Sep 23 22:03:06 EDT 2009


On 24/09/2009 10:25 AM, C or L Smith wrote:
> {Sorry about the no-wrap in the first post...}
>
> I use the pywin environment on Windows for python code editing and
>   interactive environment.
>
>   I've been able to find the place in the editor files where the enter
>   key is handled and where the whitespace is stripped from a line and
>   I've been able to get it to not leave any white space when a double
>   return is entered. But what I would like to be able to do is find the
>   place where ctrl+enter is handled so I could have it strip any
>   trailing space from the current line before going back to the left
>   margin. Is anyone acquainted enough with the pywin editor to be able
>   to help with this?

You probably just need to check:

if win32api.GetKeyState(win32con.VK_CONTROL) & 0x8000:

in the OnKeyEnter handler...

Cheers,

Mark



More information about the Python-list mailing list