Intercepting keyboard input

This is a discussion on Intercepting keyboard input within the Windows Programming forums, part of the Platform Specific Boards category; I was wondering, how is it possible to intercept keyboard input no matter what program is running? Reason being is ...

  1. #1
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790

    Intercepting keyboard input

    I was wondering, how is it possible to intercept keyboard input no matter what program is running? Reason being is that I was thinking of writing myself a background process that would intercept keyboard input and execute system commands based on it, such as adding the unix style "CTRL+D" to shutdown a the currently running program, and adding shortcuts so that I could type "CTRL+M" if I wanted to execute Morrowind?

  2. #2
    'AlHamdulillah
    Join Date
    Feb 2003
    Posts
    790
    anyone? this is an honest question.

  3. #3
    Registered User
    Join Date
    Dec 2002
    Posts
    119
    >a background process that would intercept keyboard input
    search the board for keyboard hook

    A suggestion. Consider using the WIN32 APIs to set some system accelerators for the keys you want to grab. look up:
    • LoadAccelerators
    • TranslateAccelerators
    • CreateAcceleratorTable
    • DestroyAcceleratorTable
    • and the ACCEL struct
    If you speak or are learning Spanish, check out this Spanish and English Dictionary, it is a handy online resource.
    What happens is not as important as how you react to what happens. -Thaddeus Golas

  4. #4
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,660
    You don't have to write any code for starting a program; the shell already does this.
    Just create a shortcut to whatever program, goto its properties (via right-click) and give it a shortcut key.

    gg

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interacting with keyboard input.
    By Devils Child in forum C# Programming
    Replies: 4
    Last Post: 06-05-2009, 12:06 AM
  2. Help using inline assembly for keyboard input
    By sleventeen in forum C Programming
    Replies: 7
    Last Post: 05-10-2009, 01:31 AM
  3. Keyboard Input
    By CaliJoe in forum C++ Programming
    Replies: 3
    Last Post: 05-08-2009, 09:51 AM
  4. Keyboard input in a Dialog
    By ksarkar in forum C++ Programming
    Replies: 1
    Last Post: 05-20-2005, 05:39 AM
  5. Need help with Console Keyboard Input
    By pawelx2 in forum Game Programming
    Replies: 5
    Last Post: 05-30-2002, 11:03 PM

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