Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Keyboard shortcut for switching between groups #6

Closed
quzaq opened this issue Nov 24, 2017 · 20 comments
Closed

Keyboard shortcut for switching between groups #6

quzaq opened this issue Nov 24, 2017 · 20 comments

Comments

@quzaq
Copy link

quzaq commented Nov 24, 2017

It would be great if I could switch between groups using keyboard, e.g. with shortcut ctrl + ` (like in Quicksaver's add-on).

Even without this feature, thank you for developing this add-on!
Menu-like window looks and works really nice for me :-)

@misterHippo
Copy link

misterHippo commented Dec 4, 2017

Similar to above, the current Ctrl + [number] conflicts with the native tab switching within Firefox. I just tried to switch from my current tab, to the first tab (usually Ctrl + 1) and it switched groups.

It would be great if the add-on could be coded to use Ctrl + Shift + [number], or give customisation ability to the user to allow them to choose the modifiers involved.

The add-on is great, and the old Tab-Groups was a must - but I'm afraid that this break in Firefox's expected functionality is really hampering my day-to-day usage.

@daef
Copy link

daef commented Dec 4, 2017

what @misterHippo said - breaking Ctrl+[N] is a no go! I heavily rely in Ctrl+[1-8] for the first eight, Ctrl+9 for the last and Ctrl+0 for 100% zoom, those shortcuts are already taken

@quzaq
Copy link
Author

quzaq commented Dec 4, 2017

I'm under big impression of your work @Drive4ik.

I'd like only to say that what I originally proposed is to have shortcut just for switching to next tab group. In such case only one shortcut would be needed (or two if switching to previous group would be also implemented).

I still think that following shortcut(s) would be simple and non-conflicting (and compatible with Quicksaver's Tab Groups Panorama add-on):

  • next group: Ctrl + ` (` used here is a grave accent)
  • previous group: Ctrl + ~ (so Ctrl + Shift + ` ) (~ used here is an tilde)

@Drive4ik
Copy link
Owner

Drive4ik commented Dec 4, 2017

Hi everyone! Sory but this is not supported
https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/commands#Shortcut_values

key (mandatory). This can be any one of:
the letters A-Z
the numbers 0-9
the function keys F1-F12
Comma, Period, Home, End, PageUp, PageDown, Space, Insert, Delete, Up, Down, Left, Right

@Drive4ik Drive4ik added Done and removed TODO labels Dec 4, 2017
@Drive4ik
Copy link
Owner

Drive4ik commented Dec 4, 2017

It may be better to do Ctrl + Space and Ctrl + Shift + Space or Ctrl + Alt + Space for prev group?

@White-Owl
Copy link

Ctrl+Space is a common thing for smart-typing in various editors. So it would confuse me greatly to have it as a switcher.
I personally would prefer to have Ctrl+F1 as a 'next-group' hot-key.

Why not just give user a text-field to enter his/her own preferable hot-key?

@Drive4ik
Copy link
Owner

Drive4ik commented Dec 4, 2017

@White-Owl

Why not just give user a text-field to enter his/her own preferable hot-key?

This is not posible.
I gave the link from above

Each shortcut is defined with a name, a combination of keys, and a description. Once you've defined some commands in manifest.json, you can listen for the associated key combinations using the commands JavaScript API.

That is, only specially pre-defined keyboard shortcuts will work, making them dynamic is not possible.

@misterHippo
Copy link

misterHippo commented Dec 4, 2017

@White-Owl - I believe Ctrl + F[n] is used by other software that is overarching (ie: nVidia). I think this is why Ubisoft's Uplay uses Shift + F[n]

I stand by my suggestion of Ctrl + Shift + [n]. It is similar in functionality to the change tab, but is different in 'order of magnitude', if you will. And the addition of the shift key to the command reflects that.

And we know that's achievable too, as the very first thing on the page @Drive4ik linked was an example of Ctrl+Shift+Y ( https://developer.mozilla.org/en-US/Add-ons/WebExtensions/manifest.json/commands ) ... Although, I suppose this depends on Moz's definition of Shift as a modifier. Does Ctrl+Shift+1 == Ctrl+! ... mmmm. Testing?

Regarding the Next Group / Previous Group hot-keys: these wouldn't necessarily mean much to me, as I always many groups open - more than prev/next would be helpful for. 'Knowing' them by their ID is much more user-friendly for me. #programmer However, I'm sure other people would love these. Perhaps we could make use of Ctrl + Shift + N and Ctrl + Shift + P - or even Ctrl + Shift + , and Ctrl + Shift + .?

@debuggings
Copy link

How about press ctrl+shift+E to open a popup, then press 1 or 2 or 3 to open each group.

