Thread: useing the 'function'(F1, F2.. F12 you know) keys..

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    41

    Question useing the 'function'(F1, F2.. F12 you know) keys..

    How do you check if one of the Function keys have been pressed? Do they produce a character so I can use scanf or some other function to get it into a char variable to see if it's been pressed?

    THX alot!
    CKarl
    THERE IS NO PLACE LIKE 127.0.0.1

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    I assume since you are using scanf, you mean in a dos program. You have to use windows.h, but you can test to see if this function returns true, and if it does the key is pressed. It is:

    GetKeyState(VK_F1);

    It doesn't make a character to scanf so you will have to test the key instead. I hope it works in dos.

  3. #3
    Registered User
    Join Date
    Apr 2003
    Posts
    41
    I'm useing Linux to program on and I'm going to port it to another OS. How do that in Linux?
    THERE IS NO PLACE LIKE 127.0.0.1

  4. #4
    Registered User
    Join Date
    Apr 2003
    Posts
    41
    THX

    Where are some good tutorials on the curses libary? (for later use of curses)
    THERE IS NO PLACE LIKE 127.0.0.1

  5. #5
    ATH0 quzah's Avatar
    Join Date
    Oct 2001
    Posts
    14,826
    Originally posted by Budgiekarl
    THX

    Where are some good tutorials on the curses libary? (for later use of curses)
    Google.

    Quzah.
    Hope is the first step on the road to disappointment.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Simulate Keys with a Keyboard Hook
    By guitarist809 in forum Windows Programming
    Replies: 3
    Last Post: 11-14-2008, 08:14 PM
  2. HUGE fps jump
    By DavidP in forum Game Programming
    Replies: 23
    Last Post: 07-01-2004, 10:36 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 04:42 PM