]> git.friedersdorff.com Git - max/tmk_keyboard.git/commitdiff
Modified CUB layout
authorOleg Kostyuk <cub.uanic@gmail.com>
Wed, 4 Sep 2013 21:03:22 +0000 (00:03 +0300)
committerOleg Kostyuk <cub.uanic@gmail.com>
Wed, 4 Sep 2013 21:03:42 +0000 (00:03 +0300)
keyboard/ergodox/keymap_cub.h

index 178d10f1d2c2f0e5d9a956d4d0b89dcc3fdd787d..0446bdc9670c65f7c1a04d3c890069cc56e470c7 100644 (file)
@@ -30,16 +30,16 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         FN1, FN6, CAPS,LALT,LGUI,
                                       FN2, HOME,
                                            END,
-                                 BSPC,ESC, SPC,
+                                 FN8, FN9, FN10,
         // right hand
              QUOT,6,   7,   8,   9,   0,   EQL,
              FN3, Y,   U,   I,   O,   P,   LBRC,
-                  H,   J,   K,   L,   SCLN,RSFT,
-             FN4, N,   M,   COMM,DOT, SLSH,RCTL,
+                  H,   J,   K,   L,   SCLN,MINS,
+             FN4, N,   M,   COMM,DOT, SLSH,RBRC,
                        LEFT,UP,  DOWN,RGHT,FN4,
         PGUP,DEL,
         PGDN,
