Page 1 of 2 12 LastLast
Results 1 to 15 of 19
  1. #1
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad

    Post Map a button to a functional key [F1, F2, F3 ....etc] [C++]

    As The Title Says :P

  2. #2
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,703
    My Mood
    Cheerful
    What ?
    Is this a question or source ?(Prefix = Info)
    Last edited by Lovroman; 08-26-2013 at 06:56 AM.

  3. #3
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad
    Quote Originally Posted by Lovroman View Post
    What ?
    Is this a question or source ?(Prefix = Info)
    I Mean how can i map the keys in c++ ???

  4. #4
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,703
    My Mood
    Cheerful
    Quote Originally Posted by BCxSocial(B) View Post
    I Mean how can i map the keys in c++ ???
    Use GetAsyncKeyState.

    Code:
    if(GetAsyncKeyState(VK_UP) & 0x8000) //Is key Up pressed 
    {
     //Do something
    }

  5. #5
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad
    Quote Originally Posted by Lovroman View Post
    Use GetAsyncKeyState.

    Code:
    if(GetAsyncKeyState(VK_UP) & 0x8000) //Is key Up pressed 
    {
     //Do something
    }
    Thanks I Will Try it Later but that "0x8000" is what ????

  6. #6
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,703
    My Mood
    Cheerful
    Quote Originally Posted by BCxSocial(B) View Post
    Thanks I Will Try it Later but that "0x8000" is what ????
    "Is key is pressed".

  7. #7
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad
    Quote Originally Posted by Lovroman View Post
    Use GetAsyncKeyState.

    Code:
    if(GetAsyncKeyState(VK_UP) & 0x8000) //Is key Up pressed 
    {
     //Do something
    }
    ok That's the Value and its Wrong -_- Value of VK_UP is 0x26

  8. #8
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,703
    My Mood
    Cheerful
    Quote Originally Posted by BCxSocial(B) View Post
    ok That's the Value and its Wrong -_- Value of VK_UP is 0x26
    Fail.
    0x8000 isn't key value.
    0x8000 is always same.

  9. #9
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad
    Quote Originally Posted by Lovroman View Post
    Fail.
    0x8000 isn't key value.
    0x8000 is always same.
    ok let me Try :/

  10. #10
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad
    Quote Originally Posted by Lovroman View Post
    Fail.
    0x8000 isn't key value.
    0x8000 is always same.
    How to Combine 2 keys ??? For eg ctrl + enter.... like that should be the syntex ???

  11. #11
    Lovroman's Avatar
    Join Date
    Sep 2012
    Gender
    male
    Posts
    9,430
    Reputation
    611
    Thanks
    9,703
    My Mood
    Cheerful
    Quote Originally Posted by BCxSocial(B) View Post
    How to Combine 2 keys ??? For eg ctrl + enter.... like that should be the syntex ???
    if(GetAsyncKeyState(VK_CONTROL) & GetAsyncKeyState(VK_ENTER) & 0x8000)
    {

    }


  12. #12
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad
    Quote Originally Posted by Lovroman View Post
    if(GetAsyncKeyState(VK_CONTROL) & GetAsyncKeyState(VK_ENTER) & 0x8000)
    {

    }

    Thankx /msg2short :P

  13. #13
    ^peace's Avatar
    Join Date
    Jul 2013
    Gender
    male
    Location
    California
    Posts
    332
    Reputation
    21
    Thanks
    35
    Quote Originally Posted by BCxSocial(B) View Post
    Thankx /msg2short :P
    Didnt work for me o.o

  14. #14
    xVIRUZx's Avatar
    Join Date
    Feb 2013
    Gender
    male
    Posts
    248
    Reputation
    10
    Thanks
    48
    My Mood
    Drunk
    Quote Originally Posted by ^peace View Post

    Didnt work for me o.o
    Try using this instead:
    Code:
    if(GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_ENTER)) 
    {
    // do something
    }
    Also, I don't see why 0x8000 is needed.

  15. #15
    BCxSocial(B)'s Avatar
    Join Date
    Aug 2013
    Gender
    male
    Posts
    27
    Reputation
    10
    Thanks
    3
    My Mood
    Sad
    Quote Originally Posted by xVIRUZx View Post
    Try using this instead:
    Code:
    if(GetAsyncKeyState(VK_CONTROL) && GetAsyncKeyState(VK_ENTER)) 
    {
    // do something
    }
    Also, I don't see why 0x8000 is needed.
    Me too :/ /Msg2Short

Page 1 of 2 12 LastLast

Similar Threads

  1. [Help] Map a button to a functional key [F1, F2, F3 ....etc] {Visual Basic}
    By odaysawaqed in forum Call of Duty Black Ops 2 Coding, Programming & Source Code
    Replies: 3
    Last Post: 07-25-2013, 06:37 PM
  2. [Request] Request to use " Function Keys " for casting / using skills.
    By kroem in forum Dragon Nest Discussions
    Replies: 8
    Last Post: 04-10-2013, 10:36 PM
  3. Replies: 3
    Last Post: 12-07-2012, 11:31 AM
  4. [WTS] Selling over 50+ Legit Arma 2 Operation Arrowhead CD KEYS ( I replace invalid etc)
    By iberdy in forum DayZ Selling / Trading / Buying
    Replies: 3
    Last Post: 12-03-2012, 03:20 PM
  5. function keys
    By lilcreeplil in forum WarRock Hack Source Code
    Replies: 3
    Last Post: 01-14-2011, 07:42 AM