Arrow keys in the console?! ALTERNATIVE Hotkeys?

Is there a keyboard shortcut using a ‘ctrl’ or ‘alt’ key combination to go forward/back/up/down with the cursor without using the Arrow keys? It is would speed up coding in all training consoles used on the web app if we did not have to move our hand away from home row in order to advance out of a parenthesis which looks like this.

(‘Parenthesis’); joy:

maybe I am just missing it somewhere but I have tried a bunch of different combos and haven’t been able to figure it out.


1 Like

there’s a program called readline which allows for editing the current line instead of just sending them through to whatever program is on the other end

If you run bash interactively then you’re probably also running readline. Its default keybinds come mostly from emacs, from the top of my head here are some that I use:

ctrl/alt f for moving forward one char/word
ctrl/alt b backward
ctrl p for previous
ctrl n for next
ctrl a/e for beginning/end of line
ctrl w for delete previous word
alt d for delete next word
ctrl / for undo
ctrl u for delete everything to the left
ctrl y for pasting in what was previously deleted
ctrl h for backspace
ctrl i for tab
ctrl m for enter
ctrl r for searching in history
ctrl c for cancelling various things
ctrl d to send end of file (quit)

obviously some of these are likely to be caught by your browser first

Additionally you can add your own keybindings through the bind command. I have some keybinds for things like ls, cd …, go back to previous dir, cd to home dir, and some for git as well