Disable firefox control keys / restore Windows "defaults"?
I'd like to be able to use the (Windows) control keys like Ctrl-B, Ctrl-I, and Ctrl-U to turn bold, italics, and underline on when in a web page text entry box that allows those settings. That's the usual default in Window in text entry programs.
I am fairly sure Ffox used to allow these keys to pass through and/or had this behavior programmed. Now the first two kick up the bookmarks and the last brings up source code. It would even be better if they did nothing, vs. this.
Is there a way to tell Firefox to let the default features work? Or was this specifically programmed behavior before and its changed? Perhaps I can alter a config file?
Thanks,
Alle antwoorden (14)
Hello MozzieBob,
Would you please take a look at this thread :
https://support.mozilla.org/en-US/questions/1252519
I'm not sure, but maybe you could give the add-ons I mention
there a try ?
McCoy: I think you posted the wrong link... that's this thread :-)
Oops - sorry !
'Don't know what happened, but it should have been this link :
Hi MozzieBob, there is a permission for pages to override built-in keyboard shortcuts. It is allowed by default, but you could double-check:
While on a page where you want the editor to handle Ctrl+b, call up the Permissions panel of the Page Info dialog using any of these:
- right-click a blank area of the page and choose View Page Info > Permissions
- (menu bar) Tools menu > Page Info > Permissions
Scroll down to "Override Keyboard Shortcuts" and uncheck the "Use default" box, and then select the Allow permission.
Any change?
Is there an example page where you see the problem that you could link to?
Firefox 65 removed one method websites used to be able to use to detect key combinations that don't generate a character, such as Ctrl+b. Some sites may need to update to continue to detect them, depending on the method they were using.
https://www.fxsitecompat.com/en-CA/docs/2018/non-printable-keys-no-longer-fire-keypress-event/
This page has an example of how to block Ctrl+b, Ctrl+i, and Ctrl+u from performing their usual functions in Firefox 65:
https://www.jeffersonscher.com/res/keyvents.html
You can test with and without the box checked. If you don't see a difference -- the blocking doesn't work -- check the "Override keyboard shortcuts" permission on the Permissions panel of the Page Info dialog ("Allow" is needed to make it work).
McCoy: Changing the permissions to 1 didn't have and effect. Restarting browser made no difference.
jscher2000: - No change by toggling this feature either way. Restarting browser made no difference. - I tried out the sample page where the keys are blocked... that works. But I am not the site builder in this case but the site user. So, I can't incorporate that code in the pages/site. - I could dig in the pages to try to figure out if they are using keypress or keydown events, but I don't know that it would matter.
If you want to test for yourself, I'm using this forum: saabcentral.com and doing a reply to any post. The same software is in use in many forums. You will have to subscribe to the forum (no cost) to test /get the editor options for bold, italic, underline in the reply-editor. The editor for the non-subscribed users seems to lack the text attribute features. You don't have to post the reply, you only need to bring up the editor to test
MozzieBob said
McCoy: Changing the permissions to 1 didn't have and effect.
That's what the thread I gave you a link to was about .....
I was hoping that maybe you would give one of the add-ons I mentioned a try.
MozzieBob said
If you want to test for yourself, I'm using this forum: saabcentral.com and doing a reply to any post. The same software is in use in many forums. You will have to subscribe to the forum (no cost) to test /get the editor options for bold, italic, underline in the reply-editor.
That board uses BBCode. Some BBCode editors may recognize keyboard shortcuts. When you use the site in other browsers such as Internet Explorer 11 or Google Chrome, does Ctrl+b work there?
The worthless, slow, bug-ridden browser known as Internet Error 11 has some issues of its own. The ctrl-keys will turn on the features (bold, italic) as will the button-tools in the editor - but neither turns them back off i.e. once bold is on in a section, it stays on. But, that seems like a different issue since even the tools don't turn it off.
In Chrome, the Ctrl-B & Ctrl-I have NO function. They don't work, but they don't pop the annoying Bookmarks window-pane like FFox. Ctrl-U pops the source code as does FFox.
I'd be happy with NO resulting action on those key presses. It's unfortunate when they don't work, but it's worse when they don't work and force me to grab the mouse and dismiss the Bookmarks pane.
I'm also going to take a look at the add-ons McCoy posted... see if any of those will help. But, I'm open to new suggestions.
This script, run in the Web Console on a sample SAAB Central forum page, will kill the keys in the reply box:
function ctrlbiu(evt){ if(evt.ctrlKey && (evt.key.toLowerCase() == 'b' || evt.key.toLowerCase() == 'i' || evt.key.toLowerCase() == 'u')){ evt.stopPropagation(); evt.preventDefault(); } } document.getElementById('vB_Editor_001_iframe').contentWindow.document.body.addEventListener('keydown', ctrlbiu, false); document.getElementById('vB_Editor_001_iframe').contentWindow.document.body.addEventListener('keyup', ctrlbiu, false);
(But when I try to add code to trigger the buttons (synthetic click), it doesn't work. It changes the state of the button so it looks pushed in, but the text formatting doesn't change. So that is a puzzle yet to be solved.)
To make it easier to run, you can install it as a bookmarklet, which is a script masquerading as a bookmark that you can execute by clicking the bookmark. You can install from here:
https://www.jeffersonscher.com/res/sumomarklets.html#saabbiu
MozzieBob,
If you aren't familiar with what bookmarklets are and how to use them, see these pages for a quick explanation: http://www.bookmarklets.com/ http://www.worldtimzone.com/bookmarklets/
Just drag the blue SAAB-biu button onto your Bookmarks Toolbar from the page that jscher2000 linked.
I have a couple of hundred bookmarklets which I have saved over the last 20 years. Very handy to modify web pages or change the user interaction on-the-fly.
Thanks... I will do some reading and try implementing that code.