the button how to receive key presses

Hi all :
Sorry for my English.
I want to know the GtkButton how to recieve key presses event in my application. In my app, there are three GtkEntries in the left part of the window and three GtkButtons in the right. I want the buttons to receive only the specific alphabetic key (e.g. GDK_a,GDK_b,GDK_c)from the keyboard input and activate the corresponding entry in the callbacks function of the button' key press event.The entrys receive and show the numeric key and not react to the alphabetic key input.  My problem is that when one entry is actived, how can I make the button receive the key press event when I input the alphabetic key.For example,now the first entry is actived(this entry has text ,e.g.1000 ) . I want to press the GDK_b the active the second entry and keep 1000 in the first entry. But when I press GDK_b,it's the first entry that receives and shows the "b" not the first button receive the key presees event. I think the reason is that it's the entry that is getting  the focus not the button.
I don't know how to solve the problem. Any help will be appreciated. Thanks.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]