"""Standardization of key values for keyboard.

License:
    BSD
"""

import pygame.locals

import sketching.const


KEY_MAP = {
    pygame.locals.K_BACKSPACE: sketching.const.KEYBOARD_BACKSPACE_BUTTON,
    pygame.locals.K_TAB: sketching.const.KEYBOARD_TAB_BUTTON,
    pygame.locals.K_CLEAR: 'clear',
    pygame.locals.K_RETURN: sketching.const.KEYBOARD_RETURN_BUTTON,
    pygame.locals.K_PAUSE: 'pause',
    pygame.locals.K_ESCAPE: 'escape',
    pygame.locals.K_SPACE: sketching.const.KEYBOARD_SPACE_BUTTON,
    pygame.locals.K_EXCLAIM: 'exclaim',
    pygame.locals.K_QUOTEDBL: 'quotedbl',
    pygame.locals.K_HASH: 'hash',
    pygame.locals.K_DOLLAR: 'dollar',
    pygame.locals.K_AMPERSAND: 'ampersand',
    pygame.locals.K_QUOTE: 'quote',
    pygame.locals.K_LEFTPAREN: 'leftparen',
    pygame.locals.K_RIGHTPAREN: 'rightparen',
    pygame.locals.K_ASTERISK: 'asterisk',
    pygame.locals.K_PLUS: 'plus',
    pygame.locals.K_COMMA: 'comma',
    pygame.locals.K_MINUS: 'minus',
    pygame.locals.K_PERIOD: 'period',
    pygame.locals.K_SLASH: 'slash',
    pygame.locals.K_0: '0',
    pygame.locals.K_1: '1',
    pygame.locals.K_2: '2',
    pygame.locals.K_3: '3',
    pygame.locals.K_4: '4',
    pygame.locals.K_5: '5',
    pygame.locals.K_6: '6',
    pygame.locals.K_7: '7',
    pygame.locals.K_8: '8',
    pygame.locals.K_9: '9',
    pygame.locals.K_COLON: 'colon',
    pygame.locals.K_SEMICOLON: 'semicolon',
    pygame.locals.K_LESS: 'less',
    pygame.locals.K_EQUALS: 'equals',
    pygame.locals.K_GREATER: 'greater',
    pygame.locals.K_QUESTION: 'question',
    pygame.locals.K_AT: 'at',
    pygame.locals.K_LEFTBRACKET: 'leftbracket',
    pygame.locals.K_BACKSLASH: 'backslash',
    pygame.locals.K_RIGHTBRACKET: 'rightbracket',
    pygame.locals.K_CARET: 'caret',
    pygame.locals.K_UNDERSCORE: 'underscore',
    pygame.locals.K_BACKQUOTE: 'backquote',
    pygame.locals.K_a: 'a',
    pygame.locals.K_b: 'b',
    pygame.locals.K_c: 'c',
    pygame.locals.K_d: 'd',
    pygame.locals.K_e: 'e',
    pygame.locals.K_f: 'f',
    pygame.locals.K_g: 'g',
    pygame.locals.K_h: 'h',
    pygame.locals.K_i: 'i',
    pygame.locals.K_j: 'j',
    pygame.locals.K_k: 'k',
    pygame.locals.K_l: 'l',
    pygame.locals.K_m: 'm',
    pygame.locals.K_n: 'n',
    pygame.locals.K_o: 'o',
    pygame.locals.K_p: 'p',
    pygame.locals.K_q: 'q',
    pygame.locals.K_r: 'r',
    pygame.locals.K_s: 's',
    pygame.locals.K_t: 't',
    pygame.locals.K_u: 'u',
    pygame.locals.K_v: 'v',
    pygame.locals.K_w: 'w',
    pygame.locals.K_x: 'x',
    pygame.locals.K_y: 'y',
    pygame.locals.K_z: 'z',
    pygame.locals.K_DELETE: 'delete',
    pygame.locals.K_KP0: 'kp0',
    pygame.locals.K_KP1: 'kp1',
    pygame.locals.K_KP2: 'kp2',
    pygame.locals.K_KP3: 'kp3',
    pygame.locals.K_KP4: 'kp4',
    pygame.locals.K_KP5: 'kp5',
    pygame.locals.K_KP6: 'kp6',
    pygame.locals.K_KP7: 'kp7',
    pygame.locals.K_KP8: 'kp8',
    pygame.locals.K_KP9: 'kp9',
    pygame.locals.K_KP_PERIOD: 'kp_period',
    pygame.locals.K_KP_DIVIDE: 'kp_divide',
    pygame.locals.K_KP_MULTIPLY: 'kp_multiply',
    pygame.locals.K_KP_MINUS: 'kp_minus',
    pygame.locals.K_KP_PLUS: 'kp_plus',
    pygame.locals.K_KP_ENTER: 'kp_enter',
    pygame.locals.K_KP_EQUALS: 'kp_equals',
    pygame.locals.K_UP: sketching.const.KEYBOARD_UP_BUTTON,
    pygame.locals.K_DOWN: sketching.const.KEYBOARD_DOWN_BUTTON,
    pygame.locals.K_RIGHT: sketching.const.KEYBOARD_RIGHT_BUTTON,
    pygame.locals.K_LEFT: sketching.const.KEYBOARD_LEFT_BUTTON,
    pygame.locals.K_INSERT: 'insert',
    pygame.locals.K_HOME: sketching.const.KEYBOARD_HOME_BUTTON,
    pygame.locals.K_END: sketching.const.KEYBOARD_END_BUTTON,
    pygame.locals.K_PAGEUP: 'pageup',
    pygame.locals.K_PAGEDOWN: 'pagedown',
    pygame.locals.K_F1: 'f1',
    pygame.locals.K_F2: 'f2',
    pygame.locals.K_F3: 'f3',
    pygame.locals.K_F4: 'f4',
    pygame.locals.K_F5: 'f5',
    pygame.locals.K_F6: 'f6',
    pygame.locals.K_F7: 'f7',
    pygame.locals.K_F8: 'f8',
    pygame.locals.K_F9: 'f9',
    pygame.locals.K_F10: 'f10',
    pygame.locals.K_F11: 'f11',
    pygame.locals.K_F12: 'f12',
    pygame.locals.K_F13: 'f13',
    pygame.locals.K_F14: 'f14',
    pygame.locals.K_F15: 'f15',
    pygame.locals.K_NUMLOCK: 'numlock',
    pygame.locals.K_CAPSLOCK: 'capslock',
    pygame.locals.K_SCROLLOCK: 'scrollock',
    pygame.locals.K_RSHIFT: sketching.const.KEYBOARD_SHIFT_BUTTON,
    pygame.locals.K_LSHIFT: sketching.const.KEYBOARD_SHIFT_BUTTON,
    pygame.locals.K_RCTRL: sketching.const.KEYBOARD_CTRL_BUTTON,
    pygame.locals.K_LCTRL: sketching.const.KEYBOARD_CTRL_BUTTON,
    pygame.locals.K_RALT: sketching.const.KEYBOARD_ALT_BUTTON,
    pygame.locals.K_LALT: sketching.const.KEYBOARD_ALT_BUTTON,
    pygame.locals.K_RMETA: sketching.const.KEYBOARD_SUPER_BUTTON,
    pygame.locals.K_LMETA: sketching.const.KEYBOARD_SUPER_BUTTON,
    pygame.locals.K_LSUPER: sketching.const.KEYBOARD_SUPER_BUTTON,
    pygame.locals.K_RSUPER: sketching.const.KEYBOARD_SUPER_BUTTON,
    pygame.locals.K_MODE: 'mode',
    pygame.locals.K_HELP: 'help',
    pygame.locals.K_PRINT: 'print',
    pygame.locals.K_SYSREQ: 'sysreq',
    pygame.locals.K_BREAK: 'break',
    pygame.locals.K_MENU: 'menu',
    pygame.locals.K_POWER: 'power',
    pygame.locals.K_EURO: 'euro',
    pygame.locals.K_AC_BACK: 'ac_back'
}
