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

From: mitchell <>
Date: Sun, 25 Jan 2009 15:25:32 -0800 (PST)

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.


> 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 - 18:25:32 EST

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