keithamus/jwerty

Key binding not working on IE

Open

#5 opened on Oct 24, 2011

View on GitHub
 (15 comments) (0 reactions) (0 assignees)JavaScript (1,214 stars) (117 forks)batch import
bughelp wanted

Description

Hi,

First of all gratz for this awesome lib ! Nevertheless i cant make it work on internet explorer due to the event.metaKey property which is 'undefined' on IE. Thus each property in the jwertyCode object are not equals to those in the event object :

// For each property in the jwertyCode object, compare to `event`
for (var p in jwertyCode[n]) {
// ...except for jwertyCode.jwertyCombo...
 if (p !== 'jwertyCombo' && event[p] !== jwertyCode[n][p]) returnValue = false;
 }

I temporarily bypassed this IE problem by removing the metaKey references in your lib.

Contributor guide