dgutov / bmreplace

Quickly replace an existing bookmark in Mozilla Firefox
https://addons.mozilla.org/en-US/firefox/addon/bmreplace/
MIT License
24 stars 3 forks source link

On Mac, CTRL+SHIFT modifier is not mapped correctly #25

Closed timrobishaw closed 8 years ago

timrobishaw commented 9 years ago

Using Firefox 35.0.1 on OS X 10.9.5 and Replace Bookmark 1.5.5. In the Preferences, there is an option to select the "Shortcut modifier". I have selected "Ctrl+Shift" with the "Shortcut character" set to b. However, nothing happens when I use the combo CTRL+SHIFT+b. By accident, I noticed that Replace Bookmark is triggered when I use CMD+SHIFT+b, which is terrible since that's the shortcut to Show All Bookmarks. I then tried setting the "Shortcut character" to u, and likewise, CTRL+SHIFT+u does nothing while CMD+SHIFT+u launches Replace Bookmark. Could the CTRL+SHIFT modifier be set to use CTRL and SHIFT as advertised, rather than CMD and SHIFT?

Also, the only way I was able to make the new Shortcut characters stick was to restart Firefox. If this is a necessary step, it would be great to include something to that effect in the Preferences.

dgutov commented 9 years ago

Should I just (try to) change the label to Cmd on Mas OS? It's customary to use that button where on other platforms Ctrl would be used.

Also, the only way I was able to make the new Shortcut characters stick was to restart Firefox

Under what conditions they "didn't stick"?

timrobishaw commented 9 years ago

Maybe that would be a good idea. I know what you mean... that often the CTRL key is replaced by the CMD key when translating shortcut key bindings from Windows/Linux to Mac, but this isn't always so. For instance, when using emacs on a Mac, all the key bindings that use CTRL on Linux do not change to CMD... they remain CTRL. And Macs have both CTRL and CMD keys, so if the instructions say CTRL is the key binding, then it should map to CTRL for a Mac. If it's really the CMD key on a Mac, I suppose there should be a note.

Regarding the Shortcut bindings not taking immediate effect, I also tried to change them on a Linux platform using the same Firefox version (35.0.1) and found the same behavior: if I changed the "Shortcut character" from, say "b" to "u", I needed to restart Firefox before the shortcut would take effect. This occurs on both Mac and Linux. I can repeat this consistently. In other words, here is an example:

(1) Let's assume the default Shortcut for Replace Bookmarks is CTRL+SHIFT+b (2) Open Replace Bookmarks Preferences. (3) Change the Shortcut Character from b to u. (4) Close preferences. (5) Type CTRL+SHIFT+u --- I find nothing happens. Replace Bookmark is not launched. (6) Restart Firefox. (7) Type CTRL+SHIFT+u --- now I find that Replace Bookmarks is launched.

Are you able to see that change in Shortcut character take effect immediately with no restart?

Thanks for your help!

dgutov commented 9 years ago

For instance, when using emacs on a Mac, all the key bindings that use CTRL on Linux do not change to CMD... they remain CTRL.

Isn't that bad? If not for that, you could've continued to use Ctrl-C, Ctrl-V and other standard keys inside Emacs.

And Macs have both CTRL and CMD keys, so if the instructions say CTRL is the key binding, then it should map to CTRL for a Mac. If it's really the CMD key on a Mac, I suppose there should be a note.

I suppose. But the main question is, do you really want to be able to bind Ctrl on a Mac, or do you just want to avoid confusion?

(5) Type CTRL+SHIFT+u --- I find nothing happens. Replace Bookmark is not launched.

Well, it works for me, on Ubuntu GNU/Linux. Is it possible that some other extension interferes? Have you tried the same scenario in a Firefox profile where no other extensions are installed?

dgutov commented 8 years ago

No apparent interest here. Closing.