Skip to content

Instantly share code, notes, and snippets.

@deltoss
Last active December 8, 2025 02:19
Show Gist options
  • Select an option

  • Save deltoss/aed6aa1d13afbd6a58deb79cbc89f82e to your computer and use it in GitHub Desktop.

Select an option

Save deltoss/aed6aa1d13afbd6a58deb79cbc89f82e to your computer and use it in GitHub Desktop.
SurfingkeysConfig
settings.blocklistPattern = /.*tinkercad.com.*/i;
settings.scrollStepSize = 140;
settings.modeAfterYank = "Normal";
settings.hintShiftNonActive = true;
api.map("<Alt-d>", "<Alt-s>");
api.unmap("<Alt-s>");
api.map("gt", "T");
api.map("<Alt-o>", "E"); // One Tab Left
api.map("<Alt-PageDown>", "E");
api.unmap("E");
api.map("<Alt-u>", "R"); // One Tab Right
api.map("<Alt-PageUp>", "R");
api.unmap("R");
api.map("<Alt-w>", "x"); // Close current tab
api.map("<Alt-t>", "t"); // New tab
api.map("<Ctrl-o>", "d"); // Scroll Half Page Down
api.map("<Ctrl-O>", "P"); // Scroll Full Page Down
api.map("<Ctrl-e>", "d"); // Scroll Half Page Down
api.map("<Ctrl-E>", "P"); // Scroll Full Page Down
api.map("<Ctrl-u>", "u"); // Scroll Half Page Up
api.map("<Ctrl-U>", "U"); // Scroll Full Page Up
api.map("e", "d"); // Scroll Half Page Down
api.map("E", "P"); // Scroll Full Page Down
api.map("<ArrowLeft>", "h");
api.unmap("h");
api.map("<ArrowDown>", "j");
api.unmap("j");
api.map("<ArrowUp>", "k");
api.unmap("k");
api.map("<ArrowRight>", "l");
api.unmap("l");
api.map("<Space>zz", "ZZ"); // Quit and save session
api.map("<Space>zq", "ZZ");
api.map("<Ctrl-q>", "ZZ");
api.map("<Space>zr", "ZR"); // Restore saved session
// Toggle fullscreen, mainly because of YouTube
api.mapkey("<Space>F", "Fullscreen", function () {
if (window.fullScreen) {
document.exitFullscreen();
} else {
document.documentElement.requestFullscreen();
}
});
api.mapkey(
"<Space><Space>",
"pause/resume on youtube",
function () {
var btn =
document.querySelector("button.ytp-ad-overlay-close-button") ||
document.querySelector("button.ytp-ad-skip-button") ||
document.querySelector("ytd-watch-flexy button.ytp-play-button");
btn.click();
},
{ domain: /youtube.com/i },
);
api.vmap("<ArrowLeft>", "h");
api.vunmap("h");
api.vmap("<ArrowDown>", "j");
api.vunmap("j");
api.vmap("<ArrowUp>", "k");
api.vunmap("k");
api.vmap("<ArrowRight>", "l");
api.vunmap("l");
api.Hints.setCharacters("fouyhaeip,"); // for right hand
// Open Clipboard URL in current tab
api.mapkey("p", "Open the clipboard's URL in the current tab", () => {
api.Clipboard.read(function (response) {
window.location.href = response.data;
});
});
// Open Clipboard URL in new tab
api.map("P", "cc");
// Open Hint in new tab
api.map("F", "C");
// Move Tab Left/Right w/ one press
api.map(">", ">>");
api.map("<", "<<");
// Search Engines
api.removeSearchAlias("b", "s"); // Baidu Search
api.removeSearchAlias("w", "s"); // Bing Search
api.addSearchAlias(
"ch",
"Chatgpt",
"https://chatgpt.com/?hints=search&q=",
"s",
);
api.addSearchAlias(
"p",
"Perplexity",
"https://www.perplexity.ai/search?q=",
"s",
);
api.addSearchAlias("ama", "Amazon", "https://www.amazon.com.au/s?k=", "s");
api.addSearchAlias(
"d",
"Docker",
"https://hub.docker.com/search?type=image&q=",
"s",
);
api.addSearchAlias("gh", "Github", "https://github.com/search?q=", "s");
api.addSearchAlias(
"r",
"Reddit",
"https://www.reddit.com/search?sort=relevance&t=all&q=",
"s",
);
api.addSearchAlias(
"wiki",
"Wikipedia",
"https://en.wikipedia.org/wiki/Special:Search/",
"s",
);
api.addSearchAlias(
"bb",
"Bitbucket Repositories",
"https://bitbucket.org/dashboard/repositories?search=",
"s",
);
api.addSearchAlias(
"br",
"Bitbucket Repositories",
"https://bitbucket.org/dashboard/repositories?search=",
"s",
);
api.addSearchAlias(
"bs",
"Bitbucket Code Search",
"https://bitbucket.org/search?q=",
"s",
);
api.addSearchAlias(
"bc",
"Bitbucket Code Search",
"https://bitbucket.org/search?q=",
"s",
);
api.map("oo", "go"); // Open URL in current tab
api.map("ou", "go");
// Page Navigation
api.map("gr", "gU"); // Go to [r]oot of current URL hierarchy
api.map("gb", "gu"); // Go [b]ack one path in the URL
api.map("gp", "S"); // Go [p]revious in history
api.map("gn", "D"); // Go [n]ext in history
api.map("gU", ";u"); // Edit current [U]RL with vim editor, and open in new tab
api.unmap(";u");
api.map("gu", ";U"); // Edit current [U]RL with vim editor, and reload
api.unmap(";U");
api.map(";v", "V"); // Restore visual mode
api.map("V", "zv"); // Enter visual mode and select whole element
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment