zelda30tribute icon indicating copy to clipboard operation
zelda30tribute copied to clipboard

Configuration file for keyboard controls

Open Sebelino opened this issue 8 years ago • 0 comments

The keyboard control configuration is rather hard-coded and scattered across multiple files, so I moved it to a separate configuration file, js/controls.js, to make customization a little easier. Customizing the controls is now as easy as editing this associative array:

ace.controls = {
    'A': ['x', 'l', ace.KEY_SPACE],
    'B': ['z', 'k'],
    'Start': [ace.KEY_ENTER],
    'Left': ['a', ace.KEY_LEFT],
    'Right': ['d', ace.KEY_RIGHT],
    'Up': ['w', ace.KEY_UP],
    'Down': ['s', ace.KEY_DOWN],
};

Sebelino avatar May 15 '16 09:05 Sebelino