def OnKeyEvent(self, browser, event, eventHandle):
        if event["type"] == cefpython.KEYEVENT_KEYUP:
            # OnKeyEvent is called twice for F5/Esc keys, with event
            # type KEYEVENT_RAWKEYDOWN and KEYEVENT_KEYUP.
            # Normal characters a-z should have KEYEVENT_CHAR.
            return False
        print("[wxpython.py] KeyboardHandler::OnKeyEvent()")
        print("    type=%s" % event["type"])
        print("    modifiers=%s" % event["modifiers"])
        print("    windows_key_code=%s" % event["windows_key_code"])
        print("    native_key_code=%s" % event["native_key_code"])
        print("    is_system_key=%s" % event["is_system_key"])
        print("    character=%s" % event["character"])
        print("    unmodified_character=%s" % event["unmodified_character"])
        print("    focus_on_editable_field=%s"\
                % event["focus_on_editable_field"])
        if platform.system() == "Linux":
            # F5
            if event["native_key_code"] == 71:
                print("[wxpython.py] F5 pressed, calling"\
                        " browser.ReloadIgnoreCache()")
                browser.ReloadIgnoreCache()
                return True
            # Escape
            if event["native_key_code"] == 9:
                print("[wxpython.py] Esc pressed, calling browser.StopLoad()")
                browser.StopLoad()
                return True
            # F12
            if event["native_key_code"] == 96:
                print("[wxpython.py] F12 pressed, calling"\
                        " browser.ShowDevTools()")
                browser.ShowDevTools()
                return True
        elif platform.system() == "Windows":
            # F5 todo
            # Escape todo
            pass
        elif platform.system() == "Darwin":
            # Cmd+Opt+I
            if event["modifiers"] == 136 and event["character"] == 94:
                browser.ShowDevTools()
                return True
            # F5
            if event["modifiers"] == 0 and event["character"] == 63240:
                browser.ReloadIgnoreCache()
                return True
            # Esc
            if event["modifiers"] == 0 and event["character"] == 27:
                browser.StopLoad()
                return True
        return False

    # -------------------------------------------------------------------------
    # RequestHandler
    # -------------------------------------------------------------------------
dataset/ETHPy150Open cztomczak/cefpython/cefpython/cef3/mac/binaries_32bit/wxpython.py/ClientHandler.OnKeyEvent/original