// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_ALT = 0x0001;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_CONTROL = 0x0002;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_NOREPEAT = 0x4000;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_SHIFT = 0x0004;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_WIN = 0x0008;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_NEXT_TRACK = 0xB0;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_PLAY_PAUSE = 0xB3;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_PREV_TRACK = 0xB1;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_STOP = 0xB2;
// 
// Path: jkeymaster/com/tulskiy/keymaster/common/HotKey.java
// public class HotKey {
//     private KeyStroke keyStroke;
//     private MediaKey mediaKey;
//     private HotKeyListener listener;
// 
//     public HotKey(KeyStroke keyStroke, HotKeyListener listener) {
//         this.keyStroke = keyStroke;
//         this.listener = listener;
//     }
// 
//     public HotKey(MediaKey mediaKey, HotKeyListener listener) {
//         this.mediaKey = mediaKey;
//         this.listener = listener;
//     }
// 
//     public boolean isMedia() {
//         return mediaKey != null;
//     }
//     
//     public KeyStroke getKeyStroke() {
// 		return keyStroke;
// 	}
// 
// 	public void setKeyStroke(KeyStroke keyStroke) {
// 		this.keyStroke = keyStroke;
// 	}
// 
// 	public MediaKey getMediaKey() {
// 		return mediaKey;
// 	}
// 
// 	public void setMediaKey(MediaKey mediaKey) {
// 		this.mediaKey = mediaKey;
// 	}
// 
// 	public HotKeyListener getListener() {
// 		return listener;
// 	}
// 
// 	public void setListener(HotKeyListener listener) {
//     	this.listener = listener;
//     }
// 
//     @Override
//     public String toString() {
//         final StringBuilder sb = new StringBuilder();
//         sb.append("HotKey");
//         if (keyStroke != null)
//             sb.append("{").append(keyStroke.toString().replaceAll("pressed ", ""));
//         if (mediaKey != null)
//             sb.append("{").append(mediaKey);
//         sb.append('}');
//         return sb.toString();
//     }
// }


