This sample demonstrates the chrome.commands
API by creating a new keyboard macro for switching tabs in the browser window.
The extension sets Ctrl+Shift+Left and Ctrl+Shift+Right as command inputs in the manifest, and uses chrome.commands.onCommand.addListener()
to trigger switching tabs.
- Clone this repository.
- Load this directory in Chrome as an unpacked extension.
- Input the keyboard commands to switch between tabs.