def make_KeyPress(char,state,keycode):
    control = (state & (4+8)) != 0
    meta = (state & (1+2)) != 0
    shift = (state & 0x10) != 0
    if control and char !="\x00":
       char = chr(VkKeyScan(ord(char)) & 0xff)
    elif control:
        char=chr(keycode)
    try:
        keyname=code2sym_map[keycode]
    except __HOLE__:
        keyname=""
    return KeyPress(char,shift,control,meta,keyname)
dataset/ETHPy150Open deanhiller/databus/webapp/play1.3.x/python/Lib/site-packages/pyreadline/keysyms/keysyms.py/make_KeyPress