×

Discussion Board

Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Mar 2009
    Posts
    28

    Volume Keys on Nokia N8

    Is there a way to access the volume keys on an N8 using QT?

    I am using the following code but am unable to get a response.


    Code:
    HEADER
    const int EKeyIncVolume = 63552;
    const int EKeyDecVolume  = 63553;
    
    public:
        void keyPressEvent(QKeyEvent *);
    
    
    MAIN
    
    #include <QKeyEvent>
    
    void MainWindow::keyPressEvent(QKeyEvent* event)
    {
            switch (event->nativeVirtualKey())
            {
            case EKeyIncVolume:
                {
                   this->ui->label->setText("Up");
                   break;
                }
            case EKeyDecVolume:
                {
                    this->ui->label->setText("Down");
                    break;
                }
            };
    }

  2. #2
    Regular Contributor
    Join Date
    Aug 2008
    Posts
    95

    Re: Volume Keys on Nokia N8

    I think you must have SwEvent capability to catch Volume Key event.

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    6

    Re: Volume Keys on Nokia N8

    Setting SwEvent not only doesn't help, in fact it prevents the sis from being built. Reason: Reducing capabilities sis only allowed for libs.

    And indeed SwEvent seems to reduce capabilities (imho the capabilitiy to artificially generate key events).

  4. #4
    Regular Contributor
    Join Date
    Sep 2008
    Posts
    286

    Re: Volume Keys on Nokia N8

    SwEvent has nothing to do with this, keys are not implemented in Qt http://bugreports.qt.nokia.com/browse/QTBUG-4415 .

    -Janne
    http://twitter.com/#!/koshui

Similar Threads

  1. Volume control problem on N8
    By zs in forum Symbian Media (Closed)
    Replies: 2
    Last Post: 2010-11-27, 16:50
  2. Detecting volume keys
    By MatuX in forum Qt
    Replies: 3
    Last Post: 2010-09-10, 17:14
  3. Replies: 2
    Last Post: 2009-11-17, 07:11
  4. Volume keys of Nokia 5800 XPressMusic Edition
    By ardsrk in forum Symbian User Interface
    Replies: 3
    Last Post: 2009-05-27, 12:04
  5. Detecting volume up/down keys
    By AliShafa in forum Symbian
    Replies: 3
    Last Post: 2008-04-24, 11:46

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×