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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T05:05:21+00:00 2026-06-03T05:05:21+00:00

I am using KeyEvents and KeyEvent.getKeyText(KeyEvent.VK_…) in order to get the text corresponding to

  • 0

I am using KeyEvents and

KeyEvent.getKeyText(KeyEvent.VK_...) 

in order to get the text corresponding to the KeyEvent.

In OSX (Lion) when I request the text for a special key, like TAB or ENTER (KeyEvent.VK_ENTER) I get the corresponding symbol (e.g. for Enter, I get the curved arrow). The same in a Windows XP system gives me the key name (e.g. “Enter”) instead of the symbol.

Is there a solution to get the special characters in XP, too?

  • 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-03T05:05:23+00:00Added an answer on June 3, 2026 at 5:05 am

    MAC have different implementation:

    These were changed intentionally to provide the proper symbols for
    menu shortcuts in Swing for in-window menu bars. Instead of using the
    word “Meta” or “Command” we actually now return the unicode symbol
    that the system menu bar shows.

    In that case, you can use the constants for that keys, VK_ENTER, e.g.

    if (evt.getKeyCode() == KeyEvent.VK_DOWN || evt.getKeyCode() == KeyEvent.VK_KP_DOWN) {}
    

    Or you can map the keys to its string names with Map

    map.put(KeyEvent.VK_ENTER, '\u21b5'); \\ ↵
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using the Redis info command, I am able to get all the stats of
Using Location.getBearing(); I seem to get randomly changing bearings. Aka, I can turn the
ChatGUI im using 2 JEditorPane to transfer text from one to another. once i
I'm using the following code to validate the text in JTextFields Text1 and Text2.
I am using this code: public boolean onKey(View v, int keyCode, KeyEvent event) {
Im using a KeyAdpater to get the events and the method addKeyListener and works
I am developing a custom keyboard for android. I am using KeyEvent.KEYCODE_DPAD_LEFT and KeyEvent.KEYCODE_DPAD_RIGHT
Below is an extract of some code I am using to simulate key presses
When using Robot class, what is the meaning of: robot.keyRelease(KeyEvent.VK_CONTROL); Shouldn't the code below
I am using Java Robot class to send keyevents. I tried robot.keyPress() function. But

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.