Results 1 to 4 of 4
  1. #1
    odaysawaqed's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    'Murica
    Posts
    135
    Reputation
    23
    Thanks
    1,139
    My Mood
    Buzzed

    Question Map a button to a functional key [F1, F2, F3 ....etc] {Visual Basic}

    Just wondering if there is an easy way of mapping a button in Visual Basic to a function key [F1, F2, F3 ...etc]
    So that when the user press the F1 button inside black ops 2 it recognizes it and it executes a certain {command/function/line of code}?


    Thank you.
    Feel free to Donate



  2. #2
    Horror's Avatar
    Join Date
    Oct 2010
    Gender
    male
    Location
    51,4.
    Posts
    6,940
    Reputation
    574
    Thanks
    5,004
    My Mood
    Twisted
    If GetAsyncKeyState Keys.F1
    Then
    'code here'
    Else
    'something else'

    Put it in a timer, preferably a delay between 100-200 ms. (if you make it too low, it will register the key being pressed x times instead of 1, if you put it too high, it won't register the key press all that often)
     

    Minion+ : February 2014 - January 2015
    Counter Strike: Global Offensive Minion : November 2014 - January 2015
    Alliance of Valiant Arms Minion : August 2014 - January 2015
    Need For Speed World Minion : January 2014 - January 2015
    Rust Minion : January 2014 - January 2015
    Call of Duty Minion : January 2013 - January 2015
    Editor : December 2012 - April 2013
    Donator : March 2014 - Current
    Member : October 2010 - Current

    Previously known as "Isaakske".

  3. #3
    odaysawaqed's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    'Murica
    Posts
    135
    Reputation
    23
    Thanks
    1,139
    My Mood
    Buzzed
    Quote Originally Posted by Horror View Post
    If GetAsyncKeyState Keys.F1
    Then
    'code here'
    Else
    'something else'

    Put it in a timer, preferably a delay between 100-200 ms. (if you make it too low, it will register the key being pressed x times instead of 1, if you put it too high, it won't register the key press all that often)

    THANK YOU
    Feel free to Donate



  4. #4
    odaysawaqed's Avatar
    Join Date
    Oct 2009
    Gender
    male
    Location
    'Murica
    Posts
    135
    Reputation
    23
    Thanks
    1,139
    My Mood
    Buzzed
    never mind. got it to work!
    Last edited by odaysawaqed; 07-25-2013 at 08:12 PM. Reason: i had an issue, but its resolved now :)
    Feel free to Donate



Similar Threads

  1. Replies: 33
    Last Post: 05-17-2014, 09:26 AM
  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. function keys
    By lilcreeplil in forum WarRock Hack Source Code
    Replies: 3
    Last Post: 01-14-2011, 07:42 AM
  4. visual basic hot keys for combat arms
    By bayley60 in forum Combat Arms Coding Help & Discussion
    Replies: 2
    Last Post: 01-08-2011, 12:42 AM
  5. [TUT]D3D Basic functions, Visual Basic 2008
    By Dark_Goliath in forum Visual Basic Programming
    Replies: 8
    Last Post: 11-28-2009, 07:05 PM