# Copyright 2009-2012 James P Goodwin ped tiny python editor
CMD_NOP=-1
CMD_INSERT=0
CMD_RETURNKEY=15

CMD_MARKSPAN=1
CMD_MARKRECT=2
CMD_COPYMARKED=3
CMD_PRMTGOTO=4
CMD_BACKSPACE=5
CMD_FILENAME=6
CMD_CUTMARKED=7
CMD_PASTE=38
CMD_MARKLINES=8
CMD_CR=9
CMD_TAB=10
CMD_SAVE=11
CMD_SAVEAS=12
CMD_UNDO=13
CMD_TOGGLEWRAP=14
CMD_BTAB=16
CMD_PREVWORD=17
CMD_NEXTWORD=18
CMD_HOME=19
CMD_END=20
CMD_UP=21
CMD_DOWN=22
CMD_LEFT=23
CMD_RIGHT=24
CMD_DELC=25
CMD_PAGEUP=26
CMD_PAGEDOWN=27
CMD_PRMTSEARCH=28
CMD_PRMTREPLACE=29
CMD_TRANSFERCLIPOUT=30
CMD_TRANSFERCLIPIN=31
CMD_PRMTSEARCHBACK=32
CMD_SEARCHAGAIN=33
CMD_MARKCOPYLINE=34
CMD_MARKCUTLINE=35
CMD_HOME1=36
CMD_END1=37
CMD_NEXTEDITOR=39
CMD_RESIZE=40
CMD_REFRESH=41
CMD_NEXTFRAME=42
CMD_BUFFERLIST=43
CMD_FILEFIND=44
CMD_SAVEEXIT=45
# CMD_BROWSESVN=46 free slot now
CMD_HELP=47
CMD_SHELLCMD=48
CMD_OPENEDITOR=49
CMD_PREVEDITOR=50
CMD_HORZSPLIT=51
CMD_VERTSPLIT=52
CMD_ZOOMFRAME=53
CMD_KILLFRAME=54
CMD_DELEDITOR=55
CMD_EXITNOSAVE=56
CMD_DLGNEXT=57
CMD_DLGPREV=58
CMD_DLGUP=59
CMD_DLGRESIZE=60
# CMD_READNEWS=61 free slot now
CMD_TOGGLERECORD=62
CMD_PLAYBACK=63
CMD_MOUSE=64
CMD_DLGMOUSE=64
CMD_SFTP=65


name_to_cmd = {
"CMD_MARKSPAN":CMD_MARKSPAN,
"CMD_MARKRECT":CMD_MARKRECT,
"CMD_COPYMARKED":CMD_COPYMARKED,
"CMD_PRMTGOTO":CMD_PRMTGOTO,
"CMD_BACKSPACE":CMD_BACKSPACE,
"CMD_FILENAME":CMD_FILENAME,
"CMD_CUTMARKED":CMD_CUTMARKED,
"CMD_PASTE":CMD_PASTE,
"CMD_MARKLINES":CMD_MARKLINES,
"CMD_CR":CMD_CR,
"CMD_TAB":CMD_TAB,
"CMD_SAVE":CMD_SAVE,
"CMD_SAVEAS":CMD_SAVEAS,
"CMD_UNDO":CMD_UNDO,
"CMD_TOGGLEWRAP":CMD_TOGGLEWRAP,
"CMD_BTAB":CMD_BTAB,
"CMD_PREVWORD":CMD_PREVWORD,
"CMD_NEXTWORD":CMD_NEXTWORD,
"CMD_HOME":CMD_HOME,
"CMD_END":CMD_END,
"CMD_UP":CMD_UP,
"CMD_DOWN":CMD_DOWN,
"CMD_LEFT":CMD_LEFT,
"CMD_RIGHT":CMD_RIGHT,
"CMD_DELC":CMD_DELC,
"CMD_PAGEUP":CMD_PAGEUP,
"CMD_PAGEDOWN":CMD_PAGEDOWN,
"CMD_PRMTSEARCH":CMD_PRMTSEARCH,
"CMD_PRMTREPLACE":CMD_PRMTREPLACE,
"CMD_TRANSFERCLIPOUT":CMD_TRANSFERCLIPOUT,
"CMD_TRANSFERCLIPIN":CMD_TRANSFERCLIPIN,
"CMD_PRMTSEARCHBACK":CMD_PRMTSEARCHBACK,
"CMD_SEARCHAGAIN":CMD_SEARCHAGAIN,
"CMD_MARKCOPYLINE":CMD_MARKCOPYLINE,
"CMD_MARKCUTLINE":CMD_MARKCUTLINE,
"CMD_HOME1":CMD_HOME1,
"CMD_END1":CMD_END1,
"CMD_NEXTEDITOR":CMD_NEXTEDITOR,
"CMD_RESIZE":CMD_RESIZE,
"CMD_REFRESH":CMD_REFRESH,
"CMD_NEXTFRAME":CMD_NEXTFRAME,
"CMD_BUFFERLIST":CMD_BUFFERLIST,
"CMD_FILEFIND":CMD_FILEFIND,
"CMD_SAVEEXIT":CMD_SAVEEXIT,
# "CMD_BROWSESVN":CMD_BROWSESVN,
"CMD_HELP":CMD_HELP,
"CMD_SHELLCMD":CMD_SHELLCMD,
"CMD_OPENEDITOR":CMD_OPENEDITOR,
"CMD_PREVEDITOR":CMD_PREVEDITOR,
"CMD_HORZSPLIT":CMD_HORZSPLIT,
"CMD_VERTSPLIT":CMD_VERTSPLIT,
"CMD_ZOOMFRAME":CMD_ZOOMFRAME,
"CMD_KILLFRAME":CMD_KILLFRAME,
"CMD_DELEDITOR":CMD_DELEDITOR,
"CMD_EXITNOSAVE":CMD_EXITNOSAVE,
"CMD_DLGNEXT":CMD_DLGNEXT,
"CMD_DLGPREV":CMD_DLGPREV,
"CMD_DLGUP":CMD_DLGUP,
"CMD_DLGRESIZE":CMD_DLGRESIZE,
# "CMD_READNEWS":CMD_READNEWS,
"CMD_TOGGLERECORD":CMD_TOGGLERECORD,
"CMD_PLAYBACK":CMD_PLAYBACK,
"CMD_NOP":-1,
"CMD_INSERT":0,
"CMD_RETURNKEY":15,
"CMD_MOUSE":CMD_MOUSE,
"CMD_DLGMOUSE":CMD_DLGMOUSE,
"CMD_SFTP":CMD_SFTP,
}

cmd_to_name = {}
for name,cmd in list(name_to_cmd.items()):
    cmd_to_name[cmd] = name
