TRNS, TRNS,TRNS,TRNS ), }; /* id for user defined functions */ enum function_id { TEENSY_KEY, }; /* * Fn action definition */ static const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_SET(2, ON_PRESS), // FN2 - push Layer2 ACTION_LAYER_SET(3, ON_PRESS), // FN3 - push Layer3 ACTION_LAYER_SET(0, ON_PRESS), // FN4 - push Layer0 ACTION_LAYER_TAP_KEY(4, KC_SPC), // FN5 - puhs Layer5, Navigation Layer }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) { if (id == TEENSY_KEY) { clear_keyboard(); print("\n\nJump to bootloader... "); _delay_ms(250); bootloader_jump(); // should not return print("not supported.\n"); }
/* 1: Cat */ KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,PSCR,PAUS,NLCK,SLCK, \ NO, NO, NO, NO, NO, NO, NO,ACL2, NO,MS_U,BTN2, GRV, RBRC, NO, UP, NO, NO, \ CAPS,VOLD,VOLU,MUTE, NO, NO, NO,ACL1,MS_L,MS_D,MS_R, FN3, NO,LEFT,DOWN,RGHT, NO, \ LSFT, NO, NO, NO, NO, NO, NO,ACL0,BTN1,WH_D,WH_U, NO, NO, NO, NO, NO, NO, \ LCTL,LALT, FN0, NO, DEL, NO, FN2,FN3, FN1,RALT, NO, NO, NO, NO, NO, NO, NO), /* 2: Key */ KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, INS,PSCR,PAUS,NLCK,SLCK, \ NO, NO, NO, NO, NO, NO, NO,ACL2, NO,MS_U,BTN2, GRV, NUBS, NO, NO, NO, NO, \ CAPS,VOLD,VOLU,MUTE, NO, NO, NO,ACL1,MS_L,MS_D,MS_R, NO, NO, NO, NO, NO, NO, \ LSFT, NO, NO, NO, NO, NO, NO,ACL0,BTN1,WH_D,WH_U, NO, NO, NO, NO, NO, NO, \ LCTL,LALT, FN0, NO, DEL, NO, FN2,FN3, FN1,RALT, NO, NO, NO, NO, NO, NO, NO), /* 3: CURSOR */ KEYMAP(PWR, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,PSCR,PAUS,NLCK,SLCK, \ NO, NO, NO, NO, NO, NO, NO,ACL2, NO,MS_U,BTN2, GRV, RBRC, NO, UP, NO, NO, \ CAPS,VOLD,VOLU,MUTE, NO, NO, NO,ACL1,MS_L,MS_D,MS_R, FN3, NO,LEFT,DOWN,RGHT, NO, \ LSFT, NO, NO, NO, NO, NO, NO,ACL0,BTN1,WH_D,WH_U, NO, NO, NO, NO, NO, NO, \ LCTL,LALT, FN0, NO, DEL, NO, FN2,FN3, FN1,RALT, NO, NO, NO, FN4, NO, NO, NO), }; const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_MOMENTARY(1), ACTION_LAYER_TAP(2, KC_ENT), ACTION_MODS_KEY(MOD_LSFT, KC_1), ACTION_MODS_KEY(MOD_LSFT, KC_MINS), ACTION_LAYER_TAP(3, KC_PENT), ACTION_MODS_ONESHOT(MOD_LSFT) };
TEENSY_KEY, }; enum macro_id { PASSWORD1, PASSWORD2, PASSWORD3, PASSWORD4, PASSWORD5, }; /* * Fn action definition */ static const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_SET(4, ON_PRESS), // FN2 - set Layer4 ACTION_LAYER_MOMENTARY(5), // FN3 - switch to Layer5 ACTION_LAYER_SET(0, ON_PRESS), // FN4 - set Layer0 ACTION_LAYER_MOMENTARY(6), // FN5 - switch to Layer6 ACTION_MACRO(PASSWORD1), // FN6 - password macro 1 ACTION_MACRO(PASSWORD2), // FN7 - password macro 2 ACTION_MACRO(PASSWORD3), // FN8 - password macro 3 ACTION_MACRO(PASSWORD4), // FN9 - password macro 4 ACTION_MACRO(PASSWORD5), // FN10 - password macro 5 }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) { if (id == TEENSY_KEY) { clear_keyboard();
// numpad KEYMAP(NO, NO, NO, NO, NO, NO, NO, TRNS,NO, NLCK,PMNS,PAST,PSLS,NO, \ NO, NO, NO, NO, NO, NO, NO, NO, NO, P7, P8, P9, PPLS,NO, \ NO, NO, NO, NO, NO, NO, NO, NO, NO, P4, P5, P6, PPLS,NO, \ NO, NO, NO, NO, NO, NO, NO, NO, NO, P1, P2, P3, PENT,NO, \ TRNS,TRNS,TRNS,NO, TRNS,TRNS, TRNS, P0, PDOT,PENT,NO ) }; enum function_action { BACKLIGHT_BRIGHTNESS }; void action_function(keyrecord_t* record, uint8_t id, uint8_t opt) { switch (id) { case BACKLIGHT_BRIGHTNESS: if (record->event.pressed) backlight_adjust(); break; } } const uint16_t PROGMEM fn_actions[] = { ACTION_LAYER_TOGGLE(2), // 0 toggle qwerty ACTION_MODS_KEY(MOD_LSFT, KC_LBRC), // 1 left curly brace '{' ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // 2 right curly brace '}' ACTION_LAYER_MOMENTARY(1), // 3 fn layer for dvorak ACTION_LAYER_MOMENTARY(3), // 4 fn layer for qwerty ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // 5 pipe '|' ACTION_FUNCTION(BACKLIGHT_BRIGHTNESS), // 6 light brightness ACTION_LAYER_TOGGLE(4) // 7 mouse };
TRNS,TRNS,TRNS ), }; /* id for user defined functions */ enum function_id { TEENSY_KEY, }; /* * Fn action definition */ static const uint16_t PROGMEM fn_actions[] = { ACTION_FUNCTION(TEENSY_KEY), // FN0 - Teensy key ACTION_LAYER_MOMENTARY(1), // FN1 - switch to Layer1 ACTION_LAYER_MOMENTARY(2), // FN2 - set Layer2 ACTION_LAYER_TOGGLE(3), // FN3 - toggle Layer3 aka Numpad layer ACTION_LAYER_SET(0, ON_PRESS), // FN4 - set Layer0 }; void action_function(keyrecord_t *event, uint8_t id, uint8_t opt) { if (id == TEENSY_KEY) { clear_keyboard(); print("\n\nJump to bootloader... "); _delay_ms(250); bootloader_jump(); // should not return print("not supported.\n"); } }