int OCCFace::offset(double offset, double tolerance = 1e-6) { try { BRepOffset_MakeOffset MO(this->getShape(), offset, tolerance, BRepOffset_Skin, Standard_False, Standard_False, GeomAbs_Intersection, Standard_False); if (!MO.IsDone()) { StdFail_NotDone::Raise("Failed to offset face"); } const TopoDS_Shape& tmp = MO.Shape(); BRepCheck_Analyzer aChecker(tmp); if (tmp.IsNull() || !aChecker.IsValid()) { StdFail_NotDone::Raise("offset result not valid"); } this->setShape(tmp); // possible fix shape if (!this->fixShape()) StdFail_NotDone::Raise("Shapes not valid"); } catch(Standard_Failure &err) { Handle_Standard_Failure e = Standard_Failure::Caught(); const Standard_CString msg = e->GetMessageString(); if (msg != NULL && strlen(msg) > 1) { setErrorMessage(msg); } else { setErrorMessage("Failed to offset face"); } return 0; } return 1; }
long get_size() { //si taille prédéfinie if(I->check1->value()) return taille[I->combo_taille->value()].n; else //si non prédéfinie { const char *s = I->taille->value(); int i = I->combo_mesure->value(); while(*s) { if(i==2 && *s=='.') { fn_alert("Attention, pas de virgule dans les octets..."); return 0; } if(!isdigit(*s) && *s!='.') { fn_alert("Le chiffre \"%s\" est incorrecte...\n",I->taille->value()); return 0; } s++; } //maintenant retourne la bonne valeur switch(i) { case 0: //MO return (long)MO(atof(I->taille->value())); case 1: //KO return (long)KO(atof(I->taille->value())); case 2: //Octet return (long)atof(I->taille->value()); } } return 0; }
bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { case MO(_LOWER): if (game){ if(record->event.pressed) { register_code(KC_SPC); } else { unregister_code(KC_SPC); } return false; } else { return true; } case MU_ON: if(record->event.pressed) { layer_off(_LOWER); layer_off(_RAISE); layer_off(_NAV); layer_off(_DEADKEY); layer_on(_MUSICMODE); } return true; case MU_OFF: if(record->event.pressed) { layer_off(_MUSICMODE); } return true; } return process_record_userspace(keycode, record); }
int OCCWire::offset(double distance, int joinType = 0) { Handle(TopTools_HSequenceOfShape) wires = new TopTools_HSequenceOfShape; Handle(TopTools_HSequenceOfShape) edges = new TopTools_HSequenceOfShape; TopExp_Explorer ex; try { GeomAbs_JoinType join = GeomAbs_Arc; switch (joinType) { case 1: join = GeomAbs_Tangent; break; case 2: join = GeomAbs_Intersection; break; } BRepOffsetAPI_MakeOffset MO(this->getWire(), join); MO.Perform(distance); for (ex.Init(MO.Shape(), TopAbs_EDGE); ex.More(); ex.Next()) { if (!ex.Current().IsNull()) { edges->Append(TopoDS::Edge(ex.Current())); } } ShapeAnalysis_FreeBounds::ConnectEdgesToWires(edges,Precision::Confusion(),Standard_True,wires); if (wires->Length() != 1) StdFail_NotDone::Raise("offset operation created empty result"); this->setShape(wires->Value(1)); // possible fix shape if (!this->fixShape()) StdFail_NotDone::Raise("Shapes not valid"); } catch(Standard_Failure &err) { Handle_Standard_Failure e = Standard_Failure::Caught(); const Standard_CString msg = e->GetMessageString(); if (msg != NULL && strlen(msg) > 1) { setErrorMessage(msg); } else { setErrorMessage("Failed to offset wire"); } return 0; } return 1; }
* | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | ß | ´ | BSPC | * |-----------------------------------------------------------------------------------------+ * | Tab | Q | W | E | R | T | Z | U | I | O | P | P | Ü | * | | * |-------------------------------------------------------------------------------------| + * | Layer_1 | A | S | D | F | G | H | J | K | L | Ö | Ä | # |Enter | * |-----------------------------------------------------------------------------------------+ * | Shift| < | Y | X | C | V | B | N | M | , | . | . | - | RShift | * |-----------------------------------------------------------------------------------------+ * | LCtrl | LGUI | LAlt | Space | RAlt | Layer_2 | RCtrl | * `-----------------------------------------------------------------------------------------' */ LAYOUT( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_SPC, KC_SPC, KC_NO, KC_RALT, KC_NO, MO(2), KC_RCTL), LAYOUT( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_DEL, KC_NO, RGB_TOG, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGUP, KC_NO, KC_NO, KC_NO, BL_DEC, BL_TOGG, BL_INC, BL_STEP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PGDOWN, KC_LGUI, KC_LGUI, KC_NO, KC_NO, KC_NO, KC_RALT, KC_RGUI, KC_NO, KC_NO, KC_RCTL), LAYOUT( KC_GRV, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_DEL, KC_NO, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_LEFT, KC_DOWN, KC_RIGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO,
*,-----------------------------------------------------------------------. * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12|Prnt|Ins|Del| * |----------------------------------------------------------------------| * | `| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| Backspace| Home| * |----------------------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| PgUp| * |----------------------------------------------------------------------| * |Ctrl| A| S| D| F| G| H| J| K| L| ;| '|Enter | PgDown| * |----------------------------------------------------------------------| * |Shif| | Z| X| C| V| B| N| M| ,| .| /|Shift | Up| End| * |----------------------------------------------------------------------| * |CapsLo|Gui |Alt |Mod|Sp | Sp| Alt| Gui| Ctrl| | Lef| Dow| Rig| * `----------------------------------------------------------------------' */ KEYMAP_V2( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_INS, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TRNS, KC_HOME, // KC_TRNS is the unneeded key in the split backspace. KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGUP, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_TRNS, KC_ENT, KC_PGDN, // KC_TRNS is uneeded ISO enter key. KC_LSFT, KC_TRNS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_END, // KC_TRNS is uneeded ISO layout key. KC_CAPS, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, KC_RALT, KC_RGUI, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT), KEYMAP_V2( RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RESET, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPLY, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_STOP, KC_MNXT), };
#ifdef RGBLIGHT_ENABLE //Following line allows macro to read current RGB settings extern rgblight_config_t rgblight_config; #endif enum custom_keycodes { RGBRST = SAFE_RANGE }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, MO(1), \ KC_ESC, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_ENT, LALT(KC_GRV), KC_LEFT,KC_DOWN,KC_RGHT \ ), [1] = LAYOUT( \ KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, \ RGB_TOG, RGBRST, RGB_HUI, RGB_SAI, RGB_VAI, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ XXXXXXX, RGB_MOD, RGB_HUD, RGB_SAD, RGB_VAD, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, KC_PGUP, _______, \ XXXXXXX, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_END \ ) }; // define variables for reactive RGB bool TOG_STATUS = false; int RGB_current_mode;
#include QMK_KEYBOARD_H // Define layer names #define _NORMAL 0 #define _FNONE 1 #define _FNTWO 2 // Highly Modified by Xydane const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_NORMAL] = LAYOUT_seventy_iso( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCREEN,KC_HOME, KC_END, \ KC_GRAVE, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_DELETE, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_PGUP, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_NUHS, KC_ENT,KC_PGDOWN, \ KC_LSPO, KC_NUBS,KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSPC,KC_UP, TT(2), \ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(1), KC_RCTL, KC_LEFT, KC_DOWN, KC_RIGHT ), [_FNONE] = LAYOUT_seventy_iso( KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS,KC_MUTE,KC_VOLD,KC_VOLU, KC_TRNS,KC_TRNS,KC_NLCK, KC_CALC, KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P1, KC_P2, KC_P3, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0, KC_PDOT,KC_PENT, KC_PSLS, KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS ), [_FNTWO] = LAYOUT_seventy_iso( KC_TRNS, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT, KC_TRNS,KC_MUTE,KC_VOLD,KC_VOLU, KC_TRNS,KC_TRNS,KC_NLCK, KC_CALC, KC_TRNS,KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P7, KC_P8, KC_P9, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P4, KC_P5, KC_P6, KC_PPLS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_P1, KC_P2, KC_P3, KC_PAST, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_P0, KC_PDOT,KC_PENT, KC_PSLS, KC_TRNS,KC_TRNS,KC_TRNS, \
#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_60_ansi( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_LALT, MO(1), KC_MENU, KC_LCTL ), [1] = LAYOUT_60_ansi( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, _______, RGB_TOG, KC_UP, RGB_MOD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, BL_DEC, BL_TOGG, BL_INC, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), };
#include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* QWERTY */ LAYOUT_all( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, MO(3), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_LCTL), /* DVORAK */ LAYOUT_all( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_RBRC, KC_GRV, KC_BSLS, KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_EQL, KC_BSPC, MO(3), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_ENT, KC_LSFT, KC_NUBS, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSFT, MO(3), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), /* COLEMAK */ LAYOUT_all( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSPC, MO(3), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, KC_ENT, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_LSFT, MO(3), KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, KC_RGUI, KC_RALT, KC_RCTL), /* FUNCTION */ LAYOUT_all( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS,
* (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include "cu24.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_grid( /* Base */ KC_MPLY, KC_MUTE, KC_VOLD, KC_VOLU, \ MO(1) , KC_PSLS, KC_PAST, KC_PMNS, \ KC_P7 , KC_P8 , KC_P9 , KC_PPLS, \ KC_P4 , KC_P5 , KC_P6 , KC_PPLS, \ KC_P1 , KC_P2 , KC_P3 , KC_PENT, \ KC_P0 , KC_P0 , KC_PDOT, KC_PENT ), [1] = LAYOUT_grid( /* FN */ RGB_TOG, RGB_MOD, BL_STEP, BL_BRTG, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, \ RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, \ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, \ KC_TRNS, KC_TRNS, RESET , KC_TRNS ), };
// M60-A layout #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // Vim layer (Default) [0] = LAYOUT_60_hhkb( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, MT(MOD_LCTL, KC_ESC), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LALT, KC_LGUI, LT(1, KC_SPC), DF(2), MO(1)), // Extra Function Layer [1] = LAYOUT_60_hhkb( XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MNXT, KC_MPLY, KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, KC_LCTL, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_LEFT, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLD, KC_VOLU, KC_MUTE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(3)), // Gamer Layer [2] = LAYOUT_60_hhkb( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_ESC, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(1), KC_LALT, KC_LGUI, KC_SPC, DF(0), MO(1)), // Board config Layer (zeal60 Configuration) [3] = LAYOUT_60_hhkb(
#include QMK_KEYBOARD_H #include "action_layer.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // 0: Base Layer [0] = LAYOUT_all( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_NO, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_SLSH, \ KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_LEFT, KC_DOWN, KC_RIGHT), // 1: Function Layer [1] = LAYOUT_all( RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NO, KC_NO, \ KC_NO, RGB_HUI, RGB_SAI, RGB_VAI, RGB_MOD, KC_HOME,KC_CALC,KC_NO, KC_INS, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_DEL, \ KC_NO, RGB_HUD, RGB_SAD, RGB_VAD, RGB_RMOD, KC_END, KC_PGDN,KC_NO, KC_NO, KC_NO, KC_HOME, KC_PGUP, KC_NO, KC_ENT, \ KC_LSFT, KC_NO, KC_NO, KC_APP, BL_STEP, KC_NO, KC_NO, KC_VOLD,KC_VOLU,KC_MUTE, KC_END, KC_RSFT, KC_NO , KC_PGUP, KC_INS, \ KC_LCTL, KC_LGUI, KC_LALT, KC_BSPC,KC_SPC, KC_DEL, KC_RGUI, MO(1), KC_HOME, KC_PGDOWN,KC_END), }; // Macros /* const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function switch(id) { case 0: if (record->event.pressed) { register_code(KC_RSFT); }
* |FN2 | COPY | CUT | PASTE| FN1 | | [ | ] | \ | UNDO | CTRL+A | * `----------------------------------' `------------------------------------' * ,-------------. ,-------------. * | DEL | | | END | HOME | * ,------|------|------| |------+--------+------. * | | | SUPER| | PgUp | | | * | BACK | CTRL |------| |------| Enter |SPACE | * | SPACE| | ALT | | PgDn | | | * `--------------------' `----------------------' */ [0] = LAYOUT_ergodox( TG(1), KC_1, KC_2, KC_3, KC_4, KC_5, LALT(KC_LSHIFT), KC_TAB, KC_QUOTE, KC_COMMA, KC_DOT, KC_P, KC_Y, TG(3), KC_ESCAPE, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSHIFT, KC_SCOLON, KC_Q, KC_J, KC_K, KC_X, TG(2), MO(3), LCTL(KC_C), LCTL(KC_X), LCTL(KC_V), MO(2), KC_DELETE, KC_TRNS, KC_LGUI, KC_BSPACE,CTL_T(KC_NO),KC_LALT, KC_TILD, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQUAL, KC_TRNS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLASH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINUS, KC_TRNS, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_LSHIFT, KC_LBRACKET, KC_RBRACKET, KC_BSLASH, KC_UNDO, LCTL(KC_A), KC_END, KC_HOME, KC_PGUP, KC_PGDOWN, KC_ENTER, KC_SPACE ), /* Keymap 1: Hebrew layer
*/ #include QMK_KEYBOARD_H // Defines the keycodes used by our macros in process_record_user enum custom_keycodes { MANUAL = SAFE_RANGE, DBLZERO }; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( /* Base */ TO(1), KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_LBRC, KC_BSPC, \ TO(1), KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_RBRC, KC_BSLS, \ KC_NO, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_NO, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_PSCR, KC_DEL, \ KC_LCTL, KC_LCTL, KC_LGUI, KC_LALT, MO(1), KC_SPC, KC_SPC, MO(2), KC_GRV, KC_MENU, KC_MINS, KC_EQL ), [1] = LAYOUT( /* Fn, Arrowkeys, Media control, Backlight */ TO(2), _______, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_VOLU, _______, \ TO(2), _______, _______, KC_PGUP, _______, _______, KC_F11, KC_F12, _______, KC_UP, _______, _______, KC_VOLD, BL_STEP, \ TO(0), _______, KC_HOME, KC_PGDN, KC_END, _______, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_MPLY, _______, \ TO(0), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_INS, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ ), [2] = LAYOUT( /* Mousekeys and Numpad */ KC_NO, _______, _______, _______, _______, _______, _______, KC_NLCK, KC_P7, KC_P8, KC_P9, KC_PSLS, _______, _______, \ KC_NO, _______, KC_BTN1, KC_MS_U, KC_BTN2, KC_WH_U, _______, _______, KC_P4, KC_P5, KC_P6, KC_PAST, _______, _______, \ TO(1), _______, KC_MS_L, KC_MS_D, KC_MS_R, KC_WH_D, _______, _______, KC_P1, KC_P2, KC_P3, KC_PMNS, _______, _______, \ TO(1), _______, KC_ACL0, KC_ACL1, KC_ACL2, KC_BTN3, _______, DBLZERO, KC_P0, KC_PDOT, KC_PENT, KC_PPLS, _______, MANUAL, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ )
#include QMK_KEYBOARD_H extern bool g_suspend_state; #define _LAYER0 0 #define _LAYER1 1 #define _LAYER2 2 #define _LAYER3 3 #define _LAYER4 4 const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_LAYER0] = LAYOUT_HHKB( /* Base */ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, CTL_T(KC_CAPS), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(2), KC_LCTL, KC_LGUI, KC_LALT, KC_SPACE, KC_RALT, MO(1), KC_RCTL), [_LAYER1] = LAYOUT_HHKB( /* FN */ KC_GRAVE, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, KC_TRNS, KC_CALC, KC_TRNS, KC_INS, KC_TRNS, KC_PSCR, KC_SLCK, KC_PAUS, RESET ,\ KC_TRNS, KC_LEFT, KC_DOWN, KC_RIGHT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGUP, KC_TRNS, KC_TRNS,\ KC_MPRV, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDOWN,KC_MNXT, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, TO(3), KC_TRNS, KC_TRNS, KC_TRNS), [_LAYER2] = LAYOUT_HHKB( /* FN2 */ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL ,\ KC_TRNS, RGB_TOG, KC_TRNS, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, RGB_VAI, RGB_VAD, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, RESET ,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_SPI, RGB_SPD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,\ KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_LAYER3] = LAYOUT_HHKB( /* FN3 */ KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,\ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLASH,\ CTL_T(KC_CAPS),KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_DEL, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, MO(4),\
* |-----------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| * |-----------------------------------------------------------| * |Caps | A| S| D| F| G| H| J| K| L| ;| '|Return | * |-----------------------------------------------------------| * |LShift | Z| X| C| V| B| N| M| ,| .| /| RShift | * |-----------------------------------------------------------| * |Ctrl|Gui |Alt | Space |Fn0 |Gui |App|Ctrl| * `-----------------------------------------------------------' */ [0] = LAYOUT_60_ansi( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, MO(1), KC_RGUI, KC_APP, KC_RCTL), /* Keymap 1: FN Layer * ,-----------------------------------------------------------. * |` | F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12| Del | * |-----------------------------------------------------------| * | | |Up | | | | | |Prt|Scl|Pau|Up| | Ins | * |-----------------------------------------------------------| * | |Lft|Dwn|Rig| | | | |Hme|PgU|Lef|Rig| | * |-----------------------------------------------------------| * | | | | | |VolD|VolU|Mut|End|PgD|Dwn| | * |-----------------------------------------------------------| * | | | | | | | | | * `-----------------------------------------------------------' */ [1] = LAYOUT_60_ansi(
* |MO(1)| U | I | A | E | O |-----!-----! S | N | R | T | D | SS | * !-----+----+----+----x----x----! ! !----x----x----+----+----+-----! * |MO(3)| UE | OE | AE | C | V |END | TAB | B | M |COMM| DOT| UP | Y | * '-----+----+----+----+----+----------'----------+----+----+----+----+-----' * | | |LGUI|LALT|LCTL| !RCTL|RALT|LEFT|DOWN|RGHT| * '------------------------' '------------------------' * .-----------. .-----------. * |INS |TG(2)| !M(UM)|DELT | * .-----+-----+-----! !-----+-----+-----. * ! ! | APP | ! PGUP| ! ! * ! ! !-----! !-----! ! ! * |BSPC |LSFT | ESC | ! PGDN|ENTER|SPACE| * '-----------------' '-----------------' */ [L0] = KEYMAP( MO(5), DE_1, DE_2, DE_3, DE_4, DE_5, DE_ACUT, MO(4), DE_X, DE_P, DE_F, DE_W, DE_G, KC_HOME, MO(1), DE_U, DE_I, DE_A, DE_E, DE_O, MO(3), DE_UE, DE_OE, DE_AE, DE_C, DE_V, KC_END, KC_TRNS, KC_TRNS, KC_LGUI, KC_LALT, KC_LCTL, /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_INS, TG(2), /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_APP, /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, KC_LSFT, KC_ESC, DE_GRV, DE_6, DE_7, DE_8, DE_9, DE_0, DE_CIRC, TG(2), DE_H, DE_J, DE_K, DE_L, DE_Q, DE_Z, /*-*/ DE_S, DE_N, DE_R, DE_T, DE_D, DE_SS, KC_TAB, DE_B, DE_M, DE_COMM, DE_DOT, KC_UP, DE_Y, /*-*/ /*-*/ KC_RCTL, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT, M(UM), KC_DELT, KC_PGUP, KC_PGDN, KC_ENTER, KC_SPACE
* |-----------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | * |-----------------------------------------------------------| * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | * |-----------------------------------------------------------| * |Ctrl|Gui |Alt | Space |Alt |Gui |FN |Ctrl | * `-----------------------------------------------------------' */ [_BL] = KEYMAP( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI, MO(_FL),KC_RCTL), /* Keymap _FL: Function Layer * ,-----------------------------------------------------------. * | | | | | | | | | | | | | | RESET| * |-----------------------------------------------------------| * | | | | | | | | | | | |BL-|BL+|BL | * |-----------------------------------------------------------| * | | | | | | | | | | | | | * |-----------------------------------------------------------| * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | * |-----------------------------------------------------------| * | | | | | | | | | * `-----------------------------------------------------------' */ [_FL] = KEYMAP(
(at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include QMK_KEYBOARD_H const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_DEL, KC_INS, KC_PGUP, KC_PGDN, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PPLS, MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_RCTL, MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT), [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_HOME, KC_END, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_CAPS, KC_MPRV, KC_VOLU, KC_MNXT, KC_PGUP, KC_INS, KC_HOME, LCTL(KC_LEFT), LCTL(KC_RGHT), KC_END, KC_PSCR, KC_SLCK, KC_PAUS, _______, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_MPLY, KC_PGDN, KC_DEL, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, LCTL(KC_BSPC), LCTL(KC_DEL), _______, _______, _______, _______, KC_PGUP, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_APP, _______, KC_HOME, KC_PGDN, KC_END, _______, _______), }; const uint16_t PROGMEM fn_actions[] = {};
* |--------------------------------------------------------------------------| |----| * | Tab| Q| W| E| R| T| Y| U| I| O| P| [| ]| \| |PGDN| * |--------------------------------------------------------------------------| `----' * |Capslck| A| S| D| F| G| H| J| K| L| ;| '| # | Ent| * |-----------------------------------------------------------------------------. * |Shift| BS| Z| X| C| V| B| N| M| ,| .| /| BS|Shift| UP| * |------------------------------------------------------------------------|----|----. * | Ctrl| Gui| Alt| MHen| Space| Space| Hen| Alt| Ctrl| _FL|LEFT|DOWN|RGHT| * `----------------------------------------------------------------------------------' */ [_BL] = KEYMAP( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_GRV, KC_BSPC, KC_PGUP, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_PGDN, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_NUHS, KC_ENT, \ KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RO, KC_RSFT, KC_UP, \ KC_LCTL, KC_LGUI, KC_LALT, KC_MHEN, KC_SPC,KC_SPC, KC_HENK, KC_RALT, KC_RCTL, MO(_FL), KC_LEFT, KC_DOWN, KC_RGHT), /* Keymap _FL: Function Layer * ,--------------------------------------------------------------------------. ,----. * | `| F1| F2| F3| F4| F5| F6| F7| F8| F9| F10| F11| F12| | Del| |BLIN| * |--------------------------------------------------------------------------| |----| * | | | | | | | | |PScr|SLck|Paus| | | | |BLDE| * |--------------------------------------------------------------------------| `----' * | | | _RS| | | | | | | | | | | | * |-----------------------------------------------------------------------------. * | | | | | | | | | | | | | | |PGUP| * |------------------------------------------------------------------------|----|----. * | | | | | | | | | | _FL|HOME|PGDN| END| * `----------------------------------------------------------------------------------' */ [_FL] = KEYMAP(
L_CP_NX, //LEB Color Pattern Select Next }; #define TG_NKRO MAGIC_TOGGLE_NKRO //Toggle 6KRO / NKRO mode #define ______ KC_TRNS keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, \ KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ ), [1] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MUTE, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_MPLY, KC_MSTP, KC_VOLU, \ L_T_BR, L_PSD, L_BRI, L_PSI, _______, _______, _______, U_T_AUTO,U_T_AGCR,_______, MO(2), _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, \ L_T_PTD, L_PTP, L_BRD, L_PTN, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, L_T_MD, L_T_ONF, _______, _______, MD_BOOT, TG_NKRO, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ ), [2] = LAYOUT( _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ L_CP_NX, L_SP_SL, L_SP_WD, L_SP_FA, _______, _______, L_CP_NX, L_SP_SL, L_SP_WD, L_SP_FA, _______, _______, _______, _______, _______, _______, _______, \ L_CP_PR, L_SP_PR, L_SP_NW, L_SP_NE, _______, _______, L_CP_PR, L_SP_PR, L_SP_NW, L_SP_NE, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, TG_NKRO, _______, _______, _______, _______, _______, _______, \
| SHIFT | NUBS | Z | X | C | V | B | N | M | < | > | ? | SHIFT | UP | 1 | 2 | 3 | ENTER | |_________|________|________|________|________|________|________|________|________|________|________|________|________________|________|________|________|________|________| | | | | | | MO | MO | | | | | | | | CTRL | LGUI | L ALT | SPACE | R ALT | _FN | _FN | LEFT | DOWN | RIGHT | 0 | . | ENTER | |__________|__________|__________|________________________________________________________|________|________|________|________|________|________|________|________|________| */ LAYOUT( KC_ESC, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_HOME, KC_END, KC_PGUP, KC_PGDN, KC_DEL, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSLS, KC_P7, KC_P8, KC_P9, KC_PMNS, KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_P1, KC_P2, KC_P3, KC_PENT, KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_RALT, MO(1), MO(1), KC_LEFT, KC_DOWN, KC_RGHT, KC_P0, KC_PDOT, KC_PENT), /* Layer 1, function layer ____________________________________________________________________________________________________________________________________________________________________________ | | | | | | | | | | | | | | | VOL | VOL | | | | | RESET | | | | | | | | | | | | | MUTE | DOWN | UP | | | | |________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________|________| | | RGB | | RGB | HUE | HUE | SATUR. | SATUR. | VALUE | VALUE | | | | | | | | | | | TOGGLE | | MODE |INCREASE| DCRSE |INCREASE| DCRSE |INCREASE| DCRSE | | | | | | | | | |____________|________|________|________|________|________|________|________|________|________|________|________|________|_____________|________|________|________|________| | BACKLIGHT | | | | | | | | | | | | | | | | |
#include "jc65.h" const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = KEYMAP( KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSLS, KC_GRV, KC_INS, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC, KC_BSPC, KC_DEL, KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, KC_PGUP, KC_LSFT, KC_NUBS, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_UP, KC_PGDN, KC_LALT, KC_LCTL, KC_LGUI, KC_SPACE, KC_SPACE, KC_SPACE, MO(1), KC_NO, MO(2), KC_LEFT, KC_DOWN, KC_RGHT ), [1] = KEYMAP( KC_GRV, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN2, KC_MS_U, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_HOME, KC_END, KC_DEL, KC_TRNS, KC_CAPS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, KC_TRNS, KC_LEFT, KC_DOWN, KC_UP, KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PGDN, KC_PGUP, KC_TRNS, KC_TRNS, KC_PGUP, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [2] = KEYMAP( RGB_TOG, RGB_M_P, RGB_M_B, RGB_M_R, RGB_M_SW, RGB_M_SN, RGB_M_K, RGB_M_X, RGB_M_G, RGB_MOD, RGB_RMOD, BL_STEP, BL_TOGG, KC_TRNS, KC_TRNS, RESET, KC_TRNS, RGB_HUI, RGB_SAI, RGB_VAI, KC_TRNS, RGB_TOG, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, BL_INC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_HUD, RGB_SAD, RGB_VAD, KC_TRNS, RGB_HUD, RGB_HUI, KC_TRNS, KC_TRNS, KC_TRNS, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, RGB_VAD, RGB_VAI, KC_TRNS, KC_TRNS, RGB_MOD, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), };
int main(int argc, char *argv[]) { char *matchesFile = 0L; FILE *logFile = 0L; int arg=1; while (arg < argc) { if (strcmp(argv[arg], "-m") == 0) { matchesFile = argv[++arg]; } else if (strcmp(argv[arg], "-l") == 0) { errno = 0; logFile = fopen(argv[++arg], "w"); if (errno) fprintf(stderr, "Failed to open logfile '%s': %s\n", strerror(errno), argv[arg]), exit(1); } else { usage(argv[0]); exit(1); } arg++; } if (matchesFile == 0L) usage(argv[0]), exit(1); if (logFile == 0L) usage(argv[0]), exit(1); atacFile AF(matchesFile); atacMatchList &ML = *AF.matches(); atacMatchOrder MO(ML); // Sort by either axis. MO.sortA(); // We need to compute the identity of the gap; our metric (thanks to Nelson) is // if ("long" and "not low identity") or ("short"), close the gap // We could use the seqCache, but with only a handful of gaps, we // just let the OS cache stuff. seqCache *C1 = new seqCache(AF.assemblyFileA(), 2, false); seqCache *C2 = new seqCache(AF.assemblyFileB(), 1024, false); seqInCore *S1 = 0L; seqInCore *S2 = 0L; for (uint32 iter=0; iter<10; iter++) { uint32 gapsize = 1000; uint32 fgaps = 0; uint32 rgaps = 0; int mergeuid = 1; for (uint32 i=1; i<MO.numMatches(); i++) { atacMatch *l = MO[i-1]; atacMatch *r = MO[i]; bool joinMatches = false; uint32 gap1 = 0; uint32 gap2 = 0; if ((l->iid1 == r->iid1) && // Matches are between the same sequences (l->iid2 == r->iid2) && (l->fwd2 == r->fwd2)) { // Matches are the same orientation if (l->fwd2 == true) { if ((l->pos1 + l->len1 <= r->pos1) && // Matches are ordered correctly (should be, from the sort) (l->pos2 + l->len2 <= r->pos2)) { gap1 = r->pos1 - (l->pos1 + l->len1); gap2 = r->pos2 - (l->pos2 + l->len2); if ((gap1 == gap2) && (gap1 <= gapsize)) { S1 = C1->getSequenceInCore(l->iid1); S2 = C2->getSequenceInCore(l->iid2); char *s1 = S1->sequence() + l->pos1 + l->len1; char *s2 = S2->sequence() + l->pos2 + l->len1; uint32 identities = 0; uint32 n1 = 0; uint32 n2 = 0; for (uint32 p=0; p<gap1; p++) { if (toUpper[(int)s1[p]] == toUpper[(int)s2[p]]) identities++; if (toUpper[(int)s1[p]] == 'N') n1++; if (toUpper[(int)s2[p]] == 'N') n2++; } if ((100*n1 < 20*gap1) && // gap is not N and (100*n2 < 20*gap1) && // gap is not N and ((100*identities < 80*gap1) || // (gap is high identity ((gap1 < 11) && (2*gap1 <= l->len1) && (2*gap1 <= r->len1)) || // (gap is short, and the flanks are big ((gap1 < 11) && (100*identities < 90*gap1)))) { // (gap is short and high quality // ALSO need to check that the gap is not actually // mapped in sequence 2. Not really, just make sure // these two matches are in the same run. // if (strcmp(l->parentuid, r->parentuid) != 0) { fprintf(logFile, "HEY! F gap of size "uint32FMT" not in a run?\n", gap1); l->print(logFile, AF.labelA(), AF.labelB()); r->print(logFile, AF.labelA(), AF.labelB()); } else { fgaps++; joinMatches = true; //fprintf(logFile, "potential f gap of size L "uint32FMTW(4)" (n1="uint32FMTW(4)" n2="uint32FMTW(4)" ident="uint32FMTW(4)"/"uint32FMTW(4)")!\n", // gap1, n1, n2, identities, gap1); //l->print(logFile, AF.labelA(), AF.labelB()); //r->print(logFile, AF.labelA(), AF.labelB()); } } } } } // was a forward match if (l->fwd2 == false) { if ((l->pos1 + l->len1 <= r->pos1) && // Matches are ordered correctly (should be, from the sort) (r->pos2 + r->len2 <= l->pos2)) { gap1 = r->pos1 - (l->pos1 + l->len1); gap2 = l->pos2 - (r->pos2 + r->len2); if ((gap1 == gap2) && (gap1 <= gapsize)) { S1 = C1->getSequenceInCore(l->iid1); S2 = C2->getSequenceInCore(l->iid2); char *s1 = S1->sequence() + l->pos1 + l->len1; char *s2 = S2->sequence() + r->pos2 + r->len2; uint32 identities = 0; uint32 n1 = 0; uint32 n2 = 0; for (uint32 p=0, q=gap1-1; p<gap1; p++, q--) { if (toUpper[(int)s1[p]] == toUpper[complementSymbol[(int)s2[q]]]) identities++; if (toUpper[(int)s1[p]] == 'N') n1++; if (toUpper[(int)s2[q]] == 'N') n2++; } // Gap is short, flanks are big // Gap is short, flanks are short and gap is good if ((100*n1 < 20*gap1) && // gap is not N and (100*n2 < 20*gap1) && // gap is not N and ((100*identities < 80*gap1) || // (gap is high identity ((gap1 < 11) && (2*gap1 <= l->len1) && (2*gap1 <= r->len1)) || // (gap is short, and the flanks are big ((gap1 < 11) && (100*identities < 90*gap1)))) { // (gap is short and high quality // ALSO need to check that the gap is not actually // mapped in sequence 2. Not really, just make sure // these two matches are in the same run. // if (strcmp(l->parentuid, r->parentuid) != 0) { fprintf(logFile, "HEY! R gap of size "uint32FMT" not in a run?\n", gap1); l->print(logFile, AF.labelA(), AF.labelB()); r->print(logFile, AF.labelA(), AF.labelB()); } else { rgaps++; joinMatches = true; //fprintf(logFile, "potential r gap of size L "uint32FMTW(4)" (n1="uint32FMTW(4)" n2="uint32FMTW(4)" ident="uint32FMTW(4)"/"uint32FMTW(4)")!\n", // gap1, n1, n2, identities, gap1); //l->print(logFile, AF.labelA(), AF.labelB()); //r->print(logFile, AF.labelA(), AF.labelB()); } } } } } } if (joinMatches) { fprintf(logFile, "CLOSE "uint32FMT"----------------------------------------\n", gap1); l->print(logFile, AF.labelA(), AF.labelB()); r->print(logFile, AF.labelA(), AF.labelB()); MO.mergeMatches(l, r, mergeuid); l->print(logFile, AF.labelA(), AF.labelB()); mergeuid++; i--; } } fprintf(logFile, "At gapSize="uint32FMT" closed "uint32FMT" f-gaps and "uint32FMT" r-gaps.\n", gapsize, fgaps, rgaps); if (fgaps + rgaps == 0) iter = 10; } #if 0 // This analyzes an atac mapping, looking for a signature that indicates a bad // alignment. If we have an alignment of: // XXXXXXaC-YYYYYY // XXXXXX-CtYYYYYY // this will generate three matches, instead of one match with mismatches in it. // We scan the FORWARD matches for this pattern, and report any we find. // // We only found 3 on huref4 vs b35. Further development here was stopped. for (uint32 i=2; i<ML.numMatches(); i++) { atacMatch *l = ML[i-2]; atacMatch *m = ML[i-1]; atacMatch *r = ML[i]; if (m->len1 < 3) { // The match in the middle is small if ((l->iid1 == r->iid1) && // Matches are between the same sequences (l->iid2 == r->iid2) && (l->fwd2 == r->fwd2)) { // Matches are the same orientation if (l->fwd2 == true) { if ((l->pos1 + l->len1 <= r->pos1) && // Matches are ordered correctly (should be, from the sort) (l->pos2 + l->len2 <= r->pos2)) { uint32 gapl1 = m->pos1 - (l->pos1 + l->len1); uint32 gapl2 = m->pos2 - (l->pos2 + l->len2); uint32 gapr1 = r->pos1 - (m->pos1 + m->len1); uint32 gapr2 = r->pos2 - (m->pos2 + m->len2); if ((gapl1 + gapr1 == gapl2 + gapr2) && (gapl1 + gapr1 < 5)) { fprintf(logFile, "potential f fix of size L "uint32FMT" "uint32FMT" and R "uint32FMT" "uint32FMT"!\n", gapl1, gapl2, gapr1, gapr2); l->print(logFile, "A", "B"); m->print(logFile, "A", "B"); r->print(logFile, "A", "B"); } } else { fprintf(logFile, "sort is forward broken.\n"); } } // was a forward match } } } #endif // Write the new output to stdout -- we preserve runs here, but // discard everything else. // AF.writeHeader(stdout); for (uint32 i=0; i<MO.numMatches(); i++) MO[i]->print(stdout, AF.labelA(), AF.labelB()); for (uint32 i=0; i<AF.runs()->numberOfMatches(); i++) AF.runs()->getMatch(i)->print(stdout, AF.labelA(), AF.labelB()); return(0); }
* |-----------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ | * |-----------------------------------------------------------| * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return | * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | * |-----------------------------------------------------------| * |Ctrl|Alt |Gui | Space |Gui |Alt |FN |Ctrl | * `-----------------------------------------------------------' */ [BASE_LAYER] = KEYMAP_ANSI( F(0), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC, KC_RBRC,KC_BSLS, \ KC_CAPS, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_QUOT, KC_ENTER, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH, KC_RSFT, \ KC_LCTL, KC_LALT, KC_LGUI, F(1), KC_RGUI, KC_RALT, MO(ADJUST_LAYER),KC_RCTL), /* Keymap SPACEFN_LAYER * ,-----------------------------------------------------------. * | | | | | | | | |play|prev|next|v dn|v up|delete | * |-----------------------------------------------------------| * | | | | | | |home|end | up| | | | | | * |-----------------------------------------------------------| * | | | | | | |pgup| lt| dn| rt| | | | * |-----------------------------------------------------------| * | | | | | | |pgdn| | | | | | * |-----------------------------------------------------------| * | | | | SpaceFn | | | | | * `-----------------------------------------------------------' */ [SPACEFN_LAYER] = KEYMAP_ANSI(
* |-----------------------------------------------------------| * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \| * |-----------------------------------------------------------| * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | * |-----------------------------------------------------------| * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn0| * |-----------------------------------------------------------' * | |Gui|Alt | Space |Alt |Gui| | | * `-----------------------------------------------------------' */ [0] = KEYMAP( KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSLS,KC_GRV, \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC,KC_RBRC,KC_BSPC, \ KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, LT(3, KC_SCLN), KC_QUOT,MT(KC_RCTL, KC_ENT), \ OSM(MOD_LSFT), KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM,KC_DOT, LT(2, KC_SLSH), KC_RSFT,TG(1), \ KC_NO, KC_LGUI,KC_LALT, LT(4, KC_SPC), MO(4), KC_RGUI,KC_NO, KC_NO), /* Layer 1: HHKB mode (HHKB Fn) * ,-----------------------------------------------------------. * |Pwr| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| * |-----------------------------------------------------------| * |Caps | | | | | | | |Psc|Slk|Pus|Up | |Backs| * |-----------------------------------------------------------| * | |VoD|VoU|Mut| | | *| /|Hom|PgU|Lef|Rig|Enter | * |-----------------------------------------------------------| * | | | | | | | +| -|End|PgD|Dow| | | * `-----------------------------------------------------------' * | |Gui|Alt | Space |Alt |Gui| | | * `-----------------------------------------------------------' */ [1] = KEYMAP(
* `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | ~ | '" |AltShf| Down | Up | | Left | Right| [ | ] | LCmk | * `----------------------------------' `----------------------------------' * ,-------------. ,---------------. * | LGui | Alt | | Alt |Ctrl/Esc| * ,------|------|------| |------+--------+------. * | | | Home | | PgUp | | | * |Backsp|Delete|------| |------| Enter |Space | * |ace | | End | | PgDn | | | * `--------------------' `----------------------' */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* [DVORAK] = KEYMAP( // layer 0 : dvorak // left hand KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, MO(FN), KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_EQL, KC_LCTL, KC_A, KC_O, KC_E, KC_U, KC_I, KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, ALL_T(KC_NO), KC_GRV, KC_QUOT, LALT(KC_LSFT), KC_DOWN, KC_UP, KC_LGUI, KC_LALT, KC_HOME, KC_BSPC, KC_DELT, KC_END, // right hand MO(FN), KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSLS, KC_BSLS, KC_F, KC_G, KC_C, KC_R, KC_L, KC_SLSH, KC_D, KC_H, KC_T, KC_N, KC_S, KC_MINS, KC_RGUI, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_LEFT, KC_RGHT, KC_LBRC, KC_RBRC, TO(COLEMAK,1), KC_LALT, CTL_T(KC_ESC), KC_PGUP,
#include "tv44.h" extern keymap_config_t keymap_config; const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [0] = LAYOUT_arrow_command( /* 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, LT(2, KC_TAB), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, LT(2, KC_ENT), KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_UP, MT(MOD_RSFT, KC_SLSH), KC_LCTL, KC_LGUI, KC_LALT, MO(3), LT(1, KC_SPC), KC_SPC, MO(4), KC_LEFT, KC_DOWN, KC_RIGHT ), [1] = LAYOUT_arrow_command( /* LAYER 2 */ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_MINS, KC_EQL, KC_QUOT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_PGUP, KC_BSLS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [2] = LAYOUT_arrow_command( /* LAYER 1 */ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UNDS, KC_PLUS, KC_DQUO, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LCBR, KC_RCBR, KC_PGUP, KC_PIPE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_HOME, KC_PGDN, KC_END ), [3] = LAYOUT_arrow_command( /* LAYER 3 */ KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F11, KC_F12, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), [4] = LAYOUT_arrow_command( /* Gaming Layer*/ KC_ESC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_WH_U, KC_BTN1, KC_MS_U, KC_BTN2, KC_TRNS, KC_TRNS,
#include "mechmini.h" #define _BL 0 #define _FN1 1 #define _FN2 2 #define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_BL] = KEYMAP_625_SPACE( F(0), KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, KC_TAB, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_ENT, KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_LSFT, KC_DOT, KC_LCTL, KC_LALT, KC_LGUI, KC_SPC, MO(1), MO(2)), [_FN1] = KEYMAP_625_SPACE( KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_DEL, KC_TRNS, KC_PGUP, KC_VOLU, KC_TRNS, KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_MINS, KC_EQL, KC_TRNS, KC_LSFT, KC_PGDN, KC_VOLD, KC_TRNS, KC_TRNS, KC_TRNS, KC_SCLN, KC_QUOT, KC_SLSH, KC_TRNS, KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), [_FN2] = KEYMAP_625_SPACE( KC_PWR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, RESET, KC_TRNS, BL_TOGG, BL_STEP, BL_INC, BL_DEC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_CAPS, RGB_TOG, RGB_MOD, RGB_VAI, RGB_VAD, RGB_HUI, RGB_HUD, RGB_SAI, RGB_SAD, KC_TRNS, KC_END, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {