{"data":{"markdownRemark":{"id":"cc4d1b8e-49c9-58f2-a5b0-a9612105713a","html":"<p>Google Chrome has a whole bunch of useful <a href=\"https://support.google.com/chrome/answer/157179\">keyboard shortcuts</a>; however, there are still some features that can only be accessed by using the mouse. Fortunately, if we want to duplicate a tab, we are given all the tools we need to hack together our own solution. I’m doing this on a Mac, but all of these shortcuts can be mapped to other operating systems.</p>\n<p>To duplicate the tab you are in, execute the following shortcuts in sequence:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">⌘ + l       // this is a lowercase L\n⌘ + return\n⌘ + 9</code></pre></div>\n<p><em>If you just want duplicate a tab and not open it, you can exclude the <code class=\"language-text\">⌘ + 9</code> at the end</em>.</p>\n<h2 id=\"why\"><a href=\"#why\" aria-label=\"why permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Why?</h2>\n<p>This works because the url will be selected after jumping to the address bar, and then the page is opened in a new tab (since the action is to go to that url). Unfortunately, this tab will be added to the end of the tabs, so if we have 5 tabs open and we want to duplicate tab 2, the tab 2 copy will be in the 6th position. Fortunately, we can use the <em>jump to last</em> tab command to open the duplicate tab regardless of how many tabs we have open.</p>\n<h3 id=\"jump-to-address-bar-⌘--l\"><a href=\"#jump-to-address-bar-%E2%8C%98--l\" aria-label=\"jump to address bar ⌘  l permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Jump to Address Bar (<code class=\"language-text\">⌘ + l</code>)</h3>\n<p>This shortcut moves the focus to the address bar (which shows the current url)</p>\n<h3 id=\"open-in-new-tab-⌘--return\"><a href=\"#open-in-new-tab-%E2%8C%98--return\" aria-label=\"open in new tab ⌘  return permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Open in New Tab (<code class=\"language-text\">⌘ + return</code>)</h3>\n<p>Most people know that if you hold <code class=\"language-text\">⌘</code> and then select something with the mouse (click a link, press a button), it will complete that action in a new tab. This concept is the same, except it uses <code class=\"language-text\">return</code> or <code class=\"language-text\">enter</code> instead to select.</p>\n<h3 id=\"jump-to-last-tab-⌘--9\"><a href=\"#jump-to-last-tab-%E2%8C%98--9\" aria-label=\"jump to last tab ⌘  9 permalink\" class=\"anchor\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>Jump to Last Tab (<code class=\"language-text\">⌘ + 9</code>)</h3>\n<p><code class=\"language-text\">⌘ + 1</code> through <code class=\"language-text\">⌘ + 8</code> will bring you to a specific tab in your window (<code class=\"language-text\">⌘ + 4</code> will open the 4th tab). <code class=\"language-text\">⌘ + 9</code> brings you to the last tab. So if you have 40 tabs open, it will open the 40th. If you have 2 tabs open, it will bring you to the 2nd.</p>\n<hr>\n<p>The alternative is right-clicking the tab we want to duplicate, and selecting <code class=\"language-text\">duplicate</code> from the menu. This is nice because you don’t have to have that tab open, it create the duplicate in the next tab space, and it takes less actions to complete… but it isn’t nearly as flashy.</p>","fields":{"slug":"duplicate-tab-keyboard-shortcut","tagSlugs":["/tag/productivity/"]},"frontmatter":{"date":"2019-05-23T04:55:15.342Z","description":"Google Chrome has a lot of useful keyboard shortcuts, but there are still a handful of features that aren't mapped to keys. This post will showcase the least elegant method for duplicating a tab... but at least you will feel like a power user.","tags":["productivity"],"title":"homemade duplicate tab keyboard shortcut"}}},"pageContext":{"isCreatedByStatefulCreatePages":false,"slug":"duplicate-tab-keyboard-shortcut"}}