PDA

View Full Version : fn+f1 keypress detect



oguzy
14th November 2008, 15:10
Hi all,

At my pyqt4 GUI i developed an on screen display to show wireless status each time the Fn+F1 is pressed. At my laptop Fn+F1 was not working before, and i saw the setkeycodes somehexadecimalnumber <keycode> message at the syslog output. So i assigned a keycode then i checked the xev output to see the keycode at the X environment. Then i assigned a keysysm to it by creating an Xmodmap and then edited the gconf-settings and assign a script to this keypress. After all when i pressed Fn+F1 my script is working. But at my GUI i was not able to detect the event for Fn+F1 key presses. Any idea how can i detect it from Qt4? Indeed none of my hotkeys are being detected by the keyPressEvent except for the brightness up and down. But i am able to detect other keypresses like shift and aphabets.

I am using Ubuntu Hardy with a Gnome desktop environment.

Thanx.

wysota
16th November 2008, 16:21
If there is no scancode generated when that combination is used, it is unlikely Qt will be able to handle it. Your X11 server has to see it to pass it through to the application when Qt can handle it.