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

Toggle hotkey #156

Closed
oxk4r01 opened this issue Sep 7, 2011 · 11 comments
Closed

Toggle hotkey #156

oxk4r01 opened this issue Sep 7, 2011 · 11 comments

Comments

@oxk4r01
Copy link

oxk4r01 commented Sep 7, 2011

Is there some hotkey for open close treestyletab?

@PaulMEdwards
Copy link

The "Auto hide" options panel has an area with options to "Show tab bar automatically when" containing a checkbox for "Control key is pressed a while" with a user-configurable delay.

When enabled, holding the Control key on your keyboard for the duration specified will show the tab bar and releasing the Control key will hide it again.

Is this not what you want?

@oxk4r01
Copy link
Author

oxk4r01 commented Dec 16, 2011

Hi. Most of the time that hotkey doesn't works. Isn't it possible to allow a custom key combination? Regards.

Óscar

-----Original Message-----
From: Paul M Edwards [mailto:[email protected]]
Sent: jueves, 15 de diciembre de 2011 15:28
To: oxk4r01
Subject: Re: [treestyletab] Toggle hotkey (#156)

The "Auto hide" options panel has an area with options to "Show tab bar automatically when" containing a checkbox for "Control key is pressed a while" with a user-configurable delay.

When enabled, holding the Control key on your keyboard for the duration specified will show the tab bar and releasing the Control key will hide it again.

Is this not what you want?


Reply to this email directly or view it on GitHub:
#156 (comment)

@PaulMEdwards
Copy link

Works for me on Windows 7.
What operating system and version of the same are you using?

As you've undoubtedly discovered, there is no configuration preference in the UI for the actual key used. Sounds like a good feature request.

@oxk4r01
Copy link
Author

oxk4r01 commented Dec 16, 2011

I'm running Windows 7 Enterprise x64. The Ctrl key works just occasionally, and moreover, it just shows the tabs until it's released, I think it will be more useful working in "sticky" mode, as a toggle key, and, of course, allowing the choose of other hotkey combinations. Regards.

Óscar

-----Original Message-----
From: Paul M Edwards [mailto:[email protected]]
Sent: viernes, 16 de diciembre de 2011 15:30
To: oxk4r01
Subject: Re: [treestyletab] Toggle hotkey (#156)

Works for me on Windows 7.
What operating system and version of the same are you using?

As you've undoubtedly discovered, there is no configuration preference in the UI for the actual key used. Sounds like a good feature request.


Reply to this email directly or view it on GitHub:
#156 (comment)

@PaulMEdwards
Copy link

"it just shows the tabs until it's released"
I believe this is behaving as designed; that's how it works for me as well.

"I think it will be more useful working in "sticky" mode, as a toggle key"
That sounds like another good feature request. Are you writing these up or expecting me to do so? ;-)

Sorry, I'm on Win7 Pro SP1 x64 and am running Firefox 8.0.
What version of Firefox are you using?

@oxk4r01
Copy link
Author

oxk4r01 commented Dec 18, 2011

Sorry, but I can't find the feature request page.

Óscar

-----Original Message-----
From: Paul M Edwards [mailto:[email protected]]
Sent: viernes, 16 de diciembre de 2011 21:51
To: oxk4r01
Subject: Re: [treestyletab] Toggle hotkey (#156)

"it just shows the tabs until it's released"
I believe this is behaving as designed; that's how it works for me as well.

"I think it will be more useful working in "sticky" mode, as a toggle key"
That sounds like another good feature request. Are you writing these up or expecting me to do so? ;-)

Sorry, I'm on Win7 Pro SP1 x64 and am running Firefox 8.0.
What version of Firefox are you using?


Reply to this email directly or view it on GitHub:
#156 (comment)

@PaulMEdwards
Copy link

You can write a new thread in this Issues section with a feature request, similar in style to this one:
#133

@shmore
Copy link

shmore commented May 26, 2012

Using pentadactyl i assign the following javascript to a hotkey for toggling.

if(gBrowser.treeStyleTab.tabbarShown){gBrowser.treeStyleTab.hideTabbar()}else{gBrowser.treeStyleTab.showTabbar()}

Might interest someone who wants this feature.

@gregsexton
Copy link

@shmore, you Sir are fantastic. For anyone else interested, this is the full mapping I came up with:

nnoremap -javascript <Tab> if(gBrowser.treeStyleTab.tabbarShown){gBrowser.treeStyleTab.hideTabbar()}else{gBrowser.treeStyleTab.showTabbar()}

@lydell
Copy link

lydell commented Feb 23, 2016

Hi! I’ve used the proposed code in this issue for a long time in a custom keyboard shortcut, and it has worked great! However, since TST 0.16.2016021201 I’ve got a slight problem. Here’s how to reproduce it:

  1. Create a new profile.
  2. Install latest TST.
  3. Enable the “Auto hide > for Normal Window Mode > Auto Hide tab bar” option.
  4. Run the following code from the browser console: gBrowser.treeStyleTab.showTabbar(). Notice how the tab bar shows as expected.
  5. Go back to the main Firefox window by pressing alt+tab or clicking the title bar. Notice how the tab bar stays open as expected.
  6. Press seemingly any key, for example “a”.

Expected: Nothing happens. This is how things used to work before TST 0.16.2016021201.
Actual: The tab bar hides.

Note: If you show the tab bar by moving the mouse to the edge of the screen and the press “a” the tab bar stays open as expected.

I’d really like the tab bar not to hide when I press any key, because I have another custom keyboard shortcut that operates on the tabs and that shortcut is not useful if the tab bar is hidden.

Is there a way to do this? Is there some specific change in the mentioned TST version that causes it?

@lydell
Copy link

lydell commented Feb 24, 2016

The following code is in the wiki:

if (gBrowser.treeStyleTab.tabbarShown) {
  gBrowser.treeStyleTab.hideTabbar();
} else {
  gBrowser.treeStyleTab.showTabbar();
}

A super easy way to try that out is by creating a new keyboard shortcut with the keyconfig extension. I used alt+m when testing this.

The code is supposed to toggle the tab bar. This is not the case anymore.

  1. Press alt+m. The tab bar is shown as expected.
  2. Press alt+m again while the tab bar is shown.

Expected: The tab bar hides. (That’s how it used to work.)

Actual: The tab bar flashes and then remains shown. This is because when I press down alt, the tab bar hides (since TST seems to hide it when you press any key). When I press m, the in the custom shortcut code detects that the tab bar is hidden and therefore re-shows it. Basically, the if check will always be false.

Something has to be done about this in TST, or the wiki must be updated. Any thoughts, @piroor? I think this is pretty important since I got the impression that this is the most requested/used keyboard shortcut. (Providing a public API and letting people implement their own keyboard shortcuts is a great choice, BTW! 👍 )

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