Results 1 to 10 of 10
  1. #1
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default Key codes for the letters , &

    The title says it all.
    I've been searching around the internet for those.
    On all webpages that I've found so far, I get different codes for them :o

    Thanks,
    Ah
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,452
    Rep Power
    25

    Default Re: Key codes for the letters , &

    You might be able to reverse engineer the codes by writing a keylistener that prints out the event objects when those keys are pressed.

  3. #3
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default Re: Key codes for the letters , &

    The problem is that I can't find the keys in Java.
    For example: VK_ does not work.
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,452
    Rep Power
    25

    Default Re: Key codes for the letters , &

    Did you do as I suggested? What was printed out when you pressed the keys?
    Then take those numbers and go to the VK_ symbol definitions and see if there are any symbols with those values.

  5. #5
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default Re: Key codes for the letters , &

    How do you intend to use the key codes?

    db

  6. #6
    Alerhau's Avatar
    Alerhau is offline Senior Member
    Join Date
    Jun 2011
    Location
    Sweden
    Posts
    158
    Rep Power
    4

    Default Re: Key codes for the letters , &

    How do you mean? :-/
    Currently Developing a Game Called Loaie, You Can Download It From "The Loaie Website".

  7. #7
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,452
    Rep Power
    25

    Default Re: Key codes for the letters , &

    I said: Write a keylistener that prints out the event objects when those keys are pressed.

    I assume you know how to add a keylistener to a component and how to print out the event object that is passed to one of the listener methods. The data printed includes lots of info about the event. I think the keyCode is there.

  8. #8
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,533
    Blog Entries
    7
    Rep Power
    20

    Default Re: Key codes for the letters , &

    I think the OP confuses the unicode code point generated when a key is typed and the raw keycode for a key being pressed (and released), i.e. VK_A generates the character 'a' while the *two* events VK_SHIFT and VK_A generate the character 'A'.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  9. #9
    DarrylBurke's Avatar
    DarrylBurke is offline Member
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,244
    Rep Power
    19

    Default Re: Key codes for the letters , &

    Which is why I asked what I did. The response
    How do you mean? :-/
    doesn't help anyone, and least of all the OP.

    db

  10. #10
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,533
    Blog Entries
    7
    Rep Power
    20

    Default Re: Key codes for the letters , &

    Quote Originally Posted by DarrylBurke View Post
    Which is why I asked what I did. The response

    doesn't help anyone, and least of all the OP.
    Yep, true; I do admit that those VK_* thingies can be confusing at first; it was only when I started fiddling with that 'virtual keyboard' (remember?) that made me understand all about it ;-)

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. How to allow specific letters only?
    By ctmarco3 in forum New To Java
    Replies: 7
    Last Post: 04-01-2011, 04:41 AM
  2. What does the letters mean?
    By mustachMan in forum New To Java
    Replies: 3
    Last Post: 02-11-2010, 09:50 PM
  3. Need help with counting letters
    By mrdestroy in forum New To Java
    Replies: 15
    Last Post: 10-22-2008, 01:33 PM
  4. Letter with Letters
    By elgatoboricua in forum New To Java
    Replies: 7
    Last Post: 09-16-2008, 02:59 PM
  5. need block letters??
    By dc2acgsr99 in forum New To Java
    Replies: 16
    Last Post: 01-29-2008, 08:31 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •