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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T14:25:35+00:00 2026-05-26T14:25:35+00:00

I hope that this question hasn’t been asked already, but I was looking for

  • 0

I hope that this question hasn’t been asked already, but I was looking for a solution of my problem and I didn’t found anything helpful for me.

I’m writing a Java Application, where the user can control the App via his keyboard. The problem is, that I need many different input keys. So I also have to use the special char keys. But my problem is, that I can’t code the whole thing for every keyboard again.

So my question is, is there a way to determine the place of a given key on the keyboard. It would be very good if someone would know how to do this.

Thanks in advance,
Leo

  • 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-26T14:25:36+00:00Added an answer on May 26, 2026 at 2:25 pm

    A keyboard only sends key codes to the underlying stack. It’s up to the OS and software to figure out how to use this. Now perhaps the hardware does have a simple code that relies on location and there’s some translation going on to turn this into a usable key code for applications. I reckon this must be the case since the layout can be chosen from OS. But that doesn’t seem like the kind of low-level stuff you’d have access to in Java, short of using JNI.

    Originating from a KeyListener, you can capture KeyEvents. I’d suggest you look into the doc, fields and methods of that class and maybe make a small test app that captures such events and prints the results of various methods out. Maybe you can find some common ground.

    If there’s no straightforward way of doing this, perhaps it’s best to have some sort of translation table scheme that standardizes the input for the most common layouts, like Qwerty and Azerty. That should do it for most users and since you wish to rely on absolute positioning, requiring one of a small set of layouts doesn’t seem unacceptable. Users can change the layout in the OS.

    If you happen to be making a game, maybe create some huge control deck that people will be forced to buy to get the best experience. Extra money! 😀

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

Sidebar

Related Questions

i'm pretty sure that this question has allready been asked (but i didn't find
I hope that this question has not been asked elsewhere, but I'm having difficulty
I know that this question has already been asked HERE but sadly none of
Hope this question hasn't been asked before. I've got the following working <!-- 640x920
I know that variations on this question have been asked, but I've tried all
I was about to ask this question...but since it has already asked I will
I hope this hasn't been asked before, if so I apologize. EDIT: For clarity,
Not too sure how to formulate my question and I hope that this is
This is a very strange problem, and I just hope that I can clearly
i'm looking for a subversion client that hasn't a GUI but is accessible only

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.