Keyboard shortcut in Qt Creator



  • I'd like to change the keyboard shortcuts for switching between different modes i.e. edit, design, debug, and project. I set my preferred keyboard shortcuts through Tools -> Options -> Environment -> Keyboard tab. I then apply the changes and close the Option window. The shortcuts work properly. I check the QtCreator.ini file and confirm that they are saved under [KeyboardShortcuts] category as:

    QtCreator.Mode.Design=Ctrl+1
    QtCreator.Mode.Edit=Ctrl+`
    QtCreator.Mode.Mode.Debug=Ctrl+2
    QtCreator.Mode.Project=Ctrl+3
    

    Now, I close Qt Creator and check the QtCreator.ini again and confirm that the newly modified shortcuts are still there. However, when I run Qt Creator again, it changes the QtCreator.ini and removes two of my shortcuts. This is what it has now:

    QtCreator.Mode.Design=Ctrl+1
    QtCreator.Mode.Edit=Ctrl+`
    

    I repeated this process couple of times with no luck. How can I fix this? Is this a bug?

    (I am using Qt Creator 4.5.2 in Linux.)


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Just for checking, does it also happen if you replace the shortcut for QtCreator.Mode.Edit by Ctrl+4 ?



  • Hello,

    As you could tell from my question, the QtCreator.Mode.Edit is working just fine with my new keyboard shortcut as it is not the problem. QtCreator.Mode.Mode.Debug and QtCreator.Mode.Project are the problem. They work just fine when I set the new keyboard shortcuts for them. However, as soon as I restart Qt Creator, it resets them back to their original keyboard combination.


  • Qt Champions 2017

    Hi @Neshom

    I guess bugreports.qt.io is then your place to go.

    Regards


  • Lifetime Qt Champion

    That was clear, my test suggestion was to determine whether it is the Ctrl+ ` that is not parsed correctly and thus gives you that behaviour.


  • Qt Champions 2017


  • Qt Champions 2017

    @Neshom Can you please close this thread now as SOLVED? Thanks.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.