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

From: vais <vsalik....at.gmail.com>
Date: Sun, 25 Jan 2009 13:17:55 -0800 (PST)

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.

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 - 16:17:55 EST

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