1
0
Fork 0

fix: add emacs keybindings to qutebrowser

Signed-off-by: Lucas Sta Maria <lucas@priime.dev>
This commit is contained in:
Lucas Sta Maria 2023-08-22 19:51:11 -04:00
parent a75a8d8a90
commit be3662463b
No known key found for this signature in database
GPG key ID: F07FB16A826E3B47

View file

@ -3,10 +3,75 @@ from typing import Dict
config.load_autoconfig()
config.bind("<Shift-j>", "tab-prev")
config.bind("<Shift-k>", "tab-next")
config.bind("<Control-j>", "tab-prev")
config.bind("<Control-k>", "tab-next")
c.bindings.default["normal"].clear()
c.bindings.commands["normal"] = {
# Navigation
"<Control-v>": "scroll-page 0 0.5",
"<Alt-v>": "scroll-page 0 -0.5",
# Commands
"<Alt-x>": "set-cmd-text :",
"<Control-x>b": "set-cmd-text :buffer",
"<Control-x>k": "tab-close",
"<Control-x><Control-c>": "quit",
# Searching
"<Control-s>": "set-cmd-text /",
"<Control-r>": "set-cmd-text ?",
# Hinting
"<Alt-s>": "hint all",
# History
"<Control-C>f": "forward",
"<Control-C>b": "backward",
# Tabs
"<Shift-right>": "tab-next",
"<Shift-left>": "tab-prev",
# Open
"<Control-x><Control-f>": "set-cmd-text -s :open",
"<Control-x><Control-o>": "set-cmd-text -s :open -t",
# Editing
"<Control-f>": "fake-key <Right>",
"<Control-b>": "fake-key <Left>",
"<Control-n>": "fake-key <Down>",
"<Control-p>": "fake-key <Up>",
# Numbers
"0": "fake-key 0",
"1": "fake-key 1",
"2": "fake-key 2",
"3": "fake-key 3",
"4": "fake-key 4",
"5": "fake-key 5",
"6": "fake-key 6",
"7": "fake-key 7",
"8": "fake-key 8",
"9": "fake-key 9",
}
c.bindings.commands["command"] = {
# Searching
"<Control-s>": "search-next",
"<Control-r>": "search-prev",
# Completion
"<Control-p>": "completion-item-focus prev",
"<Control-n>": "completion-item-focus next",
"<Control-g>": "leave-mode",
}
c.bindings.commands["hint"] = {
"<Control-g>": "leave-mode",
}
c.bindings.commands["caret"] = {
"<Control-g>": "leave-mode",
}
c.content.blocking.method = "both"
c.content.blocking.adblock.lists = [