@quzaq
Copy link
Author

quzaq commented Dec 5, 2017

@Drive4ik Ok, I didn't know about these keyboard shortcut constraints you mentioned.

For me, both @misterHippo's proposals are just fine.

I would prefer single step shortcut as switching more than once using popup (proposed by @debuggings) seems too cumbersome to me.

@Drive4ik
Copy link
Owner

Drive4ik commented Dec 5, 2017

Hi everyone!
@19390917 I'm just trying to explain that now api has a very meager functional
I also do not like it, I want to implement everything that I want in the life of the add-on, but api hinders me and I can not do anything about it...

@debuggings

How about press ctrl+shift+E to open a popup, then press 1 or 2 or 3 to open each group.

Sory, but this functional not working now, blocked by https://bugzilla.mozilla.org/show_bug.cgi?id=1324255
When this bug is fixed, my addon will automatically start working with this functionality.
Not 1,2,3 keys, but Up, Down, Left, Right will work.

Now I choose between
number 1:
F8 - Open popup
Ctrl+Comma (Ctrl+,, Ctrl+<) - load previously group
Ctrl+Period (Ctrl+., Ctrl+>) - load next group
and
number 2:
F8 - Open popup
Ctrl+F1 - load previously group
Ctrl+F2 - load next group

Who votes for what?

@misterHippo
Copy link

G'day @Drive4ik - If I had to put my weight behind one of the two listed options in your last post, I would vote for Option 1 ( <& >), as I feel that has more semantic value.

Although, I would still like to hear the results of testing the Ctrl + Shift + 1 (etc). I know that it appears from the docs that this may not work, until tested and proven, I still hold out hope for it! :) #everhopeful

@Drive4ik
Copy link
Owner

Drive4ik commented Dec 6, 2017

Hi @misterHippo ! I use another addon "KeePass" that uses Ctrl + Shift + 1, Ctrl + Shift + 2, Ctrl + Shift + 4, Ctrl + Shift + 6...
Maybe I misunderstood and you want to use Ctrl + Shift + 1, Ctrl + Shift + 2 in the open popup window, or Ctrl + Shift + 1 load prev group and Ctrl + Shift + 2 load next group. Or, Ctrl + Shift + 2 load the group which has the 2nd position in the groups list?

@misterHippo
Copy link

G'day @Drive4ik - I was hoping for similar functionality as the Ctrl+1 (etc) gives for the tabs in Firefox normally. That is to say, Ctrl+Shift+1 would take me to the first group, while Ctrl+Shift+6 would take me to the 6th group. Still allowing me to use Ctrl+1 to go to the first tab within current group, and Ctrl+7 takes me to the 7th tab within the current group.

I wasn't aware that KeePass used the Ctrl+Shift+[n] format. Are you able to use Alt as a modifier rather than shift?

(Perhaps the best initial move is to allow users to disable hot-keys/shortcut keys? This would immediately improve my situation.)

Drive4ik pushed a commit that referenced this issue Dec 7, 2017
@quzaq
Copy link
Author

quzaq commented Dec 7, 2017

@Drive4ik - If it's not too late then I would vote rather for Option 2 (F8 and Ctrl+F1 / Ctrl+F2).

Semantically, same as for @misterHippo, Option 1 looks better for me. But for my fingers Option 2 seems to be more convenient:

  • in option 2 I press F8 with right hand and almost instantly Ctrl+F1 / Ctrl+F2with my left hand
  • in option 1 I press F8 with right hand but to press Ctrl+, / Ctrl+. I have to move my right hand from F8 to , or .

But I won't have hard feelings if you choose option 1.

@Drive4ik
Copy link
Owner

Drive4ik commented Dec 7, 2017

Hi evetyone!

Please update addon to latest version
Added there
MacCtrl+Shift+Coma (MacCtrl+Shift+[<,]) - load prev group
MacCtrl+Shift+Period (MacCtrl+Shift+[>.]) - load next group
MacCtrl+Shift+[1-9] - load group by index

Add options to disable keyboard shortcut if not used or if it's has conflict with another addon

@Drive4ik
Copy link
Owner

Drive4ik commented Dec 7, 2017

@19390917 I thought that option 1 with minor changes would be a more correct solution

@misterHippo
Copy link

Ah! You did it! :) Well done.

I like the settings too. Very tidy. (I'll start another ticket for spelling / grammar - unless there's one already)

@quzaq
Copy link
Author

quzaq commented Dec 8, 2017

For me it's just great! :-)
I'm very glad that that going through popup is not needed.

Thank you very much @Drive4ik for taking care of this feature!

@Drive4ik
Copy link
Owner

Drive4ik commented Dec 8, 2017

Thank you all guys for your help! 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants