Question: Is there a way to bind hotkeys to textual commands in the terminal? For example: 
`ctrl+b == git branch <ret>`

Answer: 
Instead of a hotkey, how about a *bash alias*?

For example:

```
alias b='git branch'

```

now `b` is an alias for `git branch`, and you can simply type `b <ret>` in your terminal.

It is in a way much better than a hotkey, since you can still add other options to your command before hitting enter. For example:

```
b --all
b --remotes
b -m newbranch

```

... and so on.

To make this alias permanent, add it to the end of your `~/.bashrc` or `~/.bash_aliases`. The latter is preferred, but only works if your ~/.bashrc sources it. The default one for Ubuntu 12.04 does.

You can check if a given command is already assigned to an alias, program, function or builtin using `type <command>`:

```
$ type b
b is aliased to `git branch'

$ type cp
cp is /bin/cp

$ type cd
cd is a shell builtin

$ type quote
quote is a function
quote () 
{ 
    echo \'${1//\'/\'\\\'\'}\'
}

$ type c
bash: type: c: not found

```

Last but not least, it is also worth checking availability for commands that does not exist *in your system*, but may exist in Ubuntu's repositories:

```
$ blender
The program 'blender' is currently not installed.  You can install it by typing:
sudo apt-get install blender

```

This way your alias don't shadow any (current or future) command
Sure.

The best way would be to:

* Write a script with the command you want to execute
* Create a .desktop file for this .sh file
* Assign a shortcut key to this .desktop file