keycodes={
    #BASIC KEYCODES
    "KC_NO,":" Null ,",
    "XXXXXXX,":" Null ,",
    "_______,":"      ,",
    "KC_TRNS,":"      ,",
    "KC_A,":"   A  ,",
    "KC_B,":"   B  ,",
    "KC_C,":"   C  ,",
    "KC_D,":"   D  ,",
    "KC_E,":"   E  ,",
    "KC_F,":"   F  ,",
    "KC_G,":"   G  ,",
    "KC_H,":"   H  ,",
    "KC_I,":"   I  ,",
    "KC_J,":"   J  ,",
    "KC_K,":"   K  ,",
    "KC_L,":"   L  ,",
    "KC_M,":"   M  ,",
    "KC_N,":"   N  ,",
    "KC_O,":"   O  ,",
    "KC_P,":"   P  ,",
    "KC_Q,":"   Q  ,",
    "KC_R,":"   R  ,",
    "KC_S,":"   S  ,",
    "KC_T,":"   T  ,",
    "KC_U,":"   U  ,",
    "KC_V,":"   V  ,",
    "KC_W,":"   W  ,",
    "KC_X,":"   X  ,",
    "KC_Y,":"   Y  ,",
    "KC_Z,":"   Z  ,",
    "KC_1,":"   1  ,",
    "KC_2,":"   2  ,",
    "KC_3,":"   3  ,",
    "KC_4,":"   4  ,",
    "KC_5,":"   5  ,",
    "KC_6,":"   6  ,",
    "KC_7,":"   7  ,",
    "KC_8,":"   8  ,",
    "KC_9,":"   9  ,",
    "KC_0,":"   0  ,",
    "KC_ENTER,":"Enter ,",
    "KC_SFTENT,":"SFTENT,",
    "KC_ENT,":"Enter ,",
    "KC_ESC,":" Esc  ,",
    "KC_ESCAPE,":" Esc  ,",
    "KC_BSPACE,":" Bksp ,",
    "KC_BSPC,":" Bksp ,",
    "KC_TAB,":" Tab  ,",
    "KC_SPACE,":"Space ,",
    "KC_SPC,":"Space ,",
    "KC_MINUS,":"  -   ,",
    "KC_MINS,":"  -   ,",
    "KC_EQL,":"  =   ,",
    "KC_EQUAL,":"  =   ,",    
    "KC_LBRACKET,":"  [   ,",
    "KC_LBRC,":"  [   ,",
    "KC_RBRACKET,":"  ]   ,",
    "KC_RBRC,":"  ]   ,",
    "KC_BSLASH,":"  \   ,",
    "KC_BSLS,":"  \   ,",
    "KC_NONUS_HASH,":"   #  ,",
    "KC_NUHS,":"   #  ,",
    "KC_SCOLON,":"   ;  ,",
    "KC_SCLN,":"   ;  ,",
    "KC_QUOTE,":"  '   ,",
    "KC_QUOT,":"   '  ,",
    "KC_GRAVE,":" `   ,",
    "KC_GRV,":"   `  ,",
    "KC_COMMA,":"  REPLACE,   ,",
    "KC_COMM,":"   REPLACE,  ,",
    "KC_DOT,":"   .  ,",
    "KC_SLASH,":"  /   ,",
    "KC_SLSH,":"   /  ,",
    "KC_CAPSLOCK,":" Caps ,",
    "KC_CLCK,":" Caps ,",
    "KC_CAPS,":" Caps ,",
    "KC_F1,":"  F1  ,",
    "KC_F2,":"  F2  ,",
    "KC_F3,":"  F3  ,",
    "KC_F4,":"  F4  ,",
    "KC_F5,":"  F5  ,",
    "KC_F6,":"  F6  ,",
    "KC_F7,":"  F7  ,",
    "KC_F8,":"  F8  ,",
    "KC_F9,":"  F9  ,",
    "KC_F10,":"  F10 ,",
    "KC_F11,":"  F11 ,",
    "KC_F12,":"  F12 ,",
    "KC_PSCREEN,":"PrtScn,",
    "KC_PSCR,":"PrtScn,",
    "KC_SCROLLLOCK,":" SclLk,",
    "KC_SLCK,":" ScrLk,",
    "KC_PAUSE,":" Paus ,",
    "KC_PAUS,":" Paus ,",
    "KC_BRK,":"  Break,",
    "KC_INSERT,":" Break,",
    "KC_INS,":"  Ins ,",
    "KC_HOME,":" Home ,",
    "KC_PGUP,":" PgUp ,",
    "KC_PGDN,":" PgDn ,",
    "KC_DELETE,":"  Del ,",
    "KC_DEL,":"  Del ,",
    "KC_END,":"  End ,",
    "KC_PGDOWN,":" PgUp ,",
    "KC_RIGHT,":" Right,",
    "KC_RGHT,":" Right,",
    "KC_LEFT,":" Left ,",
    "KC_UP,":"  Up  ,",
    "KC_DOWN,":" Down ,",
    "KC_NUMLOCK,":" # Lk ,",
    "KC_NLCK,":" # Lk ,",
    "KC_KP_SLASH,":"  /   ,",
    "KC_PSLS,":"   /  ,",
    "KC_KP_ASTERISK,":"   *  ,",
    "KC_PAST,":"   *  ,",
    "KC_KP_MINUS,":"  -   ,",
    "KC_PMNS,":"  -   ,",
    "KC_KP_PLUS,":"   +  ,",
    "KC_PPLS,":"   +  ,",
    "KC_KP_ENTER,":" Entr ,",
    "KC_PENT,":" Entr ,",
    "KC_KP_1,":"  1   ,",
    "KC_P1,":"  1   ,",
    "KC_KP_2,":"  2   ,",
    "KC_P2,":"  2   ,",
    "KC_KP_3,":"  3   ,",
    "KC_P3,":"  3   ,",
    "KC_KP_4,":"  4   ,",
    "KC_P4,":"  4   ,",
    "KC_KP_5,":"  5   ,",
    "KC_P5,":"  5   ,",
    "KC_KP_6,":"  6   ,",
    "KC_P6,":"  6   ,",
    "KC_KP_7,":"  7   ,",
    "KC_P7,":"  7   ,",
    "KC_KP_8,":"  8   ,",
    "KC_P8,":"  8   ,",
    "KC_KP_9,":"  9   ,",
    "KC_P9,":"  9   ,",
    "KC_KP_0,":"  0   ,",
    "KC_P0,":"  0   ,",
    "KC_KP_DOT,":"   .  ,",
    "KC_PDOT,":"   .  ,",
    "KC_NONUS_BSLASH,":"  \   ,",
    "KC_NUBS,":"  \   ,",
    "KC_APPLICATION,":" App  ,",
    "KC_APP,":" App  ,",
    "KC_POWER,":" Pwr  ,",
    "KC_KP_EQUAL,":"  =   ,",
    "KC_PEQL,":"  =   ,",
    "KC_F13,":"  F13 ,",
    "KC_F14,":"  F14 ,",
    "KC_F15,":"  F15 ,",
    "KC_F16,":"  F16 ,",
    "KC_F17,":"  F17 ,",
    "KC_F18,":"  F18 ,",
    "KC_F19,":"  F19 ,",
    "KC_F20,":"  F20 ,",
    "KC_F21,":"  F21 ,",
    "KC_F22,":"  F22 ,",
    "KC_F23,":"  F23 ,",
    "KC_F24,":"  F24 ,",
    "KC_EXECUTE,":" Exec ,",
    "KC_EXEC,":" Exec ,",
    "KC_HELP,":" Help ,",
    "KC_MENU,":" Menu ,",
    "KC_SELECT,":" Slct ,",
    "KC_SLCT,":" Slct ,",
    "KC_STOP,":" Stop ,",
    "KC_AGAIN,":"  Again,",
    "KC_AGIN,":"  Again,",
    "KC_UNDO,":" Undo ,",
    "KC_CUT,":"  Cut ,",
    "KC_COPY,":" Copy ,",
    "KC_PASTE,":" Paste,",
    "KC_PSTE,":" Paste,",
    "KC_FIND,":" Find ,",
    "KC__MUTE,":" Mute ,",
    "KC__VOLUP,":" Vol+ ,",
    "KC__VOLDOWN,":" Vol- ,",
    "KC_LOCKING_CAPS,":" Caps ,",
    "KC_LCAP,":" Caps ,",
    "KC_LOCKING_NUM,":" # Lk ,",
    "KC_LNUM,":" # Lk ,",
    "KC_LOCKING_SCROLL,":" LkScr,",
    "KC_LSCR,":" LkScr,",
    "KC_KP_COMMA,":"   REPLACE,  ,",
    "KC_PCMM,":"   REPLACE,  ,",
    "KC_KP_EQUAL_AS400,":"  =   ,",
    "KC_INT1,":"  \   ,",
    "KC_RO,":"   \  ,",
    "KC_INT2,":" Kata ,",
    "KC_KANA,":" Kata ,",
    "KC_INT3,":"  ¥   ,",
    "KC_JYEN,":"  ¥   ,",
    "KC_INT4,":" Henk ,",
    "KC_HENK,":" Henk ,",
    "KC_INT5,":" Muhn ,",
    "KC_MHEN,":" Muhn ,",
    "KC_INT6,":"  ,   ,",
    "KC_INT7,":" Int7 ,",
    "KC_INT8,":" Int8 ,",
    "KC_INT9,":" Int9 ,",
    "KC_LANG1,":" En/Ha,",
    "KC_HAEN,":" En/Ha,",
    "KC_LANG2,":" Hanja,",
    "KC_HANJ,":" Hanja,",
    "KC_LANG3,":" Kata ,",
    "KC_LANG4,":" Hira ,",
    "KC_LANG5,":" Zenk ,",
    "KC_LANG6,":" Lang6,",
    "KC_LANG7,":" Lang7,",
    "KC_LANG8,":" Lang8,",
    "KC_LANG9,":" Lang9,",
    "KC_ALT_ERASE,":" Erase,",
    "KC_ERAS,":" Erase,",
    "KC_SYSREQ,":" Attn ,",
    "KC_CANCEL,":" Cncl ,",
    "KC_CLEAR,":" Clr  ,",
    "KC_CLR,":" Clr  ,",
    "KC_PRIOR,":" Prior,",
    "KC_RETURN,":" Rtrn ,",
    "KC_SEPARATOR,":"  Sep ,",
    "KC_OUT,":"  Out ,",
    "KC_OPER,":" Oper ,",
    "KC_CLEAR_AGAIN,":" ClAg ,",
    "KC_EXSEL,":" ExSel,",
    "KC_LCTRL,":" Ctrl ,",
    "KC_LCTL,":" Ctrl ,",
    "KC_LSHIFT,":" Shft ,",
    "KC_LSFT,":" Shft ,",
    "KC_LALT,":" Alt  ,",
    "KC_LGUI,":" Gui  ,",
    "KC_LCMD,":" Cmd  ,",
    "KC_LWIN,":" Win  ,",
    "KC_RCTRL,":" Ctrl ,",
    "KC_RCTL,":" Ctrl ,",
    "KC_RSHIFT,":" Shft ,",
    "KC_RSFT,":" Shft ,",
    "KC_RALT,":" Alt  ,",
    "KC_ALGR,":" Alt  ,",
    "KC_RGUI,":" Gui  ,",
    "KC_RCMD,":" Cmd  ,",
    "KC_RWIN,":" Win  ,",
    "KC_SYSTEM_POWER,":" Pwr  ,",
    "KC_PWR,":" Pwr  ,",
    "KC_SYSTEM_SLEEP,":" Sleep,",
    "KC_SLEP,":" Sleep,",
    "KC_SYSTEM_WAKE,":" Wake ,",
    "KC_WAKE,":" Wake ,",
    "KC_AUDIO_MUTE,":" Mute ,",
    "KC_MUTE,":" Mute ,",
    "KC_AUDIO_VOL_UP,":" Vol+ ,",
    "KC_VOLU,":" Vol+ ,",
    "KC_AUDIO_VOL_DOWN,":" Vol- ,",
    "KC_VOLD,":" Vol- ,",
    "KC_MEDIA_NEXT_TRACK,":" Next ,",
    "KC_MNXT,":" Next ,",
    "KC_MEDIA_PREV_TRACK,":" Prev ,",
    "KC_MPRV,":" Prev ,",
    "KC_MEDIA_STOP,":" Stop ,",
    "KC_MSTP,":" Stop ,",
    "KC_MEDIA_PLAY_PAUSE,":" Play ,",
    "KC_MPLY,":" Play ,",
    "KC_MEDIA_SELECT,":" Slct ,",
    "KC_MSEL,":" Slct ,",
    "KC_MEDIA_EJECT,":" Ejct ,",
    "KC_EJCT,":" Ejct ,",
    "KC_MAIL,":" Mail ,",
    "KC_CALCULATOR,":" Calc ,",
    "KC_CALC,":" Calc ,",
    "KC_MY_COMPUTER,":" MyPC ,",
    "KC_MYCM,":" MyPC ,",
    "KC_WWW_SEARCH,":" Srch ,",
    "KC_WSCH,":" Srch ,",
    "KC_WWW_HOME,":" Home ,",
    "KC_WHOM,":" Home ,",
    "KC_WWW_BACK,":" Back ,",
    "KC_WBAK,":" Back ,",
    "KC_WWW_FORWARD,":" Frwd ,",
    "KC_WFWD,":" Frwd ,",
    "KC_WWW_STOP,":" Stop ,",
    "KC_WSTOP,":" Stop ,",
    "KC_WWW_REFRESH,":" Rfsh ,",
    "KC_WREF,":" Rfsh ,",
    "KC_WWW_FAVORITES,":" Fav  ,",
    "KC_WFAV,":" Fav  ,",
    "KC_MEDIA_FAST_FORWARD,":"  >>  ,",
    "KC_MFFD,":"  >>  ,",
    "KC_MEDIA_REWIND,":"  <<  ,",
    "KC_MRWD,":"  <<  ,",
    "KC_BRIGHTNESS_UP,":" Brt+ ,",
    "KC_BRIU,":" Brt+ ,",
    "KC_BRIGHTNESS_DOWN,":" Brt- ,",
    "KC_BRID,":" Brt- ,",
    #QUANTUM KEYCODES
    "RESET,":" Reset,",
    "DEBUG,":" Debug,",
    "EEPROM_RESET,":"EepRst,",
    "EEP_RST,":"EepRst,",
    "KC_GESC,":" `/Esc,",
    "GRAVE_ESC,":" `/Esc,",
    "KC_LSPO,":" Shf/(,",
    "KC_RSPC,":" Shf/),,",
    "KC_LEAD,":" Lead ,",
    "KC_LOCK,":" Lock ,",
    #cant do these rn (M, MACROTAP),
    #AUDIO KEYS
    "AU_ON,":"Au On ,",
    "AU_OFF,":"Au Off,",
    "AU_TOG,":"Au Tog,",
    "CLICKY_TOGGLE,":"Ck Tog,",
    "CK_TOGG,":"Ck Tog,",
    "CLICKY_UP,":" Ck Up,",
    "CK_UP,":" Ck Up,",
    "CLICKY_RESET,":"Ck Rst,",
    "CK_RST,":"Ck Rst,",
    "MU_ON,":"Mu On ,",
    "MU_OFF,":"Mu Off,",
    "MU_TOG,":"Mu Tog,",
    "MU_MOD,":"Mu Mod,",
    "MI_ON,":"Mi On ,",
    "MI_OFF,":"Mi Off,",
    "MUV_DE,":"Voice-,",
    "MUV_IN,":"Voice+,",
    #BACKLIGHTING
    "BL_TOGG,":"BL Tog,",
    "BL_STEP,":"BL Stp,",
    "BL_ON,":"BL On ,",
    "BL_OFF,":"BL Off,",
    "BL_INC,":" BL + ,",
    "BL_DEC,":" BL - ,",
    "BL_BRTG,":"BL Brt,",
    #BOOTMAGIC NOT SUPPORTED
    #BLUETOOTH
    "OUT_AUTO,":" Auto ,",
    "OUT_USB,":" F USB,",
    "OUT_BT,":" F BT ,",
    #LAYER SWITCHING NOT SUPPORTED
    #MOUSE KEYS
    "KC_MS_UP,":"MS Up ,",
    "KC_MS_U,":"MS Up ,",
    "KC_MS_DOWN,":"MS Dw ,",
    "KC_MS_D,":"MS Dw ,",
    "KC_MS_LEFT,":"MS Lft",
    "KC_MS_L,":"MS Lf ,",
    "KC_MS_RIGHT,":"MS Rgt,",
    "KC_MS_R,":"MS Rgt,",
    "KC_MS_BTN1,":" MS B1,",
    "KC_BTN1,":" MS B1,",
    "KC_MS_BTN2,":" MS B2,",
    "KC_BTN2,":" MS B2,",
    "KC_MS_BTN3,":" MS B3,",
    "KC_BTN3,":" MS B3,",
    "KC_MS_BTN4,":" Ms B4,",
    "KC_BTN4,":" MS B4,",
    "KC_MS_BTN5,":" MS B5,",
    "KC_BTN5,":" MS B5,",
    "KC_MS_WH_UP,":" WH Up,",
    "KC_WH_U,":" WH Up,",
    "KC_MS_WH_DOWN,":" WH Dw,",
    "KC_WH_D,":" WH Dw,",
    "KC_MS_WH_LEFT,":"WH Lft,",
    "KC_WH_L,":"WH Lft,",
    "KC_MS_WH_RIGHT,":"WH Rgt,",
    "KC_WH_R,":"WH Lft,",
    "KC_MS_ACCEL0,":" Acl 0,",
    "KC_ACL0,":" Acl 0,",    
    "KC_MS_ACCEL1,":" Acl 1,",
    "KC_ACL1,":" Acl 1,",
    "KC_MS_ACCEL2,":" Acl 2,",
    "KC_ACL2,":" Acl 2,",
    #MODIFIERS NOT SUPPORTED
    #MOD-TAP KEYS NOT SUPPORTED
    #US ANSI SHIFTED SYMBOLS
    "KC_TILDE,":"  ~   ,",
    "KC_TILD,":"  ~   ,",
    "KC_EXCLAIM,":"  !   ,",
    "KC_EXLM,":"  !   ,",
    "KC_AT,":"  @   ,",
    "KC_HASH,":"  #   ,",
    "KC_DOLLAR,":"  $   ,",
    "KC_DLR,":"  $   ,",
    "KC_PERCENT,":"  %   ,",
    "KC_PERC,":"  %   ,",
    "KC_CIRCUMFLEX,":"  ^   ,",
    "KC_CIRC,":"  ^   ,",
    "KC_AMPERSAND,":"  &   ,",
    "KC_AMPR,":"  &   ,",
    "KC_ASTERISK,":"  *   ,",
    "KC_ASTR,":"  *   ,",
    "KC_LEFT_PAREN,":"  (   ,",
    "KC_LPRN,":"  (   ,",
    "KC_RIGHT_PAREN,":"  )   ,",
    "KC_RPRN,":"  )   ,",
    "KC_UNDERSCORE,":"  _   ,",
    "KC_UNDS,":"  _   ,",
    "KC_PLUS,":"  +   ,",
    "KC_LEFT_CURLY_BRACE,":"  {   ,",
    "KC_LCBR,":"  {   ,",
    "KC_RIGHT_CURLY_BRACE,":"  }   ,",
    "KC_RCBR,":"  }   ,",
    "KC_PIPE,":"  |   ,",
    "KC_COLON,":"  :   ,",
    "KC_COLN,":"  :   ,",
    "KC_DOUBLE_QUOTE,":"  \"   ,",
    "KC_DQUO,":"  \"   ,",
    "KC_DQT,":"  \"    ,",
    "KC_LEFT_ANGLE_BRACKET,":"  <   ,",
    "KC_LABK,":"  <   ,",
    "KC_LT,":"  <   ,",
    "KC_RIGHT_ANGLE_BRACKET,":"  >   ,",
    "KC_RABK,":"  >   ,",
    "KC_GT,":"  >   ,",
    "KC_QUESTION,":"  ?   ,",
    "KC_QUES,":"  ?   ,",
    #ONE SHOT KEYS NOT SUPPORTED
    #SWAP HANDS (SH_T(), NOT SUPPORTED),
    "SW_ON,":" SW On,",
    "SW_OFF,":"SW Off,",
    "SH_MON,":"SH Mmt,",
    "SH_MOFF,":"SH Mof,",
    "SH_TG,":" SH Tog,",
    "SH_TT,":" SH TgM,",
    #RGB Codes
    "RGB_TOG,":" RGB  ,",
    "RGB_MODE_FORWARD,":"RGBMDF,",
    "RGB_MOD,":"RGBMOD,",
    "RGB_MODE_REVERSE,":" Ld M-,",
    "RGB_RMOD,":" Ld M-,",
    "RGB_HUI,":" HUE+ ,",
    "RGB_HUD,":" HUE- ,",
    "RGB_SAI,":" SAT+ ,",
    "RGB_SAD,":" SAT- ,",
    "RGB_VAI,":"BRGTH+,",
    "RGB_VAD,":"BRGTH-,",
    "RGB_SPI,":"Ld Sp+,",
    "RGB_SPD,":"Ld Sp-,",
    "RGB_MODE_PLAIN,":" Ld St,",
    "RGB_M_P,":" Ld St,",
    "RGB_MODE_BREATHE,":" Ld Br,",
    "RGB_M_B,":" Ld Br,",
    "RGB_MODE_RAINBOW,":" Ld Rb,",
    "RGB_M_R,":" Ld Rb,",
    "RGB_MODE_SWIRL,":" Ld Sw,",
    "RGB_M_SW,":" Ld Sw,",
    "RGB_MODE_SHAKE,":" Ld Sh,",
    "RGB_M_SH,":" Ld Sh,",
    "RGB_MODE_KNIGHT,":"Ld Kn,",
    "RGB_M_K,":" Ld Kn,",
    "RGB_MODE_XMAS,":" Ld Xm,",
    "RGB_M_X,":" Ld Xm,",
    "RGB_MODE_GRADIENT,":" Ld Gd,",
    "RGB_M_G,":" Ld Gd,",
    "RGB_MODE_RGBTEST,":" Ld Ts,",
    "RGB_M_T,":" Ld Ts,",
    #SPECIAL
    "BACKLIT,":" Light,",
    "MO(":"",
    "RAISE,":"Raise ,",
    "LOWER,":"Lower ,",
    #THERMAL PRINTER
    "PRINT_ON,":" PrtOn,",
    "PRINT_OFF,":"PrtOff,",
    #PLOVER
    "EXT_PLV,":" Exit ,",
    #BOOTMAGIC?
    "AG_NORM,":"AG Nrm,",
    "AG_SWAP,":"AG Swp,",
    "TERM_ON,":"TermOn,",
    "TERM_OFF,":"TermOf,",
    #UNICODE TEMP SOLUTION
    "UC":"",
    #common layers
    "QWERTY,":"Qwerty,",
    "COLEMAK,":"Colmak,",
    "DVORAK,":"Dvorak,",
    "PLOVER,":"Plover,",
    #NONUS HASH AND SLASH
    "S(KC_NUHS),":"ISO # ,",
    "S(KC_NUBS),":"ISO / ,",
    "KC_CTCP,":"Ctr/Cp,",
    "KC_RSSH,":"Shf / ",
    #ENDING REPLACEMENTS
    "),":",",
    ",":",",
    ",":"│",
    "REPLACE│":",",
    "Space │Space │":"    Space    │",
    "_":" ",
    #custom keycodes
    "EXT_GAME":"EXIT_G,",
    "EXT_MOBA":"EXIT_M,",

}
def replkc(line,others):
    for rfrom, rto in keycodes.items():
        line=line.replace(rfrom, rto)
    if not others==[]:
        for defin in others:
            defin=defin.replace("#define ","")
            newdef=defin.split()
            line=line.replace(newdef[0],newdef[1])
    return line 
def yesno(ask):
    var=input(ask+"? y/n \n>>>").lower()
    var=var.replace(" ","")
    if var[:1]=="y":
        yn=True
    else:
        yn=False
    return yn
