From 597b007333d8ec0d9cfd29e6941fcbe57379108a Mon Sep 17 00:00:00 2001 From: Sébastien Dailly Date: Mon, 22 May 2023 08:40:47 +0200 Subject: Initial commit --- src/macros/teams.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 src/macros/teams.py (limited to 'src/macros/teams.py') diff --git a/src/macros/teams.py b/src/macros/teams.py new file mode 100644 index 0000000..621f8b6 --- /dev/null +++ b/src/macros/teams.py @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: 2021 Phillip Burgess for Adafruit Industries +# +# SPDX-License-Identifier: MIT + +# MACROPAD Hotkeys example: Mouse control + +# The syntax for Mouse macros is highly peculiar, in order to maintain +# backward compatibility with the original keycode-only macro files. +# The third item for each macro is a list in brackets, and each value within +# is normally an integer (Keycode), float (delay) or string (typed literally). +# Consumer Control codes were added as list-within-list, and then mouse +# further complicates this by adding dicts-within-list. Each mouse-related +# dict can have any mix of keys 'buttons' w/integer mask of button values +# (positive to press, negative to release), 'x' w/horizontal motion, +# 'y' w/vertical and 'wheel' with scrollwheel motion. + +# To reference Mouse constants, import Mouse like so... +from keycode_win_frnb import Keycode # Use the french bepo layout + +import skeleton +from actions import Action + +def conv(macropad, key, pressed): + Action().key(pressed, [Keycode.CONTROL, Keycode.TWO]) + +def planning(macropad, key, pressed): + Action().key(pressed, [Keycode.CONTROL, Keycode.FOUR]) + +def link(macropad, key, pressed): + Action().key(pressed, [Keycode.CONTROL, Keycode.K]) + +def build_application(): + + configuration = skeleton.Configuration("Teams") + configuration.visible = False + configuration.registerKey(0, "Convers.", conv, 0x050000) + configuration.registerKey(3, "Planning", planning, 0x050200) + configuration.registerKey(2, "Link", link, 0x020002) + + + return configuration + +configuration = build_application() + -- cgit v1.2.3