Re: uri_dropped, "drag commands" - detecting if user is holding down a key

From: vais <vsalik....at.gmail.com>
Date: Sun, 25 Jan 2009 16:01:18 -0800 (PST)

Thank you for looking into this. I don't think SCN_URIDROPPED would be
the right place for this either. It is a more general problem of being
able anywhere in Textadept Lua code to query the OS if a modifier key
is on. This can be useful outside of the uri_dropped event. Is it
possible to expose this information from the C core to Lua?

Thanks again,

Vais

On Jan 25, 6:25 pm, mitchell <mforal.n....at.gmail.com> wrote:
> Hi Vais,
>
> > Is it possible to check if a key is being pressed down at any given
> > moment? This can be useful to implement a Textmate-style "drag
> > commands" - handlers for files dragged-and-dropped onto Textadept.
>
> As far as I can tell, a Scintilla notification for SCN_URIDROPPED does
> not contain key modifiers. You might want to try asking the scintilla-
> interest google group if it can be done.
>
> -Mitchell;
>
>
>
> > I prefer the way Textadept handles files being dragged onto it - just
> > open the file in a new buffer. I find the way Textmate handles this by
> > default very annoying - the contents of the file are pasted into the
> > current buffer at caret position instead of opening the file in a new
> > buffer. That said, both behaviors may be useful under different
> > circumstances.
>
> > Textmate also has a concept of "drag commands", whereby the user can
> > customize what happens when certain types of files are dropped on a
> > buffer. For example, dragging and dropping and image file onto an html
> > document creates an image tag.
>
> > I think we can "have our cake and eat it too" in Textadept by handling
> > the uri_dropped event. What I would like is to be able to provide
> > various "modes" when handling the event, depending on what key the
> > user is holding down, e.g. Ctrl, Shift, Alt, etc.
>
Received on Sun 25 Jan 2009 - 19:01:18 EST

This archive was generated by hypermail 2.2.0 : Thu 08 Mar 2012 - 11:37:08 EST