Keyboard Input

Posted on 1999-07-20
Medium Priority
Last Modified: 2012-05-04
I wanna know how to scan the keyboard input for certain chars ( like scanning the keyb buffer... ) and how to get the codes for the keys being pressed.

The program is gonna be runnin in the system tray and will scan for certain keys being pressed.

Question by:maximebrunet
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
LVL 18

Accepted Solution

deighton earned 400 total points
ID: 1526134
Her's how to get the key pressed

     Private Declare Function GetAsyncKeyState Lib "user32" _
 (ByVal vKey As Long) As Integer

      Public Sub getKey()

       bNone = False
       For x = 1 To 255
        Key_State_Number = GetAsyncKeyState(x)
         If x = iold And Key_State_Number = 0 Then iold = 0
         If Key_State_Number <> 0 And iold <> x Then
          KeyState = x
          Debug.Print iold, x
          iold = x
         End If
      End Sub


Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I’ve seen a number of people looking for examples of how to access web services from VB6.  I’ve been using a test harness I built in VB6 (using many resources I found online) that I use for small projects to work out how to communicate with web serv…
This article describes how to use a set of graphical playing cards to create a Draw Poker game in Excel or VB6.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question