Skip to content
A custom widget for returning mouse and keyboard events to Python. Demo notebook:
Python TypeScript JavaScript
Branch: master
Clone or download

README.md

ipyevents

Binder

ipyevents provides a custom widget for returning mouse and keyboard events to Python. Use it to:

  • add keyboard shortcuts to an existing widget;
  • react to the user clicking on an image;
  • install callbacks on arbitrary mouse and keyboard events.

See this demo notebook for documentation.

Special thanks to the contributors to ipyevents!

Installation

To install using conda:

$ conda install -c conda-forge ipyevents

To install use pip:

$ pip install ipyevents
$ jupyter nbextension enable --py --sys-prefix ipyevents

To install with JupyterLab (whether you installed with conda or pip):

$ jupyter labextension install @jupyter-widgets/jupyterlab-manager ipyevents

For a development installation (requires npm),

$ git clone https://github.com/mwcraig/ipyevents.git
$ cd ipyevents
$ pip install -e .
$ jupyter nbextension install --py --symlink --sys-prefix ipyevents
$ jupyter nbextension enable --py --sys-prefix ipyevents

For Jupyter Lab also do this:

$ npm install
$ npm run build
$ jupyter labextension install
You can’t perform that action at this time.