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

5

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.

Pekka

Posted 2010-01-22T17:36:36.023

Reputation: 2 239

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, – Shanenopolis – 2018-05-22T08:58:37.933

Answers

4

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. :-)

Tamara Wijsman

Posted 2010-01-22T17:36:36.023

Reputation: 54 163

1Mmmmm, very interesting! I will definitely be testing this and giving feedback. – Pekka – 2011-02-22T17:10:00.283

1I 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. – Pekka – 2011-02-28T15:53:51.413

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.

Kez

Posted 2010-01-22T17:36:36.023

Reputation: 15 359

Will try this too. – Pekka – 2011-02-22T17:22:40.887

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. – Kez – 2011-02-22T17:28:51.737

Ah, this indeed doesn't seem to apply, because pressing and tapping is not possible during a drag & drop operation. – Pekka – 2011-02-28T15:52:05.967

1

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

Paulo Santos

Posted 2010-01-22T17:36:36.023

Reputation: 156

Cheers. I will post here if I happen to find anything. – Pekka – 2010-01-22T23:04:21.430

0

In the world of the mouse you can right click drag objects to gain access to more options regarding the operation.

alt text

You can invoke such a 'right click drag' from the touch screen interface. In the world of touch screens, a 'long' tap invokes context menus. To create a right-click-drag, just hold onto an object then drag it once the circle appears.

The only downside is that it will take longer.

jay

Posted 2010-01-22T17:36:36.023

Reputation: 6 287

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 – 2010-01-22T23:03:08.750

@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. – jay – 2010-02-09T12:19:12.197