5

I want to add my own shortcuts to the terminal. So you know like Ctrl+Shift+C copies text, Ctrl+Shift+L clears the terminal.

I would like to be able to execute the command in the current terminal using shortcut. So for example, I press Ctrl+Shift+Q and ls -l executes, etc.

Is that possible?

pomsky
  • 70,557
zupazt3
  • 209
  • 2
  • 10

1 Answers1

1

As a workaround I could achieve this by the mix of

  1. Is it possible to achieve autocomplete to predifined text in gnome-terminal?
  2. Custom Keyboard Shortcut
  3. xdotool

Steps

  1. Created a alias for ls -l as ls in ~/.bashrc file:

    screenshot

  2. To type ls and a key press of Enter, used xdotool sleep 1 key l s Return as a command for custom keyboard shortcut:

    screenshot

  3. Result, when I press the shortcut key combo:

    screenshot

Pablo Bianchi
  • 17,371