Key Codes For SCAR

Discussion in 'Code Snippets and Tutorials' started by Anonymous, Jan 16, 2007.

  1. Anonymous

    Anonymous Guest

    Key Codes For SCAR


    People have been wondeirng how to make scripts press shift, enter, and even PrtSc (printscreen), so I dug up this list off of Kaitnieks Forums. It was created on Kaitnieks by Kylegut. I think there is a list included with SCAR too...

    To use these keys, we will use:

    Code (Text):
    1. KeyDown(KeyCode); (this will hold down the key)
    2. Sleep(time) or wait(time) (this waits before releasing)
    3. KeyUp(KeyCode); (this will release the key)
    4.  
    I recomend KeyDown because not all games work with the sendkeys one ;)

    ######### A-Z #########
    Code (Text):
    1.  
    2. A - 65
    3. B - 66
    4. C - 67
    5. D - 68
    6. E - 69
    7. F - 70
    8. G - 71
    9. H - 72
    10. I - 73
    11. J - 74
    12. K - 75
    13. L - 76
    14. M - 77
    15. N - 78
    16. O - 79
    17. P - 80
    18. Q - 81
    19. R - 82
    20. S - 83
    21. T - 84
    22. U - 85
    23. V - 86
    24. W - 87
    25. X - 88
    26. Y - 89
    27. Z - 90
    28.  
    ######### 0-9 Above A-Z Keys #########
    Code (Text):
    1.  
    2. 0 - 48
    3. 1 - 49
    4. 2 - 50
    5. 3 - 51
    6. 4 - 52
    7. 5 - 53
    8. 6 - 54
    9. 7 - 55
    10. 8 - 56
    11. 9 - 57
    12.  

    ######### "F" Keys #########

    Code (Text):
    1.  
    2. F1 - 112
    3. F2 - 113
    4. F3 - 114
    5. F4 - 115
    6. F5 - 116
    7. F6 - 117
    8. F7 - 118
    9. F8 - 119
    10. F9 - 120
    11. F10 - 121
    12. F11 - 122
    13. F12 - 123
    14. //in case you have 15 of them
    15. F13 - 124
    16. F14 - 125
    17. F15 - 126
    18.  
    ######### Number Pad #########
    Code (Text):
    1.  
    2. 0 - 96
    3. 1 - 97
    4. 2 - 98
    5. 3 - 99
    6. 4 - 100
    7. 5 - 101
    8. 6 - 102
    9. 7 - 103
    10. 8 - 104
    11. 9 - 105
    12. Multiply - 106
    13. Add - 107
    14. Enter - 108
    15. Subtract - 109
    16. Decimal - 110
    17. Divide - 111
    18.  
    ######### Other Keys #########
    Code (Text):
    1.  
    2. Backspace - 8
    3. Tab - 9
    4. Clear - 12
    5. Enter - 13 // next to a-z
    6. Shift - 16
    7. Control - 17
    8. Alt - 18
    9. Capslock - 20
    10. Escape - 27
    11. Spacebar - 32
    12. PageUp - 33
    13. PageDown - 34
    14. End - 35
    15. Home - 36
    16. Left Arrow - 37
    17. Up Arrow - 38
    18. Right Arrow - 39
    19. Down Arrow - 40
    20. Insert - 45
    21. Delete - 46
    22. Help - 47
    23. Numberlock - 144
    24. Semi-Colon / Colon - 186
    25. Equals / Plus - 187
    26. Minus / Underscore - 189
    27. Forward Slash / Question Mark - 191
    28. Apostrophe / Tilde - 192
    29. Open Bracket / Open Brace - 219
    30. Backslash / Seperator - 220
    31. Close Bracket / Close Brace - 221
    32. Quote Key - 222
    33.  
    34. PrintScreen - 44
    35. "Start" Key - 92
    36.  
    Hope that helps the scripters out there ;)
     
  2. test123

    test123 Level IV

    Joined:
    Nov 3, 2006
    Messages:
    935
    Likes Received:
    0
    Location:
    Australia
    hey

    thanks a ton i needed all them
     
  3. chelsea1

    chelsea1 Level IV

    Joined:
    Nov 26, 2006
    Messages:
    2,538
    Likes Received:
    31
    Location:
    London
    thanks for this death i really needed a list like this as sometimes i forget the more obscure ones
     
  4. pandahorde

    pandahorde Level IV

    Joined:
    Dec 17, 2006
    Messages:
    2,249
    Likes Received:
    17
    Location:
    "MANILA ZOO"
    i will save this dude... im gonna used this for my program im gonna make... but 1st i will study how..to make
     
  5. tharoux

    tharoux Level IV

    Joined:
    Dec 30, 2006
    Messages:
    2,733
    Likes Received:
    126
    Location:
    In front of my PC, Montreal
    I've been searching the web for 2 days now to find those informations !!!
    thanks alot !!!! 8)
     
  6. jfur_x

    jfur_x Level III

    Joined:
    Nov 22, 2006
    Messages:
    509
    Likes Received:
    0
    Location:
    SoCal
    Awesome list, thanks! This should be stickied imo. :)

    Edit : Doh, didn't realize this had been dead so long. :oops:
     
  7. Captain Keyes

    Captain Keyes Level II

    Joined:
    Feb 9, 2007
    Messages:
    289
    Likes Received:
    0
    Location:
    The Pillar of Autumn
    I always just used to use:

    KeyDown(GetKeyCode('Char'))

    I could never remember the codes :p
     
  8. gaelle

    gaelle Level IV

    Joined:
    Dec 24, 2006
    Messages:
    796
    Likes Received:
    5
    Location:
    France
    wow thanks guys =) i'm going to try to right a scar script with this ;)