Skip to content
New issue

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

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

Already on GitHub? # to your account

Provide more actions for binding to keyboard shortcuts #72

Open
marcora opened this issue Jan 28, 2021 · 3 comments
Open

Provide more actions for binding to keyboard shortcuts #72

marcora opened this issue Jan 28, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@marcora
Copy link

marcora commented Jan 28, 2021

It would be great to have more actions available for binding to keyboard shortcuts. Also, it would be nice to have a drop down to select among a few common keybinding schemes, e.g., Vim-like or Emacs/Bash-like.

For the latter, as an example, selecting the "Emacs/Bash-like" scheme from the dropdown would set the following actions to the following keyboard shortcuts:

CTRL+A / CTRL+E | Go to the start/end of the line
CTRL+U / CTRL+K | Delete from cursor to the start/end of the line
CTRL+W / ALT+D | Delete from cursor to start/end of word (whole word if at the boundary)
CTRL+X | Cut whole line and add to clipboard
CTRL+C | Copy whole line to clipboard
CTRL-V | Paste (insert) whole line from clipboard
CTRL-Y | Paste (replace) whole line from clipboard
CTRL+F / CTRL+B | Move forward/backward one character
META+F / META+B Move forward/backward one word (or go to start of word the cursor is currently on)
CTRL+D / CTRL+H | Delete character after/before under cursor
CTRL+N / CTRL+P | Move to next/previous line
CTRL+L | Delete everything

WIth META being Apple key on MacOS or Meta key on Windows/Linux

@marcora
Copy link
Author

marcora commented Jan 31, 2021

Given the similarities between Mercury and Sonic Pi, perhaps offering a similar scheme would help transitioning users from one system to the other.
Screen Shot 2021-01-31 at 13 13 28

Screen Shot 2021-01-31 at 13 12 18

@tmhglnd
Copy link
Owner

tmhglnd commented Feb 19, 2021

Thanks for this, I have not looked at all the keybinding options from Sonic Pi yet, also not sure if I want to have the same keybindings, but did include the option to jump words in the latest commit 07cf633 with alt-j and alt-l. But having the option to switch between different shortkey "presets" would be interesting to look at!

@tmhglnd
Copy link
Owner

tmhglnd commented Feb 19, 2021

Deleting characters (as opposite to backspace with delete key) is now included in 09f080c

@tmhglnd tmhglnd added the enhancement New feature or request label Feb 19, 2021
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants