how can i change the ascii code of keyboard?

Discussion in 'C++' started by ryathegr8, Sep 29, 2010.

  1. ryathegr8

    ryathegr8 New Member

    Joined:
    Sep 29, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    hi
    i want to write a code in which we can change the ascii codes of keyboard in C++. but cant get the logic....can anybody help me??
     
  2. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    19
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    http://www.techgeek.in
    Look the ascii code would be same...The only thing u can do is u can map the original codes to your custom codes....But doing so would not be helpful for u..so for what r u trying to do so??
     
  3. imported_Isa

    imported_Isa New Member

    Joined:
    Sep 1, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Bachelor
    Location:
    shahi(search in fb)
    hi i dont konw what you wanna do but i think this can help you
    Code:
    char key, key1;
    key= getch();
    if (!key)
       key1= getch();
    if (key== char(65) && key1== char(0)) 
       cout<< "The ascii code is 65";  
    
    Be successful :D
     
  4. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    19
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    http://www.techgeek.in
    No Isa he wants to change the ASCII..not to convert to corresponding ASCII...Newayz well tried...
     
  5. go4expert

    go4expert Moderator

    Joined:
    Aug 3, 2004
    Messages:
    306
    Likes Received:
    9
    Trophy Points:
    0
    Why don't you give it a try because I think what Isa has suggested is what I understand from his original question.
     
  6. techgeek.in

    techgeek.in New Member

    Joined:
    Dec 20, 2009
    Messages:
    572
    Likes Received:
    19
    Trophy Points:
    0
    Occupation:
    EOC (exploitation of computers)..i m a Terminator.
    Location:
    Not an alien!! for sure
    Home Page:
    http://www.techgeek.in
    My first reply clearly indicates that "i dnt know"...
     
  7. imported_Isa

    imported_Isa New Member

    Joined:
    Sep 1, 2010
    Messages:
    24
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Bachelor
    Location:
    shahi(search in fb)
    so I thinking. and understand that the ackii code cant chang! and you just can chang its meaning. what did you think? (maybe just in the computer and compiler that I have) OK!
     
  8. Rakesh Kumar Pahwa

    Rakesh Kumar Pahwa New Member

    Joined:
    Jan 13, 2011
    Messages:
    23
    Likes Received:
    0
    Trophy Points:
    0
    U can use low lever keyboard hooks for this... but m not sure k u can do in linux environment... in VC++ using "windows.h" u can do that.... just search low level keyboard hook on google.. and u surely will get some useful information.. if u want I can share full program....
     
  9. SarahSEO

    SarahSEO New Member

    Joined:
    Jan 14, 2011
    Messages:
    25
    Likes Received:
    1
    Trophy Points:
    0
    Occupation:
    SEO
    Location:
    India
    Useful information. Thanks for sharing it.
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice