Supposing all this is to be done on a graph, you could place on your panel two buttons whose shortcut keys are left and right arrow. In the buttons' callback you can trap the EVENT_COMMIT event and change your line position (delete and replot in the new position). The system takes care of repeating the button press as long as you keep pressed the key.