Results 1 to 8 of 8

Thread: Pressing 5 on the Num Pad

  1. #1
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default Pressing 5 on the Num Pad

    I need to press 5 on the numpad (in the bottom right section of the keyboard) instead of the one that is above the letters at the top.
    I'm doing this with MouseKeys on so that when you press 5 it clicks rather than typing in the number 5.
    The keycode is supposed to be 101 I think so I tried this
    SCAR Code:
    KeyDown(101);
    Wait(100);
    KeyUp(101);
    It types in the number 5 and doesn't click.
    It works when I manually press the 5 key on the numpad though.
    Either I need a new keycode or SCAR can't activate mousekeys.

  2. #2
    Join Date
    Feb 2009
    Posts
    2,155
    Mentioned
    4 Post(s)
    Quoted
    42 Post(s)

    Default

    cause your just hiting 101 not 5 r u tring to do the alt thing if not the idk

  3. #3
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    Nope I'm not trying to do alt codes.

  4. #4
    Join Date
    Feb 2008
    Posts
    517
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    cuz 5 and numpad5 are diff buttons

  5. #5
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    cuz 5 and numpad5 are diff buttons
    Yes and 101 is the number for the 5 on the numpad.

  6. #6
    Join Date
    Jan 2007
    Posts
    834
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    SCAR Code:
    IsNumpadKeyDown(byte)
    Could help. 101 is the right keycode.
    A list of it is in my signature.

  7. #7
    Join Date
    Jan 2008
    Location
    Ontario, Canada
    Posts
    7,805
    Mentioned
    5 Post(s)
    Quoted
    3 Post(s)

    Default

    Code:
    0
    4
    8
    12
    21
    124
    256
    260
    268
    277
    380
    I ran this:
    SCAR Code:
    program New;
    var i: integer;
    begin
      for i := 0 to 500 do
        if (isKeyDown(chr(i))) then
          Writeln(IntToStr(i));
    end.
    With the `5' down. Sort through those, one has to be it

    e: its 101 :S but for some odd reason it doesn't register to be when you call isKeyDown.. Talk to Freddy about this.
    Writing an SRL Member Application | [Updated] Pascal Scripting Statements
    My GitHub

    Progress Report:
    13:46 <@BenLand100> <SourceCode> @BenLand100: what you have just said shows you 
                        have serious physchological problems
    13:46 <@BenLand100> HE GETS IT!
    13:46 <@BenLand100> HE FINALLY GETS IT!!!!1

  8. #8
    Join Date
    Jan 2007
    Location
    Tennessee
    Posts
    642
    Mentioned
    0 Post(s)
    Quoted
    1 Post(s)

    Default

    SCAR Code:
    program New;
    var i: integer;
    begin
      repeat
        for i := 0 to 100000 do
        if (IsNumpadKeyDown(i)) then
        Writeln(IntToStr(i));
      until(false);
    end.
    I ran that while pressing the 5 key and it didn't pick up on it.
    It didn't pick it up using IsKeyDown either.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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