Results 1 to 4 of 4
  1. #1
    dhazwa is offline Member
    Join Date
    Jul 2011
    Posts
    15
    Rep Power
    0

    Default robot class keyevent question

    I need my program to press the "-" (dash) key. Also, I need to be able to use the "_" (underscore) key. The only thing I could find for the dash key was VK_SUBTRACT. When I try VK_UNDERSCORE, eclipse comes up with the error IllegalArgumentException. When I try:

    VK_SHIFT
    VK_VKSUBTRACT
    VK_SHIFT

    It still won't give me an underscore.
    Can someone please help me get a dash and an underscore into my program?!?!

    Thanks!

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

    Default

    Try press: VK_SHIFT, press: VK_MINUS release: VK_MINUS, release: VK_SHIFT

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

  3. #3
    dhazwa is offline Member
    Join Date
    Jul 2011
    Posts
    15
    Rep Power
    0

    Default

    Quote Originally Posted by JosAH View Post
    Try press: VK_SHIFT, press: VK_MINUS release: VK_MINUS, release: VK_SHIFT

    kind regards,

    Jos
    Jos, you are the man!!!!
    That was killing me! Can I pick your brain one more time? The last key to complete my program are these symbols "`" and "~". I dont know what they are called and I cant find anything on google about it. If you know what these two are, you will be my savior!

    Thanks
    Dan

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

    Default

    Quote Originally Posted by dhazwa View Post
    Jos, you are the man!!!!
    That was killing me! Can I pick your brain one more time? The last key to complete my program are these symbols "`" and "~". I dont know what they are called and I cant find anything on google about it. If you know what these two are, you will be my savior!
    That's the VK_BACK_QUOTE; the tilde is the same key with the shift key pressed (see your first example).

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. Help with Robot class please
    By davetheant in forum New To Java
    Replies: 2
    Last Post: 01-04-2011, 12:13 PM
  2. Robot class
    By coltragon in forum New To Java
    Replies: 6
    Last Post: 07-12-2010, 05:54 PM
  3. Help with Robot Class
    By protocos in forum Eclipse
    Replies: 11
    Last Post: 10-05-2009, 08:15 PM
  4. Robot Class
    By Jessie Madman in forum New To Java
    Replies: 3
    Last Post: 05-15-2008, 04:13 AM
  5. Robot Class
    By jfredrickson in forum New To Java
    Replies: 2
    Last Post: 07-11-2007, 09:00 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
  •