extracted code from extensions.js

moved keys & mouseButtons to keycodes.js
moved zeroFill to 2D.js (only 2D.js uses zeroFill)

as suggested, small steps towards #603