Results 1 to 2 of 2

Thread: fn+f1 keypress detect

  1. #1
    Join Date
    Sep 2008
    Posts
    12
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11

    Default fn+f1 keypress detect

    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.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: fn+f1 keypress detect

    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.

Similar Threads

  1. Detect Desktop Environment
    By phannent in forum Qt Programming
    Replies: 2
    Last Post: 19th August 2008, 14:31
  2. How to catch "ENTER" with keyPress?
    By lumber44 in forum Qt Programming
    Replies: 8
    Last Post: 30th July 2007, 16:21
  3. Easiest way to detect right mousebutton?
    By Teuniz in forum Qt Programming
    Replies: 7
    Last Post: 21st May 2007, 08:29
  4. Replies: 1
    Last Post: 9th March 2007, 21:07
  5. how to detect key events on a list box?
    By mahe2310 in forum Qt Programming
    Replies: 19
    Last Post: 9th March 2006, 05:23

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.