setup key interaction