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

  • Home
  • SEARCH
  • 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 697581
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:10:58+00:00 2026-05-14T03:10:58+00:00

I am currently working on an application which requires different behaviour based on whether

  • 0

I am currently working on an application which requires different behaviour based on whether the user presses the right or left shift key (RShiftKey, LShiftKey), however when either of these keys is pressed I only see ShiftKey | Shift.

Is there something wrong with my keyboard? (laptop) do I need a new keyboard driver/keyboard in order to send the different key commands maybe…

This is a pretty massive problem at the moment, as there is no way of testing that the code works (apart from unit tests). Anyone had any experience of the different shift/alt/ctrl keys?

  • 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-05-14T03:10:58+00:00Added an answer on May 14, 2026 at 3:10 am

    I don’t know if this post will help you or not, but it looks like you may have to mess with InteropServices and Diagnostics:

    MSDN Forum: How to send Left/Right shift key

    Edit: I finally figured out how to make GetAsyncKeyState() work, as adrianbanks revealed.

    [System.Runtime.InteropServices.DllImport("user32.dll")]
    private static extern short GetAsyncKeyState(Keys vKey);
    
    private void theForm_KeyDown(object sender, KeyEventArgs e)
    {
        if (e.KeyCode == Keys.ShiftKey)
        {
            if (Convert.ToBoolean(GetAsyncKeyState(Keys.LShiftKey)))
            {
                Console.WriteLine("Left");
            }
            if (Convert.ToBoolean(GetAsyncKeyState(Keys.RShiftKey)))
            {
                Console.WriteLine("Right");
            }
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently working on desktop application which calls third party API. After authorizing against
Currently i am working on a desktop application which consists mathematical analysiss.I am using
I'm working on a cross platform application in Java which currently works nicely on
I am currently working on an application which is around a decade old. When
I'm currently working on an oophp application. I have a site class which will
Where currently working on an C# application that requires data to be stored in
I'm currently working on an application with a frontend written in Adobe Flex 3.
We are currently working on an application that will use a WCF service. The
The application I am currently working on generates a lot of SQL inline queries.
In an application that I am currently working on, a requirement is to bring

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.