Control Chrome completely with the keyboard

Solution 1:

A solution that does not use AutoHotkey is to use the Vimium extension. It is meant to emulate Vim in Chrome, but what it really does is give every action in Google Chrome a customizable keyboard shortcut, along with remembering your preferred zoom size on a site-by-site basis.

See its README for more detail, with special attention on the section "Custom Key Mappings", which lets you execute a string of keyboard keys launched by one keyboard shortcut.

To create your first item, open the previous page in a new tab, could possibly be done as follow :

Alt-D     (move the focus to the location bar)
Alt-Enter (open up the current URL into a new tab)
Ctrl+9    (switch to the last tab)
Backspace (go back to previous)

The result is that your tab was duplicated and is still displayed as the next tab (although without its history), and your current tab went to its previous page. I believe that this is the closest one can come to what was asked, as unfortunately duplicating a tab with its history requires using the mouse.

You can combine this extension with Shortcut Manager, which adds more keyboard capabilities.

The list of all Chrome Keyboard and mouse shortcuts is very long, and can be useful when constructing your macros as described above.

If you still intend to use AutoHotkey, you could use the above material to create the AutoHotkey macros, in much the same way as I described.

Solution 2:

You may be able to do some of what you want with the Shortcut Manager extension, which allows you to assign bookmarklets or JavaScript code to keyboard shortcuts.