bpo-31546: Fix input hook integration (GH-7978)

2 files changed