1

How can I disable Ctrl+Q shortcut to close the current app in Ubuntu?

I have seen the top answer under: How can I disable Ctrl+Q for all applications (system wide)? which suggests assigning Ctrl+Q to /bin/false/.

I don't think this should be an accepted answer since some apps that use Ctrl+Q like IntelliJ IDEA won't work with this shortcut anymore.

gsettings get org.gnome.desktop.wm.keybindings close produces only Alt + F4

I use Ubuntu 18.04

abu_bua
  • 10,783
fyrkov
  • 293
  • 2
  • 10
  • Have you tried to create a [useless] shortcut for Ctrl+Q ? I think it would then execute this one instead of the default behaviour (overriding it). – Johannes Lemonde Nov 05 '18 at 15:16
  • This is exactly what suggested in the top answer under related post, but unfortunately this will break Ctrl-Q shortcut in IDEA. – fyrkov Nov 05 '18 at 18:40
  • 1
    The top answer's first suggestion is to disable it in your application. Ctrl+q indeed is an application level shortcut, as opposed to the system wide Alt+F4. If you disble it system wide, then obviously it also will not work in applications that use Ctrl-Q differently. – vanadium Nov 06 '18 at 08:00

1 Answers1

1

It appeared that I mistakenly considered Ctrl+Q as a system-wide shortcut because it closed Firefox, files explorer and Atom editor.
But in fact, it is just a common shortcut for many apps, so it has nothing to do with Ubuntu/Gnome.
The solution in my case was to disable the shortcut separately in each app.

abu_bua
  • 10,783
fyrkov
  • 293
  • 2
  • 10