Hi, This is a bug in Mono.
It comes from this file: https://github.com/mono/mono/blob/master/mcs/class/Managed.Windows.Forms/System.Windows.Forms/X11Dnd.cs Every DragEventArgs object intialized in this class pass 0 as the keystate value. Not sure how to fix this right now, but anyone can pick this up. dardino wrote: > > Hello! > > i tryed to find a solution for my problem: > i need to know if a CRTL or ALT or SHIFT key are pressed at the Drop > Event. > this is my code: > > void pictureBox1_DragDrop(object sender, DragEventArgs e) > { > switch (e.KeyState) > { > case 0: // no key pressed => move > Console.WriteLine("No key pressed"); > break; > case 8: // pressed CTRL => copy > Console.WriteLine("CTRL are pressed"); > break; > case 12: // SHIFT + CTRL => swap > Console.WriteLine("SHIF + CTRL are pressed"); > break; > default: > break; > } > } > > Under Windows it work perfectly! > Under linux e.KeyState has value 0 all time. > > Why? > > Anyone has a solution for my problem? > > Thanks! > -- View this message in context: http://mono.1490590.n4.nabble.com/WinForms-DragEventsArgs-KeyState-tp3925675p3926823.html Sent from the Mono - WinForms mailing list archive at Nabble.com. _______________________________________________ Mono-winforms-list maillist - Mono-winforms-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-winforms-list