disabling key combos

This is a discussion on disabling key combos within the C Programming forums, part of the General Programming Boards category; Code: keybd_event(VK_MENU,0x38,0,0); keybd_event(VK_RETURN,0x1c,0,0); keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0); keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0); This would cause your console program to go full screen without the use of .inf ...

  1. #1
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765

    disabling key combos

    Code:
        keybd_event(VK_MENU,0x38,0,0);
        keybd_event(VK_RETURN,0x1c,0,0);
        keybd_event(VK_RETURN,0x1c,KEYEVENTF_KEYUP,0);
        keybd_event(VK_MENU,0x38,KEYEVENTF_KEYUP,0);
    This would cause your console program to go full screen without the use of .inf files. It does this by "pressing alt+enter". Would there be a way to disable alt+space? Would there be a way to do it the entire time your program was running? If the user were to press alt+space, nothing would happen. How is that done?
    The world is waiting. I must leave you now.

  2. #2
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    probably the use of a different function... that ishow it usually goes
    like this
    Code:
    func_key(char key)
    func_keys_accepted(int args, char key1, char key2... char keyn)
    usually how it works... I'll look into it for ya, tell you if I see anything.
    Finding and learning of all the functions can be a difficult task

    in my quote below, there is a C_Refrence_card... really usefull
    too bad no one uses it or reads the FAQ
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  3. #3
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    Oh I read your reference card....and printed it off for a hard copy. I frequently go back to the FAQ on this site if not for anything less than a learning expierence.

    I was searching google for quite some time and I eventually ended up into the keybd_event stuff and tinkering with things in windows.h. I found some information on MSDN with a function called BlockInput....which is what I might need, but I couldn't make sense of it. I gave up and took a break after some time.
    The world is waiting. I must leave you now.

  4. #4
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    I award shadow the most brilliant user out there.
    Although I am sure other people use the same things but not enough.
    Thanks shadow.
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

  5. #5
    Unleashed
    Join Date
    Sep 2001
    Posts
    1,765
    You see to have PM's disabled Lynux, if you are a real resource buff - during my mass search for my problem (that is pretty much haulting continuation of my program) I found a site. You should check out this link: http://www.infotechuniv.com/index1.htm
    I haven't made much sense of it yet. It looks to be loaded with info.
    Last edited by Shadow; 05-02-2002 at 12:24 AM.
    The world is waiting. I must leave you now.

  6. #6
    Comment your source code! Lynux-Penguin's Avatar
    Join Date
    Apr 2002
    Posts
    533
    oooooooooooh
    SQL for C...
    thanks!


    -Luke
    Asking the right question is sometimes more important than knowing the answer.
    Please read the FAQ
    C Reference Card (A MUST!)
    Pointers and Memory
    The Essentials
    CString lib

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 11-23-2007, 01:48 PM
  2. Virtual keys
    By Arkanos in forum Windows Programming
    Replies: 4
    Last Post: 12-12-2005, 10:00 AM
  3. Directional Keys - Useing in Console
    By RoD in forum C++ Programming
    Replies: 38
    Last Post: 10-06-2002, 05:42 PM
  4. FAQ: Directional Keys - Useing in Console
    By RoD in forum FAQ Board
    Replies: 38
    Last Post: 10-06-2002, 05:42 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21