import static com.tulskiy.keymaster.windows.User32.MOD_ALT;
import static com.tulskiy.keymaster.windows.User32.MOD_CONTROL;
import static com.tulskiy.keymaster.windows.User32.MOD_NOREPEAT;
import static com.tulskiy.keymaster.windows.User32.MOD_SHIFT;
import static com.tulskiy.keymaster.windows.User32.MOD_WIN;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_NEXT_TRACK;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_PLAY_PAUSE;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_PREV_TRACK;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_STOP;
import static java.awt.event.KeyEvent.VK_COMMA;
import static java.awt.event.KeyEvent.VK_DELETE;
import static java.awt.event.KeyEvent.VK_ENTER;
import static java.awt.event.KeyEvent.VK_INSERT;
import static java.awt.event.KeyEvent.VK_MINUS;
import static java.awt.event.KeyEvent.VK_PERIOD;
import static java.awt.event.KeyEvent.VK_PLUS;
import static java.awt.event.KeyEvent.VK_PRINTSCREEN;
import static java.awt.event.KeyEvent.VK_SEMICOLON;
import static java.awt.event.KeyEvent.VK_SLASH;
import java.awt.event.InputEvent;
import java.util.HashMap;
import java.util.Map;
import javax.swing.KeyStroke;
import com.tulskiy.keymaster.common.HotKey;
        put(VK_DELETE, 0x2E);
        put(VK_ENTER, 0x0D);
        put(VK_COMMA, 0xBC);
        put(VK_PERIOD, 0xBE);
        put(VK_PLUS, 0xBB);
        put(VK_MINUS, 0xBD);
        put(VK_SLASH, 0xBF);
        put(VK_SEMICOLON, 0xBA);
    }};

    public static int getCode(HotKey hotKey) {
        if (hotKey.isMedia()) {
            int code = 0;
            switch (hotKey.getMediaKey()) {
                case MEDIA_NEXT_TRACK:
                    code = VK_MEDIA_NEXT_TRACK;
                    break;
                case MEDIA_PLAY_PAUSE:
                    code = VK_MEDIA_PLAY_PAUSE;
                    break;
                case MEDIA_PREV_TRACK:
                    code = VK_MEDIA_PREV_TRACK;
                    break;
                case MEDIA_STOP:
                    code = VK_MEDIA_STOP;
                    break;
            }

            return code;
        } else {
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_ALT = 0x0001;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_CONTROL = 0x0002;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_NOREPEAT = 0x4000;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_SHIFT = 0x0004;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int MOD_WIN = 0x0008;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_NEXT_TRACK = 0xB0;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_PLAY_PAUSE = 0xB3;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_PREV_TRACK = 0xB1;
// 
// Path: jkeymaster/com/tulskiy/keymaster/windows/User32.java
// public static final int VK_MEDIA_STOP = 0xB2;
// 
// Path: jkeymaster/com/tulskiy/keymaster/common/HotKey.java
// public class HotKey {
//     private KeyStroke keyStroke;
//     private MediaKey mediaKey;
//     private HotKeyListener listener;
// 
//     public HotKey(KeyStroke keyStroke, HotKeyListener listener) {
//         this.keyStroke = keyStroke;
//         this.listener = listener;
//     }
// 
//     public HotKey(MediaKey mediaKey, HotKeyListener listener) {
//         this.mediaKey = mediaKey;
//         this.listener = listener;
//     }
// 
//     public boolean isMedia() {
//         return mediaKey != null;
//     }
//     
//     public KeyStroke getKeyStroke() {
// 		return keyStroke;
// 	}
// 
// 	public void setKeyStroke(KeyStroke keyStroke) {
// 		this.keyStroke = keyStroke;
// 	}
// 
// 	public MediaKey getMediaKey() {
// 		return mediaKey;
// 	}
// 
// 	public void setMediaKey(MediaKey mediaKey) {
// 		this.mediaKey = mediaKey;
// 	}
// 
// 	public HotKeyListener getListener() {
// 		return listener;
// 	}
// 
// 	public void setListener(HotKeyListener listener) {
//     	this.listener = listener;
//     }
// 
//     @Override
//     public String toString() {
//         final StringBuilder sb = new StringBuilder();
//         sb.append("HotKey");
//         if (keyStroke != null)
//             sb.append("{").append(keyStroke.toString().replaceAll("pressed ", ""));
//         if (mediaKey != null)
//             sb.append("{").append(mediaKey);
//         sb.append('}');
//         return sb.toString();
//     }
// }


// Path: jkeymaster/com/tulskiy/keymaster/windows/KeyMap.java
import static com.tulskiy.keymaster.windows.User32.MOD_ALT;
import static com.tulskiy.keymaster.windows.User32.MOD_CONTROL;
import static com.tulskiy.keymaster.windows.User32.MOD_NOREPEAT;
import static com.tulskiy.keymaster.windows.User32.MOD_SHIFT;
import static com.tulskiy.keymaster.windows.User32.MOD_WIN;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_NEXT_TRACK;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_PLAY_PAUSE;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_PREV_TRACK;
import static com.tulskiy.keymaster.windows.User32.VK_MEDIA_STOP;
import static java.awt.event.KeyEvent.VK_COMMA;
import static java.awt.event.KeyEvent.VK_DELETE;
import static java.awt.event.KeyEvent.VK_ENTER;
import static java.awt.event.KeyEvent.VK_INSERT;
import static java.awt.event.KeyEvent.VK_MINUS;
import static java.awt.event.KeyEvent.VK_PERIOD;
import static java.awt.event.KeyEvent.VK_PLUS;
import static java.awt.event.KeyEvent.VK_PRINTSCREEN;
import static java.awt.event.KeyEvent.VK_SEMICOLON;
import static java.awt.event.KeyEvent.VK_SLASH;
import java.awt.event.InputEvent;
import java.util.HashMap;
import java.util.Map;
import javax.swing.KeyStroke;
import com.tulskiy.keymaster.common.HotKey;

        put(VK_DELETE, 0x2E);
        put(VK_ENTER, 0x0D);
        put(VK_COMMA, 0xBC);
        put(VK_PERIOD, 0xBE);
        put(VK_PLUS, 0xBB);
        put(VK_MINUS, 0xBD);
        put(VK_SLASH, 0xBF);
        put(VK_SEMICOLON, 0xBA);
    }};

    public static int getCode(HotKey hotKey) {
        if (hotKey.isMedia()) {
            int code = 0;
            switch (hotKey.getMediaKey()) {
                case MEDIA_NEXT_TRACK:
                    code = VK_MEDIA_NEXT_TRACK;
                    break;
                case MEDIA_PLAY_PAUSE:
                    code = VK_MEDIA_PLAY_PAUSE;
                    break;
                case MEDIA_PREV_TRACK:
                    code = VK_MEDIA_PREV_TRACK;
                    break;
                case MEDIA_STOP:
                    code = VK_MEDIA_STOP;
                    break;
            }

            return code;
        } else {
            KeyStroke keyStroke = hotKey.getKeyStroke();