add support for matching a specific terminal to input map config. cleanup