Skip to main content

DisplayPad

This library allows you to customize your own Mountain DisplayPad by assigning each button its own custom function, image or color.

Example

import asyncio

from displaypad import DisplayPad


async def main():
    # Create a new DisplayPad instance
    pad = DisplayPad.DisplayPad()

    # Define event handlers
    @pad.on('down')
    def on_key_down(key_index):
        print(f"Key {key_index} has been pressed.")

    # Define event handlers
    @pad.on('up')
    def on_key_down(key_index):
        print(f"Key {key_index} has been released.")

    # Define event handlers
    @pad.on('error')
    def on_error(error):
        print(f"Error: {error}")

    # Clear all keys
    pad.clear_all_keys()

    # Set the first three keys to red, green and blue
    pad.set_key_color(0, 255, 0, 0)
    pad.set_key_color(1, 0, 255, 0)
    pad.set_key_color(2, 0, 0, 255)

    # Keep the script running
    while True:
        await asyncio.sleep(1)

if __name__ == "__main__":
    # Run the main function
    asyncio.run(main())

Release files for DisplayPad 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 DisplayPad 1.0.3
File Size Uploaded
displaypad-1.0.3.tar.gz 4.6 kB Details

Built distribution (wheel)

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

Total release size: 9.5 kB

Release files / displaypad-1.0.3.tar.gz

Download URL displaypad-1.0.3.tar.gz
Size 4.6 kB
Tags Source
SHA-256 checksum
How to use checksums
333211bb253bb33c32d9171ec859641c9b5ce883b6cdd07269680fa09993866f
BLAKE2b-256 checksum
How to use checksums
42ac043372e545d08c74e899750af64cdc050c5fa87f7a26879c1035371de070
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

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

Download URL DisplayPad-1.0.3-py3-none-any.whl
Size 4.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
75f65326a3468b70b0d455e8a9d1a964f6e1d747c76a615971442bb009ddce33
BLAKE2b-256 checksum
How to use checksums
06d2ec33a09b9649b042c0f0186c6c752f672cbbeeced517442dca571d9d4547
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.9.20

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

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