export const keyboardEventUtil = {

  PREVENT_DEFAULT_ACTION: 'preventDefault',

  _keyCodeToReadableKeyMap: {
    16: 'Shift',
    17: 'Control',
    18: 'Alt',
    91: 'Meta', // Seems not to be correct in FF, but FF supports evt.key
    117: 'F6'
  },

  _mapKeyCodeToReadable: function(keyCode) {
    var keyCodeMap = keyboardEventUtil._keyCodeToReadableKeyMap;
    if (keyCode in keyCodeMap) {
      return keyCodeMap[keyCode];
    }
    return String.fromCharCode(keyCode);
  },

  _getKeyNameFromEvent: function(evt) {
    if (evt.key) {
      // Ctrl+S in FF reports evt.key='s' (which makes sense) but we handle all just in upper case.
      if (evt.key.length === 1) {
        return evt.key.toUpperCase();
      }
      return evt.key;
    }
    return keyboardEventUtil._mapKeyCodeToReadable(evt.keyCode);
  },

  addKeyDownListener: function(fn) {
    document.addEventListener('keydown', function(evt) {
      var whatToDo = fn(keyboardEventUtil._getKeyNameFromEvent(evt));
      if (whatToDo === keyboardEventUtil.PREVENT_DEFAULT_ACTION) {
        evt.preventDefault();
      }
    });
  },

  addKeyUpListener: function(fn) {
    document.addEventListener('keyup', function(evt) {
      fn(keyboardEventUtil._getKeyNameFromEvent(evt));
    });
  }
};

@@ -10,79 +10,482 @@
 nst 
-keyboardEventUtil = %7B%0A%0A  PREVENT_DEFAULT_ACTION: 'preventDefault',%0A%0A  _
+PREVENT_DEFAULT_ACTION = 'preventDefault';%0Aexport const keyboardEventUtil = %7B%0A%0A  addKeyDownListener: function(fn) %7B%0A    document.addEventListener('keydown', function(evt) %7B%0A      var whatToDo = fn(getKeyNameFromEvent(evt));%0A      if (whatToDo === PREVENT_DEFAULT_ACTION) %7B%0A        evt.preventDefault();%0A      %7D%0A    %7D);%0A  %7D,%0A%0A  addKeyUpListener: function(fn) %7B%0A    document.addEventListener('keyup', function(evt) %7B%0A      fn(getKeyNameFromEvent(evt));%0A    %7D);%0A  %7D%0A%7D;%0A%0A%0Aconst 
 keyC
@@ -507,16 +507,15 @@
 yMap
-:
+ =
  %7B%0A  
- 
- 
 16: 
@@ -523,18 +523,16 @@
 Shift',%0A
-  
   17: 'C
@@ -542,18 +542,16 @@
 rol',%0A  
- 
- 
 18: 'Alt
@@ -553,18 +553,16 @@
  'Alt',%0A
-  
   91: 'M
@@ -625,18 +625,16 @@
 evt.key%0A
-  
   117: '
@@ -637,25 +637,26 @@
 7: 'F6'%0A
-  %7D,%0A%0A  _
+%7D;%0A%0Aconst 
 mapKeyCo
@@ -667,17 +667,18 @@
 Readable
-:
+ =
  functio
@@ -692,18 +692,16 @@
 de) %7B%0A  
- 
- 
 var keyC
@@ -709,35 +709,16 @@
 deMap = 
-keyboardEventUtil._
 keyCodeT
@@ -736,18 +736,16 @@
 yMap;%0A  
- 
- 
 if (keyC
@@ -765,26 +765,24 @@
 eMap) %7B%0A    
-  
 return keyCo
@@ -795,30 +795,26 @@
 keyCode%5D;%0A  
- 
- 
 %7D%0A
-  
   return Str
@@ -844,17 +844,18 @@
 e);%0A
-  %7D,%0A%0A  _
+%7D;%0A%0Aconst 
 getK
@@ -869,17 +869,18 @@
 romEvent
-:
+ =
  functio
@@ -890,18 +890,16 @@
 vt) %7B%0A  
- 
- 
 if (evt.
@@ -901,26 +901,24 @@
 (evt.key) %7B%0A
-  
     // Ctrl+
@@ -1003,26 +1003,24 @@
 r case.%0A    
-  
 if (evt.key.
@@ -1031,26 +1031,24 @@
 th === 1) %7B%0A
-  
       return
@@ -1075,22 +1075,18 @@
 ();%0A    
- 
- 
 %7D%0A
-  
     retu
@@ -1095,30 +1095,26 @@
  evt.key;%0A  
-  %7D%0A  
+%7D%0A
   return key
@@ -1110,35 +1110,16 @@
  return 
-keyboardEventUtil._
 mapKeyCo
@@ -1149,453 +1149,8 @@
 e);%0A
-  %7D,%0A%0A  addKeyDownListener: function(fn) %7B%0A    document.addEventListener('keydown', function(evt) %7B%0A      var whatToDo = fn(keyboardEventUtil._getKeyNameFromEvent(evt));%0A      if (whatToDo === keyboardEventUtil.PREVENT_DEFAULT_ACTION) %7B%0A        evt.preventDefault();%0A      %7D%0A    %7D);%0A  %7D,%0A%0A  addKeyUpListener: function(fn) %7B%0A    document.addEventListener('keyup', function(evt) %7B%0A      fn(keyboardEventUtil._getKeyNameFromEvent(evt));%0A    %7D);%0A  %7D%0A
 %7D;
+%0A
 %0A

Make the exported object smaller.