facing Problem with gdk event key

Hi all,

i need a help regarding GdkEventKey, i would like to divide my problem into 2 sub parts.
1)in my gtkmm application i want
to assign some shortcut keys, to some process., so
my method which handles the key press event :
bool window1::on_window1_key_press_event(GdkEventKey *ev)

i want to trace ctrl-shift F1, so my condition is
if((ev->keyval==GDK_F1)&&((ev->state & 5)==5) && (ev->type ==GDK_KEY_PRESS))
//5 is for shift value of ctrl and shift value.
g_message("U have press ctrl shift F1")

when i pressed the keys, these is condition is never valid or never
occurs, if i trace out ctrl-shift-A, it is properly traced.

can any one tell me, why is it so, and what should i do

2) in KDE environment ctrl+F1 is to change to desktop 1, ctrl+F2 to shift to desktop 2 etc.
but if supposed in my application i had assigned ctrl+F1 shortcut key to some event, and i want that event to be invoke,
instead to change the desktop that system has reserved.

how it could be done.

any help in urgent would greatly be appreciated.

Sagar Shah.

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