I have already read all the articles that I could find about how to rebind keys in firefox. I understand the concept of the autoconfig file, have created one for normal s… (read more)
I have already read all the articles that I could find about how to rebind keys in firefox. I understand the concept of the autoconfig file, have created one for normal settings.
But as I understand it I could also rebind keys there with this snippet
```
try {
let { classes: Cc, interfaces: Ci, manager: Cm } = Components;
const Services = globalThis.Services;
const {SessionStore} = Components.utils.import('resource:///modules/sessionstore/SessionStore.jsm');
function ConfigJS() { Services.obs.addObserver(this, 'chrome-document-global-created', false); }
ConfigJS.prototype = {
observe: function (aSubject) { aSubject.addEventListener('DOMContentLoaded', this, {once: true}); },
handleEvent: function (aEvent) {
let document = aEvent.originalTarget; let window = document.defaultView; let location = window.location;
if (/^(chrome:(?!\/\/(global\/content\/commonDialog|browser\/content\/webext-panels)\.x?html)|about:(?!blank))/i.test(location.href)) {
if (window.Tabbrowser) {
// Place your keyboard shortcut changes here
// ...
// ...
}
}
}
};
if (!Services.appinfo.inSafeMode) { new ConfigJS(); }
} catch(ex) {};
```
But the missing piece is the instructions to set the binding for :
alt-j : move one char to the left
alt-i : move up one line
alt-k : move down one line
alt-l : move one char to the right
The closest I get to understand this is with this other snippet
```
// remap Ctrl-J to downloads (removing it from focusing the browser bar)
let search2 = window.document.getElementById('key_search2')
search2.remove();
let openDownloads = window.document.getElementById('key_openDownloads')
openDownloads.setAttribute("modifiers", "accel");
openDownloads.setAttribute("key", "J");
```
But in this case I need to know the values to substitute "key_search2" for the corresponding key bindign "key_charleft","key_previouschar","key_charprev","cmd_charprev"?
Any information on how to accomplish that would be greatly appreciated, thanks.