IcarusWorks / ember-key-manager

A service for (un)binding keyboard up and down events.
MIT License
42 stars 11 forks source link

Normalize modifier key names #36

Closed patrickberkeley closed 6 years ago

patrickberkeley commented 6 years ago

Currently modifier key names are:

altKey, ctrlKey, metaKey, shiftKey

But if those keys are used as execution keys, their names are:

Alt, Control, Meta, Shift

This ticket is to normalize the modifier key names so they are the same as their execution counterpart. Example result:

  get(this, 'keyManager').addMacro({
      callback: bind(this, function() {
        this.send('toggleModal');
      }),
      executionKey: 'A',
      modifierKeys: ['Alt', 'Control', 'Meta', 'Shift']
      keyEvent: 'keydown',
    });