Changing drag & drop behaviour in Windows 7's explorer for touch screen use

7,404

Solution 1

This is possible. Let's ask ourselves two questions:

  • What hapens when we drag and drop a file?

    • An API function is called to start dragging the file.
    • A window is shown while you drag.
    • An API function is called when you drop the file.
    • The operation is performed.
       
  • How can we modify the drag-drop behavior?

    • We could hook the API function(s) and adjust the parameters/code to move instead of copy.
    • But, there is an easier way: We could use a hotkey modifier while dragging...

So, by some simple scripting, we can hold the SHIFT key when you drop the file based on the window!

After some research to figure out the name of the window (hook Window Title functions with API Monitor) we can now create an AutoHotkey script that will hold the SHIFT key until after you drop the file.

LButton Down:: 
   Send, {LButton Down}  
   IfWinExist, ahk_class SysDragImage 
   {
        Send, {LShift Down}
   } 
   return 

LButton Up::
    IfWinExist, ahk_class SysDragImage 
   {
        Send, {LButton Up}
        Sleep, 500 ; Feel free to adjust higher/lower to improve the behavior.
        Send, {LShift Up}
   } 
    Send, {LButton Up}
    return

Haven't really tried the above code, but I think I believe it should work.

Possible improvements:

  • Use AutoIt instead with a function like WinWait, so you don't have to react on the mouse.
  • Go for the hard stuff and write and hook the API functions, although you might need to hack a bit.

I hope the above script works or that I gave you a good start. :-)

Solution 2

Drag the file across and just before you're about to take your finger off the screen to copy, tap somewhere else on the screen at the same time.

If you have a computer with a touchscreen, you might find that gestures (motions that you make with one or two fingers) are easier to use than a mouse, pen, or keyboard.

See Using touch gestures for more information.

Press and tap (for touch screens with multiple touch points)

Press the item with one finger, then quickly tap with another finger, while continuing to press the item with the first finger.

Use press and tap to access the shortcut menu. Press and tap does the same thing as press and hold or right-clicking an item.


Press and hold (for touch screens with a single touch point)

Press and hold does the same thing as right-clicking an item. To perform the action, touch the screen where you want to right-click, hold until a complete circle appears, and then lift your finger. The shortcut menu appears after you lift your finger.

... I guess you could perform this action to cut the file and then the same action to paste it into the destination folder if your touch screen only has a single touch point.

Lots of other tricks on the webpage too, including panning, zoom and rotation.

Solution 3

I have searched a bit and for what I can tell, it's not possible.

Share:
7,404
Pekka
Author by

Pekka

Self-employed web developer and graphic designer. After-hours artist. Working from an old off-the-grid house in the Canary Islands. Not doing much here any more because the Stack Overflow I wish to build and participate in is no longer supported and the company running it has started going down a path of incomprehensible, increasingly outright evil actions. E-Mail: first name at gmx dot de

Updated on September 17, 2022

Comments

  • Pekka
    Pekka over 1 year

    I have a new touch screen, and am playing around with its functionality. The most productive use for me is organizing files (literally) by hand. It's fun working through a list of files, dragging and dropping them to the right locations using your index finger. It feels better on the wrist than mouse-clicking, too.

    The only problem is that when I drag & drop files across drives in Windows 7, the default behaviour is to copy the file instead of moving it. I know I can influence this using right click, but that is of course no option in my situation.

    How can I change the default drag & drop behaviour in Windows 7's explorer?

    Starting a bounty to see whether there is anything new.

    • Admin
      Admin almost 6 years
      Are you not able to tap-hold with your finger, and then drag-drop for the context menu? This works like right-click-dragging in Windows 10,
  • Pekka
    Pekka over 14 years
    Thanks jay. Using the finger, this won't work, because I have to release the finger for a moment (thus dropping the item) to invoke the long right click. Plus, it makes the organizing process too long.
  • Pekka
    Pekka over 14 years
    Cheers. I will post here if I happen to find anything.
  • Jay Wick
    Jay Wick about 14 years
    @Pekka, updated answer. Right click drag is possible, but you're right that it will take longer. If you could somehow introduce a keyboard modifier key such as Shift (move), Ctrl (copy), Alt (shortcut) then it would be easier.
  • Pekka
    Pekka about 13 years
    Mmmmm, very interesting! I will definitely be testing this and giving feedback.
  • Pekka
    Pekka about 13 years
    Will try this too.
  • Kez
    Kez about 13 years
    Sorry if this is a stupid answer and completely irrelevant. From what I thought I read on Microsoft's website touch gestures are built in and will let you do right-clicking and all sorts of other clever stuff on a touchscreen. Been a long day... sigh.
  • Pekka
    Pekka about 13 years
    Ah, this indeed doesn't seem to apply, because pressing and tapping is not possible during a drag & drop operation.
  • Pekka
    Pekka about 13 years
    I won't be able to test this before the bounty runs out, but I'm awarding the bounty to you because this looks the most promising.