main: transform keypress handling switch into a table based lookup
main: transform keypress handling switch into a table based lookup

The program is now also quit by pressing q instead of Ctrl-C.

cglindkamp/dfm