Change buttons...

This is a discussion on Change buttons... within the C++ Programming forums, part of the General Programming Boards category; I want to change some buttons because my keybord is stupid. The button which is supposed to be Keypad 0 ...

  1. #1
    Pawn, Pascal and C++
    Join Date
    Sep 2005
    Posts
    90

    Change buttons...

    I want to change some buttons because my keybord is stupid.
    The button which is supposed to be Keypad 0 is "insert".

    I know I can change this in my controll pannel somewhere, but just to learn I want to make a program to change this instead =)

    So how would I go on changing buttons?

    Note:
    If you readed some of my other posts, this NOT for the "virus" that I was gonna mess with my friend.

  2. #2

  3. #3
    Pawn, Pascal and C++
    Join Date
    Sep 2005
    Posts
    90
    Doesnt work to change insert to keypad 0 with num lock for me...
    So how do I change buttons?
    Even if you know how to fix it just tell me.

  4. #4
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    If you have an American keyboard (others might work the same way, I don't know) all you have to do is toggle the Numlock key and it will toggle to 0 key between 0 and INS. If you don't believe it, load Notepad (or some other text editor) and try it. Hit the 0 key when Numock is on, then turn Numlock off and hit it again. It that doesn't work then you need to trashcan you keyboard and buy a new one because that feature is standard on all keyboards that have keypads. (I havn't really tried all 10Million keyboards, so I'm doing a little guessing there).

  5. #5
    Pawn, Pascal and C++
    Join Date
    Sep 2005
    Posts
    90
    I got a norwegian keyboard.
    Well it actually works when I tryed in notepad, but it doesnt in counter-strike
    (With many cs cheats you need to press insert to get the cheat menu)
    But anyway, just tell me how to change buttons/make hotkeys

  6. #6
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    counter-strike is probably the problem. In that case there is not much you can do about it. If you want a 0, use the 0 on the number row (top row) of the standard keyboard keys.

    But one of this has anything at all to do with C or C++ programming -- it isn't a programming issue, but you just learning how to use your keyboard.

    If you want to change buttons and keys inside a MS-Windows program that YOU are writing, that is a different story.

  7. #7
    Pawn, Pascal and C++
    Join Date
    Sep 2005
    Posts
    90
    Yes I just want to know how to change the buttons with MY CODE.
    Like change the "b" button to "Ancient Dragon".
    Please tell me how to do that and forget about the insert and kp 0....

  8. #8
    Registered User
    Join Date
    Aug 2005
    Posts
    1,267
    that cannot be easily done. when you press a key, the keyboard driver sends an event to your application program that contains the key and scancode (see MSDN for WM_KEYDOWN event description). How your program catches that event depends on how you write your program. If the program is win32 api only, then handle it in the window's WinProc() function. Here is a good tutorial.

  9. #9
    Pawn, Pascal and C++
    Join Date
    Sep 2005
    Posts
    90
    Quote Originally Posted by Ancient Dragon
    that cannot be easily done. when you press a key, the keyboard driver sends an event to your application program that contains the key and scancode (see MSDN for WM_KEYDOWN event description). How your program catches that event depends on how you write your program. If the program is win32 api only, then handle it in the window's WinProc() function. Here is a good tutorial.
    Hmmm... I think ill skip it to another time when I got more knowlegde :P

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. c++builder6 change form names problem
    By Leite33 in forum C++ Programming
    Replies: 2
    Last Post: 06-09-2008, 09:20 AM
  2. how to change static char* and not lose mem ?
    By jabka in forum C Programming
    Replies: 15
    Last Post: 09-07-2007, 06:33 PM
  3. How to change the color of Buttons and edit controls
    By jayapalchandran in forum Windows Programming
    Replies: 2
    Last Post: 08-26-2006, 11:47 AM
  4. Replies: 2
    Last Post: 11-08-2002, 03:22 AM
  5. Replies: 2
    Last Post: 09-04-2001, 03:12 PM

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