Add backward and forward history key bindings.