Please add keyboard shortcuts for New Identity and New Tor Circuit for this Site
Please add keyboard shortcuts for New Identity and New Tor Circuit for this Site
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
Trac:
Keywords: N/A deleted, tbb-usability, tbb-torbutton added
Component: Torbutton to Tor Browser
Owner: N/A to tbb-teamThe New Identity part of this ticket is a duplicate of #17500 (moved). Should we have one ticket for each keyboard shortcut or just keep this one?
I think the latter assuming that both shortcuts seem like a reasonable idea and we provide both at the same time. Marking #17500 (moved) as a duplicate.
- Author
Here's what I propose:
New Identity: Ctrl/Cmd + Shift + U New Tor Circuit for this Site: Ctrl/Cmd + Shift + L
According to this https://support.mozilla.org/en-US/kb/keyboard-shortcuts-perform-firefox-tasks-quickly, none of them are in use.
Thoughts?
- Author
I've tried to implement this myself, but didn't get it to work.
torbutton.js:
var { Hotkey } = require("sdk/hotkeys"); var torbutton_hotkey_new_circuit = Hotkey({ combo: "accel-shift-l", onPress: function() { torbutton_new_circuit(); } }); var torbutton_hotkey_new_identity = Hotkey({ combo: "accel-shift-u", onPress: function() { torbutton_new_identity(); } });
What could be the problem? Is it some isolation in TBB that's not allowing a hotkey listener?
Trac:
Status: new to needs_revision Replying to cypherpunks:
I've tried to implement this myself, but didn't get it to work.
torbutton.js: {{{ var { Hotkey } = require("sdk/hotkeys"); ... }}}
What could be the problem? Is it some isolation in TBB that's not allowing a hotkey listener?
Your code is written for an Add-on SDK based extension, but Torbutton is an old-style XUL extension. I have not tried this kind of thing lately, but adding an accesskey attribute to the correct menuitem should work. Some references: https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Tutorial/Keyboard_Shortcuts https://developer.mozilla.org/en-US/docs/Mozilla/Tech/XUL/Attribute/accesskey
Trac:
Cc: N/A to mcsHere's a small patch that adds the hotkeys to the current TorBrowser 5.5.5. The "keyset" in torbutton.xul does the work. The change in popup.xul just makes it so the shortcuts are displayed next to the commands in the torbutton menu. Works for me. Thanks cypherpunks and mcs for leading the way.
--- chrome/content/popup.xul.orig 2000-01-01 00:00:00.000000000 -0700 +++ chrome/content/popup.xul 2016-05-23 00:00:00.000000000 -0700 @@ -19,11 +19,13 @@ <menuitem id="torbutton-new-identity" label="&torbutton.context_menu.new_identity;" accesskey="&torbutton.context_menu.new_identity_key;" + key="torbutton-new-identity-key" insertafter="context-stop" oncommand="torbutton_new_identity()"/> <menuitem id="torbutton-new-circuit" label="&torbutton.context_menu.new_circuit;" accesskey="&torbutton.context_menu.new_circuit_key;" + key="torbutton-new-circuit-key" insertafter="context-stop" oncommand="torbutton_new_circuit()"/> <menuseparator/> --- chrome/content/torbutton.xul.orig 2000-01-01 00:00:00.000000000 -0700 +++ chrome/content/torbutton.xul 2016-05-23 00:00:00.000000000 -0700 @@ -45,4 +45,11 @@ context="torbutton-context-menu" /> <!-- <statusbarpanel context="clipmenu" class="statusbarpanel-iconic" id="plugins-status" tooltip="plugin-tooltip" onclick="torbutton_toggle_plugins();"/> --> </statusbar> + + <!-- Global keyboard shortcuts for new identity and new circuit. --> + <keyset> + <key id="torbutton-new-identity-key" modifiers="accel shift" key="U" oncommand="torbutton_new_identity()"/> + <key id="torbutton-new-circuit-key" modifiers="accel shift" key="L" oncommand="torbutton_new_circuit()"/> + </keyset> + </overlay>
Trac:
Username: cpwcThanks, putting that onto our review radar.
Trac:
Keywords: N/A deleted, TorBrowserTeam201605R added
Status: needs_revision to needs_reviewThanks, this makes it into 6.0: commit e546a3f158b6fc39c66e323eaa7b8463caef599c on master has the patch.
Trac:
Status: needs_review to closed
Resolution: N/A to fixed- Trac closed
closed
- cypherpunks mentioned in issue #18135 (moved)
mentioned in issue #18135 (moved)
- Trac mentioned in issue #27516 (moved)
mentioned in issue #27516 (moved)
- Trac mentioned in issue tpo/applications/tor-browser#27516 (closed)
mentioned in issue tpo/applications/tor-browser#27516 (closed)