Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8096825
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T21:34:10+00:00 2026-06-05T21:34:10+00:00

i was wondering wether it is possible to hold down shift while clicking with

  • 0

i was wondering wether it is possible to hold down shift while clicking with the mouse.

It would look simmilar to this: – If you could simulate a mouse click with the SendKeys.SendWait function – SendKeys.SendWait(+{Mouseclick});
So far I have called the API “User32.dll” to call the mouse click:

public const int MOUSEEVENTF_LEFTDOWN = 0x2;
public const int MOUSEEVENTF_LEFTUP = 0x4;
public const int MOUSEEVENTF_MIDDLEDOWN = 0x20;
public const int MOUSEEVENTF_MIDDLEUP = 0x40;
public const int MOUSEEVENTF_RIGHTDOWN = 0x8;
public const int MOUSEEVENTF_RIGHTUP = 0x10;
[DllImport("User32.dll")]
public static extern int mouse_event(int dwFlags, int dx, int dy, int cButton, int dwExtra);

 mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);

However; is it possible to hold the Shift key down at the same time?

Regards, DotTutorials

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T21:34:12+00:00Added an answer on June 5, 2026 at 9:34 pm

    You should be able to use the keybd_event function to simulate the Shift key. Something like:

    public const int MOUSEEVENTF_LEFTDOWN = 0x2;
    public const int MOUSEEVENTF_LEFTUP = 0x4;
    public const int MOUSEEVENTF_MIDDLEDOWN = 0x20;
    public const int MOUSEEVENTF_MIDDLEUP = 0x40;
    public const int MOUSEEVENTF_RIGHTDOWN = 0x8;
    public const int MOUSEEVENTF_RIGHTUP = 0x10;
    public const byte KEYBDEVENTF_SHIFTVIRTUAL = 0x10;
    public const byte KEYBDEVENTF_SHIFTSCANCODE = 0x2A;
    public const int KEYBDEVENTF_KEYDOWN = 0;
    public const int KEYBDEVENTF_KEYUP = 2;
    [DllImport("User32.dll")]
    public static extern int mouse_event(int dwFlags, int dx, int dy, int cButton, int dwExtra);
    [DllImport("user32.dll", EntryPoint="keybd_event", CharSet=CharSet.Auto, ExactSpelling=true)]
    public static extern void keybd_event(byte vk, byte scan, int flags, int extrainfo);
    
    // shift down
    keybd_event(KEYBDEVENTF_SHIFTVIRTUAL, KEYBDEVENTF_SHIFTSCANCODE, KEYBDEVENTF_KEYDOWN, 0);
    mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0);
    mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0);
    // shift up
    keybd_event(KEYBDEVENTF_SHIFTVIRTUAL, KEYBDEVENTF_SHIFTSCANCODE, KEYBDEVENTF_KEYUP, 0);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

This is a very general question: I was wondering whether it is possible to
i was just wondering wether it is possible to add an uiimageview as a
I was just wondering whether its possible to have something like this: I have
I was wondering wether it is possible to inject a frame script into a
I am wondering wether it's possible to use .htaccess to rewrite a folder name.
I was just wondering whether it was possible to do something like this: char
I was wondering wether it is possible to redirect someone to a different tab
I was wondering wether it was possible to know exactly where in the dom
I was wondering whether it is possible to limit the number of characters we
I am wondering whether it is possible to make dynamic variables in Java. In

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.