alternative to switch statement for list keypress
fix tests for custom elements instead of classes

closes #1