From 72ad9d762a88b2435a0a1ef14ef46588bed9e9a4 Mon Sep 17 00:00:00 2001 From: Paul Cutler Date: Wed, 14 Sep 2022 21:20:14 -0500 Subject: [PATCH 1/3] Update gitignore to also include .venv for virtual envs --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 544ec4a..db3d538 100644 --- a/.gitignore +++ b/.gitignore @@ -37,6 +37,7 @@ _build # Virtual environment-specific files .env +.venv # MacOS-specific files *.DS_Store From 57715f0d03be54e11e88dbf80130dd24966a7dcc Mon Sep 17 00:00:00 2001 From: Paul Cutler Date: Wed, 14 Sep 2022 21:20:47 -0500 Subject: [PATCH 2/3] Fix issue #40 - docs rendering improperly for keys function --- adafruit_macropad.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/adafruit_macropad.py b/adafruit_macropad.py index 9883868..a862cdd 100755 --- a/adafruit_macropad.py +++ b/adafruit_macropad.py @@ -397,9 +397,8 @@ def keys(self) -> Keys: * ``key_number``: the number of the key that changed. Keys are numbered starting at 0. * ``pressed``: ``True`` if the event is a transition from released to pressed. * ``released``: ``True`` if the event is a transition from pressed to released. - ``released`` is always the opposite of ``pressed``; it's provided - for convenience and clarity, in case you want to test for - key-release events explicitly. + ``released`` is always the opposite of ``pressed``; it's provided for convenience + and clarity, in case you want to test for key-release events explicitly. The following example prints the key press and release events to the serial console. From 317f56533f2324f00de5a8d36df012fbc7572dd7 Mon Sep 17 00:00:00 2001 From: Paul Cutler Date: Thu, 15 Sep 2022 12:29:48 -0500 Subject: [PATCH 3/3] Update fix for issue #40 with Alec's feedback --- adafruit_macropad.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adafruit_macropad.py b/adafruit_macropad.py index a862cdd..9750cce 100755 --- a/adafruit_macropad.py +++ b/adafruit_macropad.py @@ -397,8 +397,9 @@ def keys(self) -> Keys: * ``key_number``: the number of the key that changed. Keys are numbered starting at 0. * ``pressed``: ``True`` if the event is a transition from released to pressed. * ``released``: ``True`` if the event is a transition from pressed to released. - ``released`` is always the opposite of ``pressed``; it's provided for convenience - and clarity, in case you want to test for key-release events explicitly. + + ``released`` is always the opposite of ``pressed``; it's provided for convenience + and clarity, in case you want to test for key-release events explicitly. The following example prints the key press and release events to the serial console.