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

Answer: 
[You can use the bash `bind` command](https://stackoverflow.com/a/4120926/634853) as seen in the linked Stackoverflow answer.

In your case, the command would be:

```
bind '"\C-b":"git branch\n"'

```

To make it stick from session to session then add it to your `~/.inputrc`

[Bash bind reference.](http://www.gnu.org/software/bash/manual/bashref.html#Bash-Builtins) (also available as `man bash`)
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