Open amharik opened 9 years ago
Bless you, aharikrishnan!
I recommend expanding the possible keys in the switch, I ran into some problems testing across Mac/Windows and different browsers. It was fixed by adding support for Up, ArrowUp, Down, ArrowDown.
case 38:
case 'ArrowUp':
case 'Up':
scrollContent(-delta, true);
break;
case 40:
case 'ArrowDown':
case 'Down':
scrollContent(delta, true);
break;
https://github.com/kamlekar/slim-scroll is a better choice.
Currently keyboard events ↑ / ↓ and PageUp / PageDown are not handled, which is an accessibility issue