reduce length of rawlist onKeypress method