IcarusWorks / ember-key-manager

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

upCallback isn't called #19

Closed gossi closed 6 years ago

gossi commented 6 years ago

I do have the following key registered:

// SHIFT
manager.register({
    name: 'seek-shift',
    keys: ['shift'],
    downCallback: () => {
        this.set('seekBackup', this.get('seek'));
        this.set('seek', seekShift);
    },
    upCallback: () => {
        this.set('seek', this.get('seekBackup'));
    }
});

however.. ONLY the downCallback is called at all, the upCallback never gets called. I do let this run in electron ember-electron, dunno if this has any sideeffects.

patrickberkeley commented 6 years ago

@gossi would you mind giving the refactor branch a try to see if that fixes this issue? For a diff and explanation on that branch, see https://github.com/IcarusWorks/ember-key-manager/pull/23.

patrickberkeley commented 6 years ago

@gossi please reopen this if v0.2.2 doesn't fix it.