Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Document Emacs keybinds #226

Open
MajorDallas opened this issue Apr 1, 2024 · 0 comments
Open

Document Emacs keybinds #226

MajorDallas opened this issue Apr 1, 2024 · 0 comments

Comments

@MajorDallas
Copy link

The README lists the default keybinds for both Mac and non-Mac keyboards, but to see what the emacs keybinds are one has to read code. Within the code, one also to figure out exactly what Mod and Meta refer to, as both are used, eg. Meta-w for copy, or Mod-ArrowUp for going to the previous block. Complicating this further, some of the default keybinds on Alt appear to take precedent over the emacs keybinds on Mod, eg. Alt-ArrowUp for moving a line up is what happens on my Windows machine, where "Mod" is typically Alt and "Meta" is typically Windows. (Naturally, Windows' own keybinds on Meta take precedent over Heynote's.)

I started writing the following list to submit for use in the README, but the confusion around meta/mod/alt stopped me short of offering a complete and correct list:

# Basic editing
Mod-a			emacsSelectAll
Ctrl-y			paste
Ctrl-w			cut
Meta-w			copy

Ctrl-Shift--		undo
Ctrl-.			redo

Ctrl-d			deleteCharForward
Ctrl-h			deleteCharBackward
Ctrl-k			deleteToLineEnd
Ctrl-o			splitLine
Ctrl-t			transposeChars


# Single cursor movement
ArrowLeft		cursorCharLeft
Ctrl-b			cursorCharLeft
ArrowRight		cursorCharRight
Ctrl-f			cursorCharRight
ArrowUp			cursorLineUp
Ctrl-p			cursorLineUp
ArrowDown		cursorLineDown
Ctrl-n			cursorLineDown
Ctrl-a			cursorLineStart
Ctrl-e			cursorLineEnd
Ctrl-v			cursorPageDown

## Select mode
ArrowLeft		selectCharLeft
Ctrl-b			selectCharLeft
ArrowRight		selectCharRight
Ctrl-f			selectCharRight
ArrowUp			selectLineUp
Ctrl-p			selectLineUp
ArrowDown		selectLineDown
Ctrl-n			selectLineDown
Ctrl-a			selectLineStart
Ctrl-e			selectLineEnd


# Cursor group movement
Ctrl-ArrowLeft		cursorGroupLeft
Ctrl-ArrowRight	cursorGroupRight
Mod-ArrowUp		gotoPreviousBlock
Mod-ArrowDown	gotoNextBlock
Ctrl-ArrowUp		gotoPreviousParagraph
Ctrl-ArrowDown	gotoNextParagraph

## Select mode
Ctrl-ArrowLeft	selectGroupLeft
Ctrl-ArrowRight	selectGroupRight
Mod-ArrowUp	selectPreviousBlock
Mod-ArrowDown	selectNextBlock
Ctrl-ArrowUp	selectPreviousParagraph
Ctrl-ArrowDown	selectNextParagraph


Ctrl-g			emacsCancel
Ctrl-Space		toggle emacsDarkMode
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant