Very broken, but some work done probably

This commit is contained in:
Kyle Brown
2018-09-21 17:22:03 -07:00
committed by Josh Klar
parent d0f35100b3
commit 7ae2d18e45
9 changed files with 63 additions and 13 deletions

View File

@@ -1,7 +1,9 @@
def process(self, state, key):
self.logger.warning(key)
if key.code == 1000:
def process(self, state, action):
self.logger.warning(action['keycode'])
if action['keycode'].code == 1000:
reset(self)
elif action['keycode'].code == 1050:
df(self, "Filler", action)
def reset(self):
@@ -9,3 +11,32 @@ def reset(self):
import machine
machine.bootloader()
return self
def df(self, layer, action):
"""Switches the default layer"""
self.logger.warning(action['active_layers'])
def mo(layer):
"""Momentarily activates layer, switches off when you let go"""
def lm(layer, mod):
"""As MO(layer) but with mod active"""
def lt(layer, kc):
"""Momentarily activates layer if held, sends kc if tapped"""
def tg(layer):
"""Toggles the layer (enables it if no active, and vise versa)"""
def to(layer):
"""Activates layer and deactivates all other layers"""
def tt(layer):
"""Momentarily activates layer if held, toggles it if tapped repeatedly"""