-        INS, ENT, SPC
+        FN11,FN12,FN13
     ),
 
     KEYMAP(  // layout: layer 1: F-keys instead of numbers
@@ -48,19 +48,19 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
         TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-        TRNS,TRNS,TRNS,LALT,LGUI,
+        TRNS,TRNS,TRNS,TRNS,TRNS,
                                       TRNS,TRNS,
                                            TRNS,
-                                 LCTL,LSFT,TRNS,
+                                 TRNS,TRNS,TRNS,
         // right hand
-             F7,  F8,  F9,  F10, F11, F12, MINS,
-             TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,RBRC,
+             F7,  F8,  F9,  F10, F11, F12, TRNS,
+             TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
                   TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
              TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,TRNS,
-                       RGUI,RALT,TRNS,TRNS,TRNS,
+                       TRNS,TRNS,TRNS,TRNS,TRNS,
         TRNS,TRNS,
         TRNS,
-        TRNS,RSFT,RCTL
+        TRNS,TRNS,TRNS
     ),
 
     KEYMAP(  // layout: layer 2: mouse + numpad
@@ -90,19 +90,19 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         TRNS,F13, F14, F15, F16, NO,  TRNS,
         TRNS,F17, F18, F19, F20, NO,  
         TRNS,F21, F22, F23, F24, NO,  TRNS,
-        TRNS,TRNS,TRNS,LALT,LGUI,
+        TRNS,TRNS,TRNS,TRNS,TRNS,
                                       TRNS,TRNS,
                                            TRNS,
-                                 LCTL,LSFT,TRNS,
+                                 TRNS,TRNS,TRNS,
         // right hand
              NO,  NO,  NO,  NO,  NO,  NO,  TRNS,
              TRNS,NO,  F1,  F2,  F3,  F4,  TRNS,
                   NO,  F5,  F6,  F7,  F8,  TRNS,
              TRNS,NO,  F9,  F10, F11, F12, TRNS,
-                       RGUI,RALT,TRNS,TRNS,TRNS,
+                       TRNS,TRNS,TRNS,TRNS,TRNS,
         TRNS,TRNS,
         TRNS,
-        TRNS,RSFT,RCTL
+        TRNS,TRNS,TRNS
     ),
 
     KEYMAP(  // layout: layer 4: F-keys + cursor
@@ -111,19 +111,19 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
         FN7, NO,  PGUP,UP,  PGDN,PGUP,TRNS,
         TRNS,NO,  LEFT,DOWN,RGHT,PGDN,
         TRNS,NO,  NO,  END, HOME,NO,  TRNS,
-        FN5, TRNS,TRNS,LALT,LGUI,
+        FN5, TRNS,TRNS,TRNS,TRNS,
                                       TRNS,TRNS,
                                            TRNS,
-                                 LCTL,LSFT,TRNS,
+                                 TRNS,TRNS,TRNS,
         // right hand
              F7,  F8,  F9,  F10, F11, F12, MINS,
              TRNS,PGUP,PGUP,UP,  PGDN,NO,  FN7,
                   PGDN,LEFT,DOWN,RGHT,NO,  TRNS,
              TRNS,NO,  HOME,END, NO,  NO,  TRNS,
-                       RGUI,RALT,TRNS,TRNS,TRNS,
+                       TRNS,TRNS,TRNS,TRNS,TRNS,
         TRNS,TRNS,
         TRNS,
-        TRNS,RSFT,RCTL
+        TRNS,TRNS,TRNS
     ),
 
     KEYMAP(  // layout: layer 5: Workman layout
@@ -148,6 +148,8 @@ static const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
     ),
 
 /*
+    // templates to copy from
+
     KEYMAP(  // layout: layer N: transparent on edges, all others are empty
         // left hand
         TRNS,NO,  NO,  NO,  NO,  NO,  NO,  
@@ -201,14 +203,26 @@ enum function_id {
  * Fn action definition
  */
 static const uint16_t PROGMEM fn_actions[] = {
-    ACTION_DEFAULT_LAYER_SET(0),                    // FN0 - switch to Layer0
+    ACTION_LAYER_SET(0, ON_BOTH),                   // FN0 - switch to Layer0
     ACTION_LAYER_MOMENTARY(1),                      // FN1 - push Layer1
-    ACTION_DEFAULT_LAYER_SET(2),                    // FN2 - switch to Layer2
+    ACTION_LAYER_SET(2, ON_BOTH),                   // FN2 - switch to Layer2
     ACTION_LAYER_MOMENTARY(3),                      // FN3 - push Layer3
     ACTION_LAYER_MOMENTARY(4),                      // FN4 - push Layer4
-    ACTION_DEFAULT_LAYER_SET(5),                    // FN5 - switch to Layer5
+    ACTION_LAYER_SET(5, ON_BOTH),                   // FN5 - switch to Layer5
     ACTION_LAYER_MOMENTARY(2),                      // FN6 - push Layer2
     ACTION_FUNCTION(TEENSY_KEY),                    // FN7 - Teensy key
+
+    ACTION_MODS_TAP_KEY(MOD_LCTL, KC_BSPC),         // FN8  = LShift with tap BackSpace
+    ACTION_MODS_TAP_KEY(MOD_LSFT, KC_ESC),          // FN9  = LCtrl with tap Escape
+    ACTION_MODS_TAP_KEY(MOD_LALT, KC_SPC),          // FN10 = LAlt with tap Space
+    ACTION_MODS_TAP_KEY(MOD_RALT, KC_INS),          // FN11 = RAlt with tap Ins
+    ACTION_MODS_TAP_KEY(MOD_RSFT, KC_ENT),          // FN12 = RShift with tap Enter
+    ACTION_MODS_TAP_KEY(MOD_RCTL, KC_SPC),          // FN13 = RCtrl with tap Space
+
+    /*
+    ACTION_LAYER_TAP_KEY(1, KC_SPC),                // FN0 = L1 symbols 
+    ACTION_LAYER_TAP_KEY(1, KC_ENT),                // FN5 = L1 symbols 
+    */
 };
 
 void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
@@ -217,11 +231,15 @@ void action_function(keyrecord_t *event, uint8_t id, uint8_t opt)
     print("id  = "); phex(id); print("\n");
     print("opt = "); phex(opt); print("\n");
     if (id == TEENSY_KEY) {
+        /*
+         * this won't work, idk why
+         */
         clear_keyboard();
         print("\n\nJump to bootloader... ");
         _delay_ms(250);
         bootloader_jump(); // should not return
         print("not supported.\n");
+        /**/
     }
 }