extracted code from extensions.js

moved keys & mouseButtons to keycodes.js
moved zeroFill to 2D.js (only 2D.js uses zeroFill)
Merge pull request #660 from mucaho/split_files_1

extracted code from extensions.js