summaryrefslogtreecommitdiff
path: root/src/macros/windows.py
diff options
context:
space:
mode:
authorSébastien Dailly <sebastien@dailly.me>2023-08-13 10:46:51 +0200
committerSébastien Dailly <sebastien@dailly.me>2023-08-13 10:46:58 +0200
commit259cb021db412471baf1478a6aa619ed0545d997 (patch)
tree279c128c592eb24a15241e42fa003050c2a1c4c8 /src/macros/windows.py
parent6716fbc7a1ec5d14887d54b7d0286a149d15d46a (diff)
Update the macrosHEADmaster
Diffstat (limited to 'src/macros/windows.py')
-rw-r--r--src/macros/windows.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/src/macros/windows.py b/src/macros/windows.py
new file mode 100644
index 0000000..6e9896d
--- /dev/null
+++ b/src/macros/windows.py
@@ -0,0 +1,36 @@
+from keycode_win_frnb import Keycode # Use the french bepo layout
+
+import skeleton
+from actions import Action
+
+def tab(macropad, key, pressed):
+ Action().key(pressed, [Keycode.RIGHT_ALT, Keycode.TAB])
+
+def win_l(macropad, key, pressed):
+ Action().key(pressed, [Keycode.CONTROL, Keycode.WINDOWS, Keycode.LEFT_ARROW])
+
+def win_r(macropad, key, pressed):
+ Action().key(pressed, [Keycode.CONTROL, Keycode.WINDOWS, Keycode.RIGHT_ARROW])
+
+def close(macropad, key, pressed):
+ Action().key(pressed, [Keycode.ALT, Keycode.F4])
+
+def rot_cw(macropad, key, pressed):
+ Action().key(pressed, [Keycode.RIGHT_ARROW])
+
+def rot_ccw(macropad, key, pressed):
+ Action().key(pressed, [Keycode.LEFT_ARROW])
+
+def build_application():
+ configuration = skeleton.Configuration("Windows")
+ configuration.hidden = True
+
+ configuration.registerKey(2, "x", close, 0x050000)
+ configuration.registerKey(7, "^<", win_l, 0x000000)
+ configuration.registerKey(8, "^>", win_r, 0x000000)
+ configuration.registerKey(11, "^TAB", tab, 0x000000)
+ configuration.registerKey(12, "", rot_cw, None)
+ configuration.registerKey(13, "", rot_ccw, None)
+ return configuration
+
+configuration = build_application()