rename to cg_swap and added docs

This commit is contained in:
Syed Hussaini 2022-04-08 22:09:55 -05:00 committed by Kyle Brown
parent 3f0283422d
commit 6002ad33e1
2 changed files with 14 additions and 1 deletions

13
docs/cg_swap.md Normal file
View File

@ -0,0 +1,13 @@
# Ctrl Gui Swap
This module allows to swap Ctrl with Gui and vice versa. This will reset on restart to the default implementation
## Enabling the module
```python
from kmk.module.cg_swap import CgSwap
# cg_swap disabled on startup
cg_swap = CgSwap()
# cg_swap enabled on startup
# cg_swap = CgSwap(true)
keyboard.modules.append(cg_swap)
```

View File

@ -2,7 +2,7 @@ from kmk.keys import KC, ModifierKey, make_key
from kmk.modules import Module
class SwapKeys(Module):
class CgSwap(Module):
# default cg swap is disabled, can be eanbled too if needed
def __init__(self, cg_swap_enable=False):
self.cg_swap_enable = cg_swap_enable