Browse Source

rough out a config

master
Brennen Bearnes 2 years ago
parent
commit
3572a7b45e
1 changed files with 39 additions and 0 deletions
  1. +39
    -0
      switch_config.py

+ 39
- 0
switch_config.py View File

@ -0,0 +1,39 @@
"""Configuration for SnakeSwitch keys."""
from adafruit_hid.keycode import Keycode
# Define a modifier key here for easy changing if window manager
# configuration changes - this is the Windows key on most keyboards:
MOD_KEY = Keycode.LEFT_GUI
LAYOUTS = {
# A default layout - just the modifier key on the 0th switch:
0: {
0: MOD_KEY,
},
# Add this for left and right arrows on the other two switches:
1: {
1: Keycode.LEFT_ARROW,
2: Keycode.RIGHT_ARROW,
},
# Chorded mod-left, mod-right - workspace switching in my XMonad
# setup:
2: {
1: (MOD_KEY, Keycode.LEFT_ARROW),
2: (MOD_KEY, Keycode.RIGHT_ARROW),
},
# These add some common chords to the primary mod key if used
# in combination with layout 0.
# Mod-Shift-G - brings up a list of active windows:
14: {
0: (Keycode.SHIFT, Keycode.G)
},
# Add this for mod-tab:
15: {
0: Keycode.TAB
}
}

Loading…
Cancel
Save