How to config my own shortcuts for buffer/text navigation and editing in Sonic Pi?

Hello there, I’ve been using Sonic Pi for a few days and it is awesome. Just getting my feet wet with livecoding .

However, I’m too used to VS Code, and also their shortcuts to navigate/edit text. Most text navigation shortcuts in almost every text editor are the same, but it is not the case for Sonic Pi, ie:

  1. To go to the start of a line in VS Code would be: CMD + Left Arrow
  2. To go to the end of a line in VS Code would be: CMD + Right Arrow

in Sonic Pi would be instead:

  1. Ctrl + A
  2. Ctrl + E

And some other shortcuts that VS Code (and the vast majority of text editors) has that Sonic Pi does not support.

The main question is: How can I modify this, how can I add the missing shortcuts that I want Sonic Pi to support? I’m looking at least for a starting point and from there I can figure it out, but because of my lack of experience contributing to open source projects kind of limits me.

I would appreciate any help, thanks!

PD: I found a Sonic Pi extension that let’s you work on VS Code which is cool. I configured my own shortcuts for Stop and Play, the problem is that I don’t get the autocomplete/suggestions/code completion. when writing some Ruby/Sonic Pi code, feature which is SUPER helpful for beginners like me. To find a way that this extension gives you that autocomplete/suggestions feature would be also a good workaround, appreciate any help with this.

Hi @andresurdaneta,

Unfortunately there is no simple way to customise keyboard shortcuts in Sonic Pi directly at the moment.
It is a goal we would definitely like to achieve, and some work was begun towards this, but as with all other aspects of the project’s development, has come down to the problem of priorities vs resources.

As you have seen, there are options around the place for controlling Sonic Pi with other IDEs. The one you refer to is a good example - though of course it is in the same boat, being another open source project.

Also, you might not have seen it yet, but there has been some (very early) work on an ‘official’ Sonic Pi VS code extension, initiated this time by the core development team. (Again, priorities vs resources, etc etc). Please see VS Code extension for details if you are interested!
We’d love to be able to get this to a point where it is usable for the majority of cases. How long it might take to get there is an open question :sweat_smile:


Hello Ethan, thanks for your response and thanks for pointing me in the right direction.

I took a look at the VS Code official extension (only available in development mode) and seems awesome. Also, love the fact that there is room for collaboration, which is one of the things that makes me love Sonic Pi.