Пример #1
0
layers_ext = Layers()

encoder_ext = EncoderHandler([board.D40], [board.D41], encoder_map)
encoder_ext.encoders[0].is_inverted = True

keyboard.modules = [layers_ext, encoder_ext]

keyboard.tap_time = 250
keyboard.debug_enabled = False

# custom keys
NEW = KC.LCTL(KC.N)
NEW_DIR = KC.LCTL(KC.LSFT(KC.N))
CAD = KC.LCTL(KC.LALT(KC.DEL))
RES = KC.LCTL(KC.LSFT(KC.ESC))
FE = KC.LGUI(KC.E)
LT1_DEL = KC.LT(1, KC.DEL)
LT2_ENT = KC.LT(2, KC.ENT)
SAVE_AS = KC.LCTL(KC.LSFT(KC.S))
PSCR = KC.LGUI(KC.PSCR)
SNIP = simple_key_sequence((
    KC.LGUI,
    KC.MACRO_SLEEP_MS(25),
    KC.S,
    KC.N,
    KC.I,
    KC.P,
    KC.MACRO_SLEEP_MS(25),
    KC.ENT,
))
Пример #2
0
WPM = send_string(
    'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Bibendum arcu vitae elementum curabitur vitae nunc sed. Facilisis sed odio morbi quis.'
)

keyboard.leader_mode = LeaderMode.TIMEOUT
keyboard.leader_dictionary = {
    'hello': send_string('hello world from kmk macros'),
    'wpm': WPM,
    'atf': emoticons.ANGRY_TABLE_FLIP,
    'tf': emoticons.TABLE_FLIP,
    'fca': emoticons.FLAG_CA,
    'fus': emoticons.FLAG_US,
    'cel': emoticons.CELEBRATORY_GLITTER,
    'shr': emoticons.SHRUGGIE,
    'poop': emoticons.POOP,
    'ls': KC.LGUI(KC.HOME),
    'dbg': KC.DBG,
}

_______ = KC.TRNS
xxxxxxx = KC.NO
HELLA_TD = KC.TD(
    KC.A,
    KC.B,
    send_string('macros in a tap dance? I think yes'),
    KC.TG(1),
)


def shrek_is_life(*args, **kwargs):
    '''
layers_ext = Layers()

keyboard.extensions = [media]
keyboard.modules = [layers_ext]

# Cleaner key names
_______ = KC.TRNS
XXXXXXX = KC.NO

keyboard.keymap = [
    [  #Nav Keys
        KC.INSERT, KC.HOME, KC.PGUP, KC.DELETE, KC.END, KC.PGDOWN, XXXXXXX,
        KC.UP, XXXXXXX, KC.LEFT, KC.DOWN, KC.RIGHT
    ],
    [  #I3
        KC.LGUI(KC.L),
        KC.LGUI(KC.LSHIFT(KC.UP)),
        KC.LGUI(KC.LSHIFT(KC.P)),
        KC.LGUI(KC.LSHIFT(KC.LEFT)),
        KC.LGUI(KC.LSHIFT(KC.DOWN)),
        KC.LGUI(KC.LSHIFT(KC.RIGHT)), XXXXXXX,
        KC.LGUI(KC.UP), XXXXXXX,
        KC.LGUI(KC.LEFT),
        KC.LGUI(KC.DOWN),
        KC.LGUI(KC.RIGHT)
    ],
    [  #Media keys
        KC.MUTE, KC.MPLY, KC.MSTP, KC.MRWD, XXXXXXX, KC.MFFD, XXXXXXX, KC.VOLU,
        XXXXXXX, KC.MPRV, KC.VOLD, KC.MNXT
    ],
]
Пример #4
0
)

keyboard.leader_mode = LeaderMode.ENTER
keyboard.leader_dictionary = {
    'hello': send_string('hello world from kmk macros'),
    'wpm': WPM,
    'atf': emoticons.ANGRY_TABLE_FLIP,
    'tf': emoticons.TABLE_FLIP,
    'fca': emoticons.FLAG_CA,
    'fus': emoticons.FLAG_US,
    'cel': emoticons.CELEBRATORY_GLITTER,
    'shr': emoticons.SHRUGGIE,
    'shre': emoticons.SHRUG_EMOJI,
    'poop': emoticons.POOP,
    'joy': emoticons.FACE_JOY,
    'ls': KC.LGUI(KC.HOME),  # Lock screen
    'cw': KC.LGUI(KC.END),  # Close window
    'dbg': KC.DBG,
}

_______ = KC.TRNS
xxxxxxx = KC.NO
HELLA_TD = KC.TD(
    KC.A,
    KC.B,
    send_string('macros in a tap dance? I think yes'),
    KC.TG(1),
)

keyboard.keymap = [
    [
Пример #5
0
    OFF = 0
    ON = 2**15
    buzzer.duty_cycle = ON
    buzzer.frequency = 2000
    time.sleep(0.2)
    buzzer.frequency = 1000
    time.sleep(0.2)
    buzzer.duty_cycle = OFF

LOWER = KC.MO(1)
RAISE = KC.MO(2)
ADJUST = KC.MO(3)
CT_TAB = KC.MT(KC.TAB, KC.LCTRL)
CT_QUOT = KC.MT(KC.QUOT, KC.LCTRL)
SF_MINS = KC.MT(KC.MINS, KC.LSHIFT)
SG_PSCR = KC.LSFT(KC.LGUI(KC.PSCR))
SF_PSCR = KC.LSFT(KC.PSCR)
CG_RGHT = KC.LCTRL(KC.LGUI(KC.RGHT))
RESET = KC.RESET
LANG1 = KC.LANG1
LANG2 = KC.LANG2

keyboard.keymap = [
    [  # QWERTY
        # ------+--------+--------+--------+--------+--------+                 +--------+--------+--------+--------+--------+--------+
        KC.GESC, KC.Q,    KC.W,    KC.E,    KC.R,    KC.T,                      KC.Y,    KC.U,    KC.I,    KC.O,    KC.P,    KC.BSPC,\
        # ------+--------+--------+--------+--------+--------+                 +--------+--------+--------+--------+--------+--------+

        CT_TAB,  KC.A,    KC.S,    KC.D,    KC.F,    KC.G,                      KC.H,    KC.J,    KC.K,    KC.L,    KC.SCLN, CT_QUOT,\
        # ------+--------+--------+--------+--------+--------+                 +--------+--------+--------+--------+--------+--------+