A keyboard interface to the web, heavily inspired by Kakoune.
WebExtension — Keyboard interface — Subject–object–verb order — Multiple selections — Kakoune-inspired
Run the following in your terminal, then follow the onscreen instructions.
git clone https://github.com/alexherbo2/krabby
cd krabby
make install
After installing, try to accomplish the following examples.
Opening links in a paragraph
Navigate to https://tuppervim.org and type:
f{hint}s[alt+a][alt+I][ctrl+enter][alt+x]
Explanation
- f enters hint mode,
{hint}
is a placeholder for you to select a link,- s creates a selection out of the active element,
- Alt + a expands the region,
- Alt + I selects all links,
- Control + Enter opens selected links in the background.
- Optionally, Alt + x will undo the operation (closing right tabs).
Play videos with mpv
Navigate to https://youtube.com/results?search_query=Berserk+AMV and type:
F{hint}{hint}<page-down>{hint}<escape>m
Explanation
- F enters hint mode (lock),
{hint}
is a placeholder for you to select 2 links,- Page Down scrolls one page down,
{hint}
is a placeholder for you to select another link,- Escape leaves hint mode.
- Finally, m opens the selection with mpv.
If you want to play around without installing, a live demo is available here.
- Keyboard layout agnostic. Maps to physical keys, but displays with the US layout.
- Subject–object–verb order
- Multiple selections as a central way of interacting
- Powerful selection manipulation primitives
- Link hints
- Tab search
- Contextual commands
- Contextual help
- Simple interaction with external programs
- Limited scope. Krabby is not Vim, nor Kakoune. Krabby is trying to be a navigation tool and some concepts from code editors don’t translate well. For example, there is no concept of mode in Krabby, but a system of contexts.
- Composability. Composability is better than extensibility. Krabby tries hard to provide features that interact well with each other. For example, f and y are two building blocks to focus a link and yank its URL. Depending on the context, y will yank the page or a link URL.
- Modular (think Emacs). Krabby is divided into multiple small projects. At its core Krabby just holds the configuration and grabs its functionalities from other projects.
- Chrome and Firefox support. It has also been tested on Opera, Vivaldi and Brave.
Download 3-gatsu no Lion episodes from HorribleSubs
Commands
- f → Focus link
- Input: o
- s → Select active element
- Alt + a → Select parent elements (2 times)
- Alt + i → Select child elements (2 times)
- Enter → Open link
- Alt + i → Select child elements
- Alt + k → Keep selections that match the given RegExp
- Input:
720p
- Input:
- Alt + I → Select links
- Alt + k → Keep selections that match the given RegExp
- Input:
Magnet
- Input:
- o → Open link in the associated application
Extract from Wikipedia the list of cities and towns in Russia
Commands
- f → Focus link
- Input: a, l
- s → Select active element
- Alt + a → Select parent elements (3 times)
- S → Select elements that match the specified group of selectors
- Input:
tr td:first-child
- Input:
- Alt + I → Select links
- Alt + y → Copy link text
Quickly move around a document with no table of contents
Commands
- % → Select document
- S → Select elements that match the specified group of selectors
- Input:
h1, h2, h3
- Input:
- ( → Focus previous selection
Opening links in a paragraph
Commands
- f → Focus link
- Input: e
- s → Select active element
- Alt + a → Select parent elements
- Alt + I → Select links
- Control + Enter → Open link in new tab
Play videos with mpv
Commands
- f → Focus link
- Input: a, w
- s → Select active element
- Alt + a → Select parent elements (3 times)
- Alt + I → Select links
- Alt + m → Play with mpv in reverse order
- Commands (Chrome API to perform browser actions)
- Shell (Chrome API to execute external commands)
- dmenu (Tab search with dmenu)
Run the following in your terminal, then follow the onscreen instructions.
make install
Web browser | Support | Engine | Comments |
---|---|---|---|
Chrome | ✓ | ||
Firefox | ✓ | Only developer or unbranded version | |
Edge | ? | ||
Opera | ✓ | ||
Safari | ✗ | ||
Vivaldi | ✓ | ||
Brave | ✓ |
- Kakoune (@mawww) for ideas and selection.cc.
- Saka Key (@eejdoowad) was a reference, for implementation and its code quality.
- @ul, for his advice and proofreading, especially in the early stages.
- @GeoGavilanes for the Krabby icon.
- @occivink, for his work on phantom selections, from which the “save and restore selections” feature is inspired.