Changed character match

This commit is contained in:
Phil Hughes 2017-01-20 12:31:44 +00:00
parent 14cd8f08ec
commit 90058cf4ea
1 changed files with 2 additions and 2 deletions

View File

@ -3,7 +3,7 @@
/* global droplab */
require('../window')(function(w){
var whiteListedKeys = [37, 38, 39, 40];
var charRegex = new RegExp('^.$', 'g');
w.droplabFilter = {
keydownWrapper: function(e){
@ -18,7 +18,7 @@ require('../window')(function(w){
return;
}
if (whiteListedKeys.indexOf(e.detail.which) !== -1) {
if (!charRegex.test(e.detail.key)) {
return;
}