graph.c - key handler now accepts generic struct instead of viewwin