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 9006327
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T01:22:54+00:00 2026-06-16T01:22:54+00:00

I am using WinUser.h and need to know if there is a simple way

  • 0

I am using WinUser.h and need to know if there is a simple way of getting the virtual key of whatever key is pressed on the keyboard.

I have tried GetAsyncKeyState() and it works fine, but I need the actual virtual key to be returned rather than running through a long series of GetAsyncKeyState() calls to check every key on the keyboard.

I am essentially creating a system that allows users to map their controls, which is why it would be more ideal if I could get the virtual key and then run a check against keys that are not allowed.

Also, C++ is the language being used. Thank you for any help in this matter.

  • 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-16T01:22:55+00:00Added an answer on June 16, 2026 at 1:22 am

    You almost certainly want to response to the WM_KEYDOWN/WM_KEYUP or (more likely) WM_CHAR messages. WM_CHAR give you the result after TranslateMessage does its job, so it’s what you usually want. It’ll give you both the translated virtual key code and the scan code of the key that was pressed, in case you need that as well.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using Microsoft SQL Server 2005, is there any way to see when a table
Using the Qt library, is there a way to automatically update a QDateTimeEdit using
Using a JEditorPane, is there any way to tell if the caret is currently
using VB.Net2010 I need to call a C# DLL The problem I have is
Using MATLAB, you have to start with a uniform distribution between (0,1). You need
Using the Haxe programming language, is there any cross-platform way to read a PNG
Using SQL Server 2008 R2 we are looking for a way to select the
Using RestKit 0.10.1, I have objects served similar to this json format: {objects: [
Using SolrNet for querying & faceting. I have a combination of int, tdate and
Using NLTK and WordNet , how do I convert simple tense verb into its

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.