Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

disable Ctrl w #445

Closed
quantum-booty opened this issue Sep 30, 2020 · 2 comments
Closed

disable Ctrl w #445

quantum-booty opened this issue Sep 30, 2020 · 2 comments

Comments

@quantum-booty
Copy link

Ctrl w closes the qt console, is it possible to remap/disable it?

@cmaureir
Copy link

Hey @quantum-booty, that shortcut comes from QtGui.QKeySequence.Close, since it's a standard way to define such action cross-platform:
Screenshot_2020-10-17 QKeySequence Class Qt 4 8

I'd advise you not to attempt to override widely known/used shortcuts for Qt-based applications,
but if you really want to know where this is, you can look on the qtconsole/mainwindow.py file, where the action is defined:

        self.close_action=QtWidgets.QAction("&Close Tab",                                           
            self,                                                                                   
            shortcut=QtGui.QKeySequence.Close,                                                                                                                                                                       
            triggered=self.close_active_frontend                                                    
            ) 

@quantum-booty
Copy link
Author

Thank you, I commented out that block of code. Now Ctrl+w is disabled.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants