I have found here about Disper. See link for details.
It can be installed from Synaptic or the terminal.
The command to cycle between clone, extended, internal and external displays should be like this:
disper --cycle-stages='-e : -c : -S : -s' --cycle
In that case, it would extend to the right. To cycle between the same options but extend to the left:
disper --direction=left --cycle-stages='-e : -c : -S : -s' --cycle
The command can be then associated to a short-key.
The simplest shortkey might be the Display key (XF86Display) if there is one available on the keyboard. (Because of a bug, in my case that involves an interference with the Super key, so that I prefer to use XF86HomePage.)
Disper will detect displays and use the maximal resolutions by default. If no external display is connected, nothing will happen when the short-key is touched.