traxium / tabtree

Tab Tree extension for Firefox
https://addons.mozilla.org/en-US/firefox/addon/tab-tree/
GNU General Public License v3.0
144 stars 30 forks source link

Compare keys using SDK low-level API if available #150

Closed Fabiensk closed 8 years ago

Fabiensk commented 8 years ago

As described in #132 and as commented in the code, many keyboard layout are not properly managed. This pull request uses the undocumented (but exported) SDK low-level API to convert to something that should work on any keyboard layout. If this API is not available (as it is undocumented), the code will use the previous method of comparing the keys (so it does not stop working with an update of Firefox).

I also wrote another prototype based on the hotkeys high-level API of the SDK. It is cleaner, but it does not work in with the Private windows: the add-on as to be declared as compatible with the Private mode, but I could not find how to do it for an add-on not based on the SDK (SDK-based add-ons declare it in "package.json"). Because of that, I used the low-level API used by "hotkeys".

traxium commented 8 years ago

Thanks, actually long ago I tried to look up how keyboard shortcuts were done in ABP, didn't figured it out entirely and implemented a "light" version.