Add support for setting key listener in builder