n8chz / prostetnic

The prostetnic highlighter, a Firefox add-on for highlighting text in web pages.
8 stars 3 forks source link

Changing the keyboard shortcut for highlighting #13

Open leafcutterant opened 6 years ago

leafcutterant commented 6 years ago

I'm aware you no longer maintain this add-on, so instead of a feature request, let me just ask a question.

I want too change the keyboard shortcut for highlighting. Where can I do that in the code?

n8chz commented 6 years ago

The layout for the user interface starts at line 210 of lib/main.js. The desc attribute of each Command instance contains a parenthesized expression that gives the keystrokes associated with the command. These are parsed into hotkey event listeners in the makeHotKey method which starts at line 69.

You should be able to change the keyboard shortcut by changing the letter to another capital letter, or something else that represents a key, such as F12. You should also be able to remove Ctrl- and/or Alt- from the description. Whether you can package, sign and install the modified add-on, I do not know. I've largely given up on that. You definitely won't get it to work on a version higher than 56.