Important: Please read the Qt Code of Conduct -

Problem in detection of special keys...

  • Hello,

    I have written simple program to detect key strokes.
    I'm able to detect normal keyboard keys but not the special function keys like, volume up, volume down, mute etc...
    i received key value [16777251] for all of this keys, vol+ [115], vol- [114] and mute [113]...

    is there anything else i need to do.???

    Item {
    width: 100
    height: 100
    focus: true
    Keys.onPressed: {
    console.log("key pressed: " + event.key);
    event.accepted = true;

  • Moderators

    Probably you need to use OS-specific APIs... or test with Qt5 - there might have been a change there (definitely was for mouse buttons).

Log in to reply