How do I capture a key press ?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • thanhnh
    New Member
    • Jan 2009
    • 5

    How do I capture a key press ?

    Hi, i'm want to write a small C program in Linux:
    if the user press any key from keyboard, then my program tell us which key was pressed ( including UP_ARROW key, DOWN_ARROW key )

    Help me please ......... :((
    Thanks a lot :)
  • gpraghuram
    Recognized Expert Top Contributor
    • Mar 2007
    • 1275

    #2
    Then you shuld go for MFC functions onKeyDown etc...

    Raghu

    Comment

    • thanhnh
      New Member
      • Jan 2009
      • 5

      #3
      Many thanks to MR. gpraghuram. But in my problems, I want to write the program on Linux. So MFC is not avaiable to apply. Could you tell me a simple solution ? Thanks, alot :)

      Comment

      • shadyabhi
        New Member
        • Dec 2008
        • 18

        #4
        i also asked a silimar question earlier in this forum

        Here is the link:



        I understood the whole thing through this only. Just have a look and surely you will get it

        Comment

        • thanhnh
          New Member
          • Jan 2009
          • 5

          #5
          I give Many thanks to shadyabhi :)

          Comment

          • shadyabhi
            New Member
            • Dec 2008
            • 18

            #6
            The kind of feeling i get after reading such responses keeps me going to participate in forums

            Comment

            Working...