Skip to content

Re-basing my repository. #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Oct 26, 2020
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Python Keyboard
===============
PYKB - Python Keyboard
======================

English | [中文][1]
---------|----------
Expand Down
21 changes: 17 additions & 4 deletions code.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
L3B = LAYER_TAP(3, B)
LSFT4 = LAYER_MODS(4, MODS(LSHIFT))
RSFT4 = LAYER_MODS(4, MODS(RSHIFT))
L5S = LAYER_TAP(5, S)

# Semicolon & Ctrl
SCC = MODS_TAP(MODS(RCTRL), ';')
SINS = MODS_KEY(MODS(SHIFT), INSERT)

keyboard.keymap = (
# layer 0
Expand All @@ -37,18 +39,18 @@
# layer 2
(
'`', F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, DEL,
___, ___, ___, ___, ___, ___, ___,PGUP, ___, ___, ___,AUDIO_VOL_DOWN,AUDIO_VOL_UP,AUDIO_MUTE,
___, ___, ___, ___, ___, ___,HOME,PGUP, ___, ___,SINS,AUDIO_VOL_DOWN,AUDIO_VOL_UP,AUDIO_MUTE,
___, ___, ___, ___, ___, ___,LEFT,DOWN, UP,RIGHT, ___, ___, ___,
___, ___, ___, ___, ___, ___,PGDN, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,PGDN,END, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___, ___
),

# layer 3
(
BT_TOGGLE,BT1,BT2, BT3,BT4,BT5,BT6,BT7, BT8, BT9, BT0, ___, ___, ___,
RGB_MOD, ___, ___, ___, ___, ___,___,USB_TOGGLE,___,___,___,___,___, ___,
___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___,
RGB_TOGGLE,HUE_RGB,RGB_HUE,SAT_RGB,RGB_SAT,___,___,___,___,___,___,___, ___,
___, ___, ___, ___, ___, ___, ___, ___,VAL_RGB,RGB_VAL, ___, ___,
___, ___, ___, ___, ___, ___, ___, ___
),

Expand All @@ -60,6 +62,15 @@
___, ___, ___, ___, ___, B, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___, ___, ___
),

# layer 5
(
___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,MS_W_UP,MS_UL,MS_UP,MS_UR, ___, ___, ___, ___,
___, ___, ___, ___, ___, ___,MS_BTN1,MS_LT,MS_DN,MS_RT,MS_BTN2, ___, ___,
___, ___, ___, ___, ___, ___,MS_W_DN,MS_DL,MS_DN,MS_DR, ___, ___,
___, ___, ___, ___, ___, ___, ___, ___
),
)

# Use different keymaps on different connections
Expand Down Expand Up @@ -110,4 +121,6 @@ def pairs_handler(dev, n):
# Pairs: J & K, U & I
keyboard.pairs = [{35, 36}, {20, 19}]

# keyboard.verbose = False

keyboard.run()
Loading