Skip to main content

Gogo Keyboard

Press keyboard 🦍 Get key 🦍 Unga Bunga

Requirements Compatibility
python
sdl2
mit
asyncio
ROS 2
zenoh

Python Asyncio library to simply get keyboard presses and releases. Gogo Keyboard creates a new independent SDL2 window that captures the key events.

pip install gogo_keyboard[dll]
python3 -m gogo_keyboard.example

Motivation:

  • Keyboard presses and releases in Asyncio.
  • Only when clicking on the Gorilla window.
  • Python terminal is free for other tasks.
  • Based on asyncio_for_robotics for seamless compatibility with:
    • ROS 2
    • Zenoh
    • More
python python python

Installation

This library requires sdl2 and sdl2_image. By specifying the [dll] optional dependency, those will be installed by pip.

pip install gogo_keyboard[dll]

Conda pacakge: soon!

Python Example

Example is provided here and can be run with python3 -m gogo_keyboard.example.

Here is a minimal piece of working code:

import asyncio
from gogo_keyboard.keyboard import KeySub

async def async_main():
    key_sub = KeySub()
    async for key in key_sub.listen_reliable(exit_on_close=True):
        print(key)

asyncio.run(async_main())

ROS 2 Example (Humble, Jazzy, Kilted)

A very simple ROS 2 node is provided here, run it with python3 -m gogo_keyboard.ros_node. The messages format is a json formatted String, 🦍 simple 🦍 Unga Bunga.

Zenoh Example

A very simple Zenoh publisher is provided here, run it with python3 -m gogo_keyboard.zenoh_node. The messages format is a json formatted String, 🦍 simple 🦍 Unga Bunga.

Metadata

Release files for gogo_keyboard 1.0.3

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

Source distribution (sdist)

Source distribution for gogo_keyboard 1.0.3
File Size Uploaded
gogo_keyboard-1.0.3.tar.gz 14.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gogo_keyboard 1.0.3
File Interpreter ABI Platform
gogo_keyboard-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 29.6 kB

Release files / gogo_keyboard-1.0.3.tar.gz

Download URL gogo_keyboard-1.0.3.tar.gz
Size 14.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fc20e246b68020b88c19c3a236310e2470a963ed06353f72d26baeb5eada09a3
BLAKE2b-256 checksum
How to use checksums
eec0af5bcb734ce0c2a908bd492bc8ba747a44b80396edab4d875bc0418ab57c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.23

Release files / gogo_keyboard-1.0.3-py3-none-any.whl

Download URL gogo_keyboard-1.0.3-py3-none-any.whl
Size 15.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
674c30c240af41c4a18b7d6343c25ce94df6fbeadddf089915a5fbacc6040286
BLAKE2b-256 checksum
How to use checksums
82344bca11f0b34ba914db4a9d967ac98c28d361122869c07983760b88df92ff
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.23

Release history Release notifications | RSS feed

This release

1.0.3 This release

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.0

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