Skip to content

Commit

Permalink
Merge pull request #1706 from justintanner/universal-emacs-keybinding…
Browse files Browse the repository at this point in the history
…s-updates-and-docs

Update for "Emacs Universal Keybindings"
  • Loading branch information
tekezo committed Aug 30, 2024
2 parents 3376a67 + f5784df commit c177083
Show file tree
Hide file tree
Showing 4 changed files with 2,533 additions and 520 deletions.
160 changes: 3 additions & 157 deletions public/extra_descriptions/universal_emacs_keybindings.json.html
Original file line number Diff line number Diff line change
@@ -1,161 +1,7 @@
<link rel="stylesheet" href="../../vendor/css/bootstrap.min.css" />

<p>Port of my emacs universal keybindings script from Hammerspoon to Karabiner.</p>
<ul>
<li>Supports C-x prefix key (thanks <a href="https://github.com/tekezo">tekezo</a>)</li>
<li>Supports setting a mark and highlighting text</li>
<li>Matches a similar AutoHotKey <a href="https://github.com/justintanner/universal-emacs-keybindings">script</a> for windows</li>
</ul>
<p style="margin-top: 20px;"><a href="https://jwtanner.com/posts/hammerspoon-to-karabiner#keymaps" target="_blank">Full Keymaps</a></p>
<p><a href="https://jwtanner.com/posts/emacs-keybindings-to-rule-them-all/" target="_blank">Why I developed this script</a></p>
<p><a href="https://github.com/justintanner/universal-emacs-keybindings" target="_blank">Github Repository</a></p>

<p style="margin-top: 20px; font-weight: bold">
C-x prefix keys
</p>

<table class="table">
<tr>
<td>C-x C-b</td>
<td>
Switch tabs in browsers using <a href="https://chrome.google.com/extensions/detail/jnjfeinjfmenlddahdjdmgpbokiacbbb">QuickTabs</a>.<br>

(conf Cmd+B to activate QuickTabs here <a href="chrome://extensions/shortcuts">chrome://extensions/shortcuts</a>)
</td>
</tr>
<tr>
<td>C-x C-d</td>
<td>Open dev console (web browsers only)</td>
</tr>
<tr>
<td>C-x C-c</td>
<td>Quit current application.</td>
</tr>
<tr>
<td>C-x C-f</td>
<td>Open file in most apps, browsers switch to focus location bar instead.</td>
</tr>
<tr>
<td>C-x C-h</td>
<td>Select all</td>
</tr>
<tr>
<td>C-x C-k</td>
<td>Close tab or window</td>
</tr>
<tr>
<td>C-x C-r</td>
<td>Reload (browsers only)</td>
</tr>
<tr>
<td>C-x C-s</td>
<td>Save</td>
</tr>
<tr>
<td>C-x C-u</td>
<td>Undo</td>
</tr>
</table>

<p style="margin-top: 20px; font-weight: bold">
Control keys (*supports set mark)
</p>

<table class="table">
<tr>
<td>C-a</td>
<td>*Start of line</td>
</tr>
<tr>
<td>C-b</td>
<td>*Back character</td>
</tr>
<tr>
<td>C-d</td>
<td>Delete forward</td>
</tr>
<tr>
<td>C-e</td>
<td>*End of line</td>
</tr>
<tr>
<td>C-f</td>
<td>*Forward character</td>
</tr>
<tr>
<td>C-g</td>
<td>Escape also cancels mark</td>
</tr>
<tr>
<td>C-h</td>
<td>Backspace</td>
</tr>
<tr>
<td>C-n</td>
<td>*Down arrow</td>
</tr>
<tr>
<td>C-p</td>
<td>*Up arrow</td>
</tr>
<tr>
<td>C-r</td>
<td>Find</td>
</tr>
<tr>
<td>C-v</td>
<td>*Page down</td>
</tr>
<tr>
<td>C-y</td>
<td>Paste (will passthrough to terminals)</td>
</tr>
<tr>
<td>C-/</td>
<td>Undo</td>
</tr>
<tr>
<td>C-space</td>
<td>Set mark</td>
</tr>
</table>

<p style="margin-top: 20px; font-weight: bold">
Option keys
</p>

<table class="table">
<tr>
<td>M-b</td>
<td>Move word backward</td>
</tr>
<tr>
<td>M-d</td>
<td>Delete forward word</td>
</tr>
<tr>
<td>M-f</td>
<td>Move word forward</td>
</tr>
<tr>
<td>M-n</td>
<td>New empty tab or file</td>
</tr>
<tr>
<td>M-t</td>
<td>New tab (browsers only)</td>
</tr>
<tr>
<td>M-v</td>
<td>Page up</td>
</tr>
<tr>
<td>M-w</td>
<td>Copy selection</td>
</tr>
<tr>
<td>M-y</td>
<td>Paste</td>
</tr>
<tr>
<td>M-delete, M-backspace</td>
<td>Undo</td>
</tr>
</table>
4 changes: 4 additions & 0 deletions public/groups.json
Original file line number Diff line number Diff line change
Expand Up @@ -739,6 +739,10 @@
"path": "json/emacs_key_bindings.json",
"extra_description_path": "extra_descriptions/emacs_key_bindings.json.html"
},
{
"path": "json/universal_emacs_keybindings.json",
"extra_description_path": "extra_descriptions/universal_emacs_keybindings.json.html"
},
{
"path": "json/ergo_fly_keys.json",
"extra_description_path": "extra_descriptions/ergo_fly_keys.json.html"
Expand Down
Loading

0 comments on commit c177083

Please sign in to comment.