Skip to main content

Pygame Event Handler

A simple python package that helps with handling events in pygame-ce.

Features

  • Provides easy-to-use interface for checking if a key is pressed,held, or released (keyboard and mouse buttons)
  • Provides easy-to-use interface to find the location of the mouse cursor
  • Calculates delta time and real time FPS
  • Checks window and mouse focus

Usage

import pygame as pg
from pygame_event_handler.event_handler import EventHandler

pg.init()
screen = pg.display.set_mode([800,600])

event_handler = EventHandler()

while not event_handler.should_quit:
    event_handler.get_events()

Example

In this Video, you can see the features in action, especially window and mouse focus, and held keys.

https://github.com/user-attachments/assets/b8e183ae-26c6-4057-a869-ecc986e25688

Release files for pygame-event-handler 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pygame-event-handler 0.0.2
File Size Uploaded
pygame_event_handler-0.0.2.tar.gz 4.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pygame-event-handler 0.0.2
File Interpreter ABI Platform
pygame_event_handler-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size:8.2 kB

Release files / pygame_event_handler-0.0.2.tar.gz

Download URL pygame_event_handler-0.0.2.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
cc48d4ebcb4a54c30cac51977a795f77235093a027538d3f55f73dc4f07c6067
BLAKE2b-256 checksum
How to use checksums
4e38b576bf1207755a56fc53671afb04545a0655295c1baf6055a31e13ceb381
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / pygame_event_handler-0.0.2-py3-none-any.whl

Download URL pygame_event_handler-0.0.2-py3-none-any.whl
Size 3.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f740c788b8581d96cad82256e9b038bfca28e0c064b12d74ae3dcb71750ed101
BLAKE2b-256 checksum
How to use checksums
63bef81ffb0ad906cb7e00ae45bee3ae45263bbe245ad8560f0b850aec1cbb9c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page