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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T06:11:17+00:00 2026-06-12T06:11:17+00:00

I need to create a program which fire event on every key press(like key

  • 0

I need to create a program which fire event on every key press(like key logger). I couldn’t able to get key value. This program will run behind and on every key press it fire event. I didn’t find any thing related to this on net.

  • 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-12T06:11:18+00:00Added an answer on June 12, 2026 at 6:11 am

    It is very strange that you cannot find anything.
    You should user KeyListener to log key events. If only one event (e.g. keyUP, keyDown or keyPress) is relevant use KeyAdapter instead.

    The problem is that key listener can be attached to any java screen element and catches events dispatched to this element only. For example you can create Frame and add key listener to it and capture all key events withing this frame.

    You cannot capture key events outside the java application.

    If you still want to do this you can use the following work-around. Create transparent window and add listener to it. The listener should catch events, log them and then imitate them on the same location on screen using java.awt.Robot.

    This reference will help you to create transparent window: http://docs.oracle.com/javase/tutorial/uiswing/misc/trans_shaped_windows.html

    Other way is to use JNI/JNA directly or indirectly. For example xdotools can help you.

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

Sidebar

Related Questions

I need my program to create and edit a config file, which would contain
I need to create program that creates a XML schema like below using System.Xml.XmlSchema
I need to create a program which will show how elliptic curve cryptography works.
I am creating a program using wxpython which entails the need to create many
In Windows.Forms, I need to create a program which accepts any color and tries
I am looking to create a plugin manager like program which starts a loop
I need to create a utility program which runs on windows mobile. I need
I need to create a java program which should go to a website's login
I have a C program in which I need to create a whole family
I have a college project in which I need to create a program which

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.