Skip to content
This repository has been archived by the owner on Dec 30, 2021. It is now read-only.

Commit

Permalink
#15 qmk keycode compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanjermakov committed Aug 28, 2020
1 parent 1adc0c0 commit 5622168
Showing 1 changed file with 33 additions and 2 deletions.
35 changes: 33 additions & 2 deletions key.py
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
# actions

# modifier key actions
def MKA(key, modifiers):
def MK(key, modifiers):
return ModifiedKeyAction(key, modifiers)


Expand Down Expand Up @@ -594,9 +594,20 @@ def HYPR(key):
KC_MEH = ModifiedKeyAction(None, KC_LCTL, KC_LSHIFT, KC_LALT)
KC_HYPR = ModifiedKeyAction(None, KC_LCTL, KC_LSHIFT, KC_LALT, KC_LGUI)

C = LCTL
S = LSFT
A = LALT
LOPT = LALT
G = LGUI
LCMD = LGUI
LWIN = LGUI
ROPT = RALT
ALGR = RALT
SAGR = RSA


# mod tap actions
def MTA(key, modifier):
def MT(key, modifier):
return ModTapAction(key, modifier)


Expand Down Expand Up @@ -662,3 +673,23 @@ def MEH_T(key):

def HYPR_T(key):
return ModTapAction(key, KC_LCTL, KC_LSHIFT, KC_LALT, KC_LGUI)


CTL_T = LCTL_T
SFT_T = LSFT_T
LOPT_T = LALT_T
ALT_T = LALT_T
OPT_T = LALT_T
LCMD_T = LGUI_T
LWIN_T = LGUI_T
GUI_T = LGUI_T
CMD_T = LGUI_T
WIN_T = LGUI_T
ROPT_T = RALT_T
ALGR_T = RALT_T
RCMD_T = RGUI_T
RWIN_T = RGUI_T
SCMD_T = SGUI_T
SWIN_T = SGUI_T
SAGR_T = RSA_T
ALL_T = HYPR_T

0 comments on commit 5622168

Please sign in to comment.