Thursday, March 17, 2011

Disabling Ctrl+Q Shortcust without the Keyconfig Extension or its successors

Found here, but worth repeating to raise that page's rank online and propagate the gem it contains, disabling the "quit" keyboard shortcut is a sought-after goal for the shortcut's nearness to the shortcut for closing a tab: many people terminate their browsing session (even with the warning message enabled, apparently, in some versions of the browser due to bugs) accidently while merely attempting to close a tab. I'm not running Windows at the moment, so I don't have a instructions for that OS, though I'd imagine there's a similar global preference utility for the same end as the result of the instructions that follow. An extension for Firefox called "Keyconfig" has been used for this too, but here's how to do it without the extra baggage:

In Ubuntu,

(1) select "System" from the main system menu or toolbar,
(2) select "Preferences",
(3) select "Keyboard Shortcuts";
(4) herein, click the "Add" button, a dialogue box apears;
(5) in the "name" field type a name for this function, such as "CTRL+Q Quit Shortcut Disabled";
(6) in the command box below the name box, enter "/bin/false" (no spaces, caps, or punctuation, i.e. don't use the quotes),
(7) click the "apply" button of this dialogue, the box will close;
(8) back in the keyboard shortcuts box, the result will appear under "customer shortcuts", click on this and while it's highlighted,
(9) push the "CTRL" key, hold it, and subsequently the "Q" key, while still holding the CTRL key; release the key combination (i.e. lift your fingers);

The line under custom command should show the name you gave it, and under the shortcust column show "Ctrl+Q".

(10) Close the "Keyboard Shortcuts" utility; pushing Ctrl+Q should no longer terminate any program that respects the universal preferences as specified by the Keyboard Shortcuts utility; on my system Firefox also obeys.

No comments: