// Path: src/main/java/in/tombo/kashiki/keybind/SupportKey.java
// public enum SupportKey {
// 
//   CTRL_ALT_SHIFT, CTRL_ALT, CTRL_SHIFT, ALT_SHIFT, CTRL, ALT, SHIFT, NONE
// 
// }
// 
// Path: src/main/java/in/tombo/kashiki/Editor.java
// public interface Editor {
// 
//   Buffer getCurrentBuffer();
// 
//   List<Base> getDrawables();
// 
//   void tearDown();
// 
//   void toggleFullScreen();
// 
//   void reflesh();
// 
//   SmoothValue getScale();
// 
//   void createNewBuffer();
// 
// }


import static in.tombo.kashiki.keybind.SupportKey.*;
import static java.awt.event.KeyEvent.*;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.google.common.base.Charsets;
import com.google.common.io.Resources;
import in.tombo.kashiki.Editor;
    CODE_MAPPING.put("insert", VK_INSERT);
    CODE_MAPPING.put("delete", VK_DELETE);
    CODE_MAPPING.put("home", VK_HOME);
    CODE_MAPPING.put("end", VK_END);
    CODE_MAPPING.put("pageup", VK_PAGE_UP);
    CODE_MAPPING.put("pagedown", VK_DELETE);
    CODE_MAPPING.put("space", VK_SPACE);
    CODE_MAPPING.put("tab", VK_TAB);
    CODE_MAPPING.put("enter", VK_ENTER);

    CODE_MAPPING.put("up", VK_UP);
    CODE_MAPPING.put("down", VK_DOWN);
    CODE_MAPPING.put("left", VK_LEFT);
    CODE_MAPPING.put("right", VK_RIGHT);

    // function keys
    CODE_MAPPING.put("f1", VK_F1);
    CODE_MAPPING.put("f2", VK_F2);
    CODE_MAPPING.put("f3", VK_F3);
    CODE_MAPPING.put("f4", VK_F4);
    CODE_MAPPING.put("f5", VK_F5);
    CODE_MAPPING.put("f6", VK_F6);
    CODE_MAPPING.put("f7", VK_F7);
    CODE_MAPPING.put("f8", VK_F8);
    CODE_MAPPING.put("f9", VK_F9);
    CODE_MAPPING.put("f10", VK_F10);
    CODE_MAPPING.put("f11", VK_F11);
    CODE_MAPPING.put("f12", VK_F12);
  }

// Path: src/main/java/in/tombo/kashiki/keybind/SupportKey.java
// public enum SupportKey {
// 
//   CTRL_ALT_SHIFT, CTRL_ALT, CTRL_SHIFT, ALT_SHIFT, CTRL, ALT, SHIFT, NONE
// 
// }
// 
// Path: src/main/java/in/tombo/kashiki/Editor.java
// public interface Editor {
// 
//   Buffer getCurrentBuffer();
// 
//   List<Base> getDrawables();
// 
//   void tearDown();
// 
//   void toggleFullScreen();
// 
//   void reflesh();
// 
//   SmoothValue getScale();
// 
//   void createNewBuffer();
// 
// }


// Path: src/main/java/in/tombo/kashiki/keybind/EmacsKeyListener.java
import static in.tombo.kashiki.keybind.SupportKey.*;
import static java.awt.event.KeyEvent.*;
import java.io.IOException;
import java.net.URL;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import com.google.common.base.Charsets;
import com.google.common.io.Resources;
import in.tombo.kashiki.Editor;

    CODE_MAPPING.put("insert", VK_INSERT);
    CODE_MAPPING.put("delete", VK_DELETE);
    CODE_MAPPING.put("home", VK_HOME);
    CODE_MAPPING.put("end", VK_END);
    CODE_MAPPING.put("pageup", VK_PAGE_UP);
    CODE_MAPPING.put("pagedown", VK_DELETE);
    CODE_MAPPING.put("space", VK_SPACE);
    CODE_MAPPING.put("tab", VK_TAB);
    CODE_MAPPING.put("enter", VK_ENTER);

    CODE_MAPPING.put("up", VK_UP);
    CODE_MAPPING.put("down", VK_DOWN);
    CODE_MAPPING.put("left", VK_LEFT);
    CODE_MAPPING.put("right", VK_RIGHT);

    // function keys
    CODE_MAPPING.put("f1", VK_F1);
    CODE_MAPPING.put("f2", VK_F2);
    CODE_MAPPING.put("f3", VK_F3);
    CODE_MAPPING.put("f4", VK_F4);
    CODE_MAPPING.put("f5", VK_F5);
    CODE_MAPPING.put("f6", VK_F6);
    CODE_MAPPING.put("f7", VK_F7);
    CODE_MAPPING.put("f8", VK_F8);
    CODE_MAPPING.put("f9", VK_F9);
    CODE_MAPPING.put("f10", VK_F10);
    CODE_MAPPING.put("f11", VK_F11);
    CODE_MAPPING.put("f12", VK_F12);
  }

  private final Editor editor;