diff options
Diffstat (limited to 'keyboards/jj40')
-rw-r--r-- | keyboards/jj40/info.json | 23 | ||||
-rw-r--r-- | keyboards/jj40/jj40.h | 60 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/ajp10304/config.h | 8 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/cockpit/keymap.c | 8 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/default/keymap.c | 6 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/fun40/config.h | 1 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/krusli/config.h | 1 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/krusli/keymap.c | 35 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/like_jis/config.h | 49 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/like_jis/keymap.c | 200 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/like_jis/rules.mk | 5 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/oscillope/backlight.c | 60 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/oscillope/config.h | 1 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/oscillope/keymap.c | 17 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/skewwhiffy/keymap.c | 219 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/suzuken/config.h | 1 | ||||
-rw-r--r-- | keyboards/jj40/keymaps/waples/config.h | 1 | ||||
-rw-r--r-- | keyboards/jj40/rules.mk | 2 |
18 files changed, 567 insertions, 130 deletions
diff --git a/keyboards/jj40/info.json b/keyboards/jj40/info.json new file mode 100644 index 000000000..c6416ce16 --- /dev/null +++ b/keyboards/jj40/info.json @@ -0,0 +1,23 @@ +{ + "keyboard_name": "jj40", + "url": "", + "maintainer": "qmk", + "width": 12, + "height": 4, + "layouts": { + "LAYOUT_planck_mit": { + "key_count": 47, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3, "w":2}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + }, + + "LAYOUT_ortho_4x12": { + "key_count": 48, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3}, {"x":7, "y":3}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + }, + + "LAYOUT_planck_1x2uR": { + "key_count": 47, + "layout": [{"x":0, "y":0}, {"x":1, "y":0}, {"x":2, "y":0}, {"x":3, "y":0}, {"x":4, "y":0}, {"x":5, "y":0}, {"x":6, "y":0}, {"x":7, "y":0}, {"x":8, "y":0}, {"x":9, "y":0}, {"x":10, "y":0}, {"x":11, "y":0}, {"x":0, "y":1}, {"x":1, "y":1}, {"x":2, "y":1}, {"x":3, "y":1}, {"x":4, "y":1}, {"x":5, "y":1}, {"x":6, "y":1}, {"x":7, "y":1}, {"x":8, "y":1}, {"x":9, "y":1}, {"x":10, "y":1}, {"x":11, "y":1}, {"x":0, "y":2}, {"x":1, "y":2}, {"x":2, "y":2}, {"x":3, "y":2}, {"x":4, "y":2}, {"x":5, "y":2}, {"x":6, "y":2}, {"x":7, "y":2}, {"x":8, "y":2}, {"x":9, "y":2}, {"x":10, "y":2}, {"x":11, "y":2}, {"x":0, "y":3}, {"x":1, "y":3}, {"x":2, "y":3}, {"x":3, "y":3}, {"x":4, "y":3}, {"x":5, "y":3}, {"x":6, "y":3, "w":2}, {"x":8, "y":3}, {"x":9, "y":3}, {"x":10, "y":3}, {"x":11, "y":3}] + } + } +} diff --git a/keyboards/jj40/jj40.h b/keyboards/jj40/jj40.h index bb7068fdc..731f2ff45 100644 --- a/keyboards/jj40/jj40.h +++ b/keyboards/jj40/jj40.h @@ -25,7 +25,10 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void matrix_init_user(void); // TODO port this to other PS2AVRGB boards -#define KEYMAP_GRID( \ +#define XXX KC_NO + + +#define LAYOUT_ortho_4x12( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ @@ -34,61 +37,58 @@ void matrix_init_user(void); // TODO port this to other PS2AVRGB boards { \ { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ { K312, K311, K310, K39, K35, K36, K37, K38, K34, K33, K32, K31 } \ } -#define KEYMAP_MIT( \ + +#define LAYOUT_planck_mit( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ K31, K32, K33, K34, K35, K3X, K38, K39, K310, K311, K312 \ ) \ { \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K3X, KC_NO, K38, K34, K33, K32, K31 } \ + { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ + { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ + { K312, K311, K310, K39, K35, K3X, XXX, K38, K34, K33, K32, K31 } \ } -#define KEYMAP_OFFSET( \ + +#define LAYOUT_planck_1x2uR( \ K01, K02, K03, K04, K05, K06, K07, K08, K09, K010, K011, K012, \ K11, K12, K13, K14, K15, K16, K17, K18, K19, K110, K111, K112, \ K21, K22, K23, K24, K25, K26, K27, K28, K29, K210, K211, K212, \ K31, K32, K33, K34, K35, K36, K3X, K39, K310, K311, K312 \ ) \ { \ - { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ - { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ - { KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO }, \ - { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ - { K312, K311, K310, K39, K35, K36, K3X, KC_NO, K34, K33, K32, K31 } \ + { K012, K011, K010, K09, K05, K06, K07, K08, K04, K03, K02, K01 }, \ + { K112, K111, K110, K19, K15, K16, K17, K18, K14, K13, K12, K11 }, \ + { XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX, XXX }, \ + { K212, K211, K210, K29, K25, K26, K27, K28, K24, K23, K22, K21 }, \ + { K312, K311, K310, K39, K35, K36, K3X, XXX, K34, K33, K32, K31 } \ } -#define KC_KEYMAP( \ - k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ - k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ - k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ - k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ + +#define LAYOUT_kc( \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0a, k0b, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1a, k1b, \ + k20, k21, k22, k23, k24, k25, k26, k27, k28, k29, k2a, k2b, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3a, k3b \ ) \ - KEYMAP_GRID( \ + LAYOUT_ortho_4x12( \ KC_##k00, KC_##k01, KC_##k02, KC_##k03, KC_##k04, KC_##k05, KC_##k06, KC_##k07, KC_##k08, KC_##k09, KC_##k0a, KC_##k0b, \ KC_##k10, KC_##k11, KC_##k12, KC_##k13, KC_##k14, KC_##k15, KC_##k16, KC_##k17, KC_##k18, KC_##k19, KC_##k1a, KC_##k1b, \ KC_##k20, KC_##k21, KC_##k22, KC_##k23, KC_##k24, KC_##k25, KC_##k26, KC_##k27, KC_##k28, KC_##k29, KC_##k2a, KC_##k2b, \ - KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ - ) - - -#define KEYMAP KEYMAP_MIT + KC_##k30, KC_##k31, KC_##k32, KC_##k33, KC_##k34, KC_##k35, KC_##k36, KC_##k37, KC_##k38, KC_##k39, KC_##k3a, KC_##k3b \ +) -#define LAYOUT_ortho_4x12 KEYMAP_GRID -#define LAYOUT_2U_space KEYMAP_MIT -#define LAYOUT_planck_mit KEYMAP_MIT +#define LAYOUT LAYOUT_planck_mit -#define KC_LAYOUT_ortho_4x12 KC_KEYMAP -#define LAYOUT_kc_ortho_4x12 KC_KEYMAP +#define LAYOUT_kc_ortho_4x12 LAYOUT_kc #endif diff --git a/keyboards/jj40/keymaps/ajp10304/config.h b/keyboards/jj40/keymaps/ajp10304/config.h deleted file mode 100644 index 11cafbefc..000000000 --- a/keyboards/jj40/keymaps/ajp10304/config.h +++ /dev/null @@ -1,8 +0,0 @@ -#ifndef CONFIG_USER_H -#define CONFIG_USER_H - -#include "../../config.h" - -#define PREVENT_STUCK_MODIFIERS - -#endif diff --git a/keyboards/jj40/keymaps/cockpit/keymap.c b/keyboards/jj40/keymaps/cockpit/keymap.c index 02deaaa8e..12ed62b6b 100644 --- a/keyboards/jj40/keymaps/cockpit/keymap.c +++ b/keyboards/jj40/keymaps/cockpit/keymap.c @@ -63,7 +63,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | Fn | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_2U_space( \ +[_QWERTY] = LAYOUT_planck_mit( \ KC_GESC, 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_SCLN, KC_QUOT, \ KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -85,7 +85,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | | Alt |Lower|| Space | | Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_2U_space( \ +[_LOWER] = LAYOUT_planck_mit( \ KC_GRV, LT_A_OG, LT_C_CA, LT_E_OG, LT_E_DO, LT_I_OG, LT_S_CA, LT_U_OG, LT_U_MA, LT_Z_CA, KC_MINS, KC_BSPC, \ KC_TAB, LT_EXLM, LT_AT, LT_HASH, LT_DLR, LT_PERC, LT_CIRC, LT_AMPR, LT_ASTR, KC_LPRN, KC_RPRN, KC_DEL , \ KC_LSFT, KC_PEQL, KC_PPLS, KC_PMNS, KC_PIPE, KC_LBRC, KC_RBRC, KC_LABK, KC_RABK, KC_LCBR, KC_RCBR, KC_INS , \ @@ -107,7 +107,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | | | Alt | | Space |Raise|| Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_2U_space( \ +[_RAISE] = LAYOUT_planck_mit( \ KC_GRV, LT_1, LT_2, LT_3, LT_4, LT_5, LT_6, LT_7, LT_8, LT_9, LT_0, KC_BSPC, \ KC_TAB, LT_4, LT_5, LT_6, _______, _______, _______, _______, _______, _______, _______, KC_BSLS, \ KC_LSFT, LT_7, LT_8, LT_9, LT_0, _______, _______, _______, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -130,7 +130,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl |||Fn||| Mode | Alt | | Space |MPrev |MStop |MNext |MPlay | Lock | * `-----------------------------------------------------------------------------------' */ -[_FUNC] = LAYOUT_2U_space( \ +[_FUNC] = LAYOUT_planck_mit( \ 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_CAPS, RGB_TOG, RGB_HUI, RGB_SAI, RGB_VAI, BL_TOGG, BL_BRTG, BL_INC, _______, _______, _______, KC_VOLU, \ KC_LSFT, KC_CALC, RGB_HUD, RGB_SAD, RGB_VAD, KC_WBAK, KC_WFWD, BL_DEC, _______, _______, KC_PSCR, KC_VOLD, \ diff --git a/keyboards/jj40/keymaps/default/keymap.c b/keyboards/jj40/keymaps/default/keymap.c index 1db887bd0..d84b01b15 100644 --- a/keyboards/jj40/keymaps/default/keymap.c +++ b/keyboards/jj40/keymaps/default/keymap.c @@ -23,7 +23,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = LAYOUT_2U_space( \ +[_QWERTY] = LAYOUT_planck_mit( \ KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ @@ -41,7 +41,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = LAYOUT_2U_space( \ +[_LOWER] = LAYOUT_planck_mit( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12,S(KC_NUHS),S(KC_NUBS),_______, _______, _______, \ @@ -59,7 +59,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = LAYOUT_2U_space( \ +[_RAISE] = LAYOUT_planck_mit( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_NUHS, KC_NUBS, _______, _______, _______, \ diff --git a/keyboards/jj40/keymaps/fun40/config.h b/keyboards/jj40/keymaps/fun40/config.h index 89807d84a..f2b5d264e 100644 --- a/keyboards/jj40/keymaps/fun40/config.h +++ b/keyboards/jj40/keymaps/fun40/config.h @@ -4,6 +4,5 @@ #include "../../config.h" #define FORCE_NKRO -#define PREVENT_STUCK_MODIFIERS #endif diff --git a/keyboards/jj40/keymaps/krusli/config.h b/keyboards/jj40/keymaps/krusli/config.h index 6d98a37a6..e710dbbb6 100644 --- a/keyboards/jj40/keymaps/krusli/config.h +++ b/keyboards/jj40/keymaps/krusli/config.h @@ -3,7 +3,6 @@ #include "../../config.h" -#define PREVENT_STUCK_MODIFIERS // #define TAPPING_TERM 300 #endif diff --git a/keyboards/jj40/keymaps/krusli/keymap.c b/keyboards/jj40/keymaps/krusli/keymap.c index 6fea9d314..f996fbf35 100644 --- a/keyboards/jj40/keymaps/krusli/keymap.c +++ b/keyboards/jj40/keymaps/krusli/keymap.c @@ -26,11 +26,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Ctrl | GUI | Alt |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ - [_QWERTY] = LAYOUT_2U_space( \ - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ - 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ - _______, KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ + + [_QWERTY] = LAYOUT_planck_mit( \ + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC, \ + 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_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + TO(_NUMPAD),KC_LCTL, KC_LGUI, KC_LALT, MO(_LOWER), KC_SPC, MO(_RAISE), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ ), /* Lower @@ -41,10 +42,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | | F7 | F8 | F9 | F10 | F11 | F12 | RGB | RGB | RGB | RGB |Enter | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | RGB | RGB | RGB | | | Next | Vol- | Vol+ | Play | | + * | | RGB | RGB | RGB | | | Next | Vol- | Vol+ | Play | | * `-----------------------------------------------------------------------------------' */ - [_LOWER] = LAYOUT_2U_space( \ + [_LOWER] = LAYOUT_planck_mit( \ KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, RGB_TOG, RGB_MOD, RGB_VAD, RGB_VAI, _______, \ @@ -62,10 +63,28 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | Prev | Play | Next | | | | Next | Vol- | Vol+ | Play | * `-----------------------------------------------------------------------------------' */ - [_RAISE] = LAYOUT_2U_space( \ + [_RAISE] = LAYOUT_planck_mit( \ KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \ KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \ _______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_HOME, KC_END, KC_PGUP, KC_PGDN, _______, \ _______, KC_MRWD, KC_MPLY, KC_MNXT, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ + ), + + /* Numpad + * ,-----------------------------------------------------------------------------------. + * | Esc | 7 | 8 | 9 | * | / | | | | | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | <-- | 4 | 5 | 6 | + | - | | | | | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 1 | 2 | 3 |Enter |Enter | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Qwerty| 0 | . | . |Enter | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + [_NUMPAD] = LAYOUT_planck_mit( \ + KC_ESC, KC_P7, KC_P8, KC_P9, KC_PAST, KC_PSLS, _______, _______, _______, _______, _______, _______, \ + KC_BSPC, KC_P4, KC_P5, KC_P6, KC_PPLS, KC_PMNS, _______, _______, _______, _______, _______, _______, \ + _______, KC_P1, KC_P2, KC_P3, KC_PENT, KC_PENT, _______, _______, _______, _______, _______, _______, \ + TO(_QWERTY),KC_P0, KC_PDOT, KC_PDOT, KC_PENT, _______, _______, _______, _______, _______, _______ \ ) }; diff --git a/keyboards/jj40/keymaps/like_jis/config.h b/keyboards/jj40/keymaps/like_jis/config.h new file mode 100644 index 000000000..cd9709272 --- /dev/null +++ b/keyboards/jj40/keymaps/like_jis/config.h @@ -0,0 +1,49 @@ +/* +This is the c configuration file for the keymap + +Copyright 2012 Jun Wako <wakojun@gmail.com> +Copyright 2015 Jack Humbert + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(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/>. +*/ + +#pragma once + +// place overrides here + +#define TAPPING_TERM 200 + +#ifdef MOUSEKEY_ENABLE + #undef MOUSEKEY_INTERVAL + #define MOUSEKEY_INTERVAL 5 + + #undef MOUSEKEY_TIME_TO_MAX + #define MOUSEKEY_TIME_TO_MAX 150 + + #undef MOUSEKEY_MAX_SPEED + #define MOUSEKEY_MAX_SPEED 3 + + #undef MOUSEKEY_MOVE_DELTA + #define MOUSEKEY_MOVE_DELTA 3 + + #undef MOUSEKEY_DELAY + #define MOUSEKEY_DELAY 0 +#endif + +#undef BACKLIGHT_LEVELS +#define BACKLIGHT_LEVELS 15 +// #undef BACKLIGHT_LEVELS +// #define BACKLIGHT_BREATHING +// #undef BREATHING_PERIOD +// #define BREATHING_PERIOD 4 diff --git a/keyboards/jj40/keymaps/like_jis/keymap.c b/keyboards/jj40/keymaps/like_jis/keymap.c new file mode 100644 index 000000000..24db91947 --- /dev/null +++ b/keyboards/jj40/keymaps/like_jis/keymap.c @@ -0,0 +1,200 @@ +#include QMK_KEYBOARD_H + +#define _QWERTY 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + LOWER = SAFE_RANGE, + RAISE, + ADJUST, + RGBRST +}; + +#define KC______ KC_TRNS +#define KC_XXXXX KC_NO +#define KC_KANJI KC_GRV + +#define KC_LOWER LOWER +#define KC_RAISE RAISE +#define KC_ADJST ADJUST + +#define KC_RST RESET + +#define KC_LRST RGBRST +#define KC_LTOG RGB_TOG +#define KC_LHUI RGB_HUI +#define KC_LHUD RGB_HUD +#define KC_LSAI RGB_SAI +#define KC_LSAD RGB_SAD +#define KC_LVAI RGB_VAI +#define KC_LVAD RGB_VAD +#define KC_LMOD RGB_MOD +#define KC_BTOG BL_TOGG +#define KC_BINC BL_INC +#define KC_BDEC BL_DEC +// #define KC_BRTG BL_BRTG + +#define KC_KNRM AG_NORM +#define KC_KSWP AG_SWAP + +// Layer Mode aliases +// #define KC_L_LO MO(_LOWER) +// #define KC_L_RA MO(_RAISE) +// #define KC_L_AD MO(_ADJUST) +#define KC_TBSF LSFT_T(KC_TAB) +// #define KC_SPSF LSFT_T(KC_SPC) +// #define KC_GUAP LALT_T(KC_APP) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QWERTY] = KC_LAYOUT_ortho_4x12( \ + //,-----------------------------------------------------------------------------------. + ESC, Q, W, E, R, T, Y, U, I, O, P, MINS,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + TBSF, A, S, D, F, G, H, J, K, L, SCLN, ENT,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + LSFT, Z, X, C, V, B, N, M, COMM, DOT, UP, RSFT,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + LCTRL, LALT, LGUI, ADJST, LOWER, BSPC, SPC, RAISE, APP, LEFT, DOWN, RGHT \ + //|------+------+------+------+------+-------------+------+------+------+------+------| + ), + + [_LOWER] = KC_LAYOUT_ortho_4x12( \ + //,-----------------------------------------------------------------------------------. + TAB, F1, F2, F3, F4, F5, XXXXX, MINS, EQL, JYEN, LBRC, RBRC,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + _____, F6, F7, F8, F9, F10, XXXXX, XXXXX, XXXXX, SCLN, QUOT, BSLS,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + _____, F11, F12, XXXXX, KANJI, ENT, XXXXX, XXXXX, COMM, DOT, SLSH, RO,\ + //|------+------+------+------+------+-------------+------+------+------+------+------| + _____, _____, _____, _____, _____, DEL, _____, _____, _____, _____, _____, _____ \ + //|------+------+------+------+------+-------------+------+------+------+------+------| + ), + + [_RAISE] = KC_LAYOUT_ortho_4x12( \ + //,-----------------------------------------------------------------------------------. + _____, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 4, 5, 6, QUOT, PLUS,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + _____, XXXXX, XXXXX, XXXXX, XXXXX, XXXXX, 0, 1, 2, 3, DOT, SLSH,\ + //|------+------+------+------+------+-------------+------+------+------+------+------| + _____, _____, _____, _____, _____, BSPC, _____, _____, _____, _____, _____, _____ \ + //|------+------+------+------+------+-------------+------+------+------+------+------| + ), + + [_ADJUST] = KC_LAYOUT_ortho_4x12( \ + //,-----------------------------------------------------------------------------------. + XXXXX, RST, LRST, KNRM, KSWP, XXXXX, XXXXX, WH_L, WH_U, HOME, PGUP, XXXXX,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + XXXXX, LTOG, LHUI, LSAI, LVAI, BTOG, BINC, WH_R, WH_D, END, PGDN, XXXXX,\ + //|------+------+------+------+------+------|------+------+------+------+------+------| + XXXXX, LMOD, LHUD, LSAD, LVAD, XXXXX, BDEC, XXXXX, BTN1, BTN2, MS_U, XXXXX,\ + //|------+------+------+------+------+-------------+------+------+------+------+------| + _____, _____, _____, _____, _____, XXXXX, XXXXX, _____, _____, MS_L, MS_D, MS_R \ + //|------+------+------+------+------+-------------+------+------+------+------+------| + ) +}; + + +#ifdef BACKLIGHT_ENABLE + extern backlight_config_t backlight_config; + + inline void enable_backright(bool on) { + backlight_config.enable = on; + if (backlight_config.raw == 1) // enabled but level = 0 + backlight_config.level = 1; + eeconfig_update_backlight(backlight_config.raw); + // dprintf("backlight toggle: %u\n", backlight_config.enable); + backlight_set(backlight_config.enable ? backlight_config.level : 0); + } + + uint8_t bl_breath_count; + uint8_t bl_breath_speed = 10; + int8_t bl_breath_updown = 1; + bool bl_breath_on; + backlight_config_t bl_breath_backup; + + void bl_breath_start(uint8_t speed) { + + bl_breath_on = true; + bl_breath_speed = speed; + bl_breath_backup = backlight_config; + } + + void bl_breath_end(void) { + + bl_breath_on = false; + backlight_config = bl_breath_backup; + eeconfig_update_backlight(backlight_config.raw); + backlight_set(backlight_config.enable ? backlight_config.level : 0); + } + + void bl_breath_update(void) { + + if (bl_breath_on) { + ++bl_breath_count; + if (bl_breath_count > bl_breath_speed) { + bl_breath_count = 0; + + backlight_config.level += bl_breath_updown; + bl_breath_updown = (backlight_config.level > BACKLIGHT_LEVELS) ? -1 : + (backlight_config.level <= 0) ? 1 : + bl_breath_updown; + enable_backright(true); + } + } + } + + #define BL_BREATH_START bl_breath_start + #define BL_BREATH_END bl_breath_end + #define BL_BREATH_UPDATE bl_breath_update + +#else + + #define BL_BREATH_START(a) + #define BL_BREATH_END() + #define BL_BREATH_UPDATE() +#endif + +// Loop +void matrix_scan_user(void) { + + BL_BREATH_UPDATE(); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + + switch (keycode) { + case LOWER: + if (record->event.pressed) { + BL_BREATH_START(50); + layer_on(_LOWER); + } else { + BL_BREATH_END(); + layer_off(_LOWER); + } + break; + case RAISE: + if (record->event.pressed) { + BL_BREATH_START(100); + layer_on(_RAISE); + } else { + BL_BREATH_END(); + layer_off(_RAISE); + } + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + break; + default: + return true; + } + + return false; +} diff --git a/keyboards/jj40/keymaps/like_jis/rules.mk b/keyboards/jj40/keymaps/like_jis/rules.mk new file mode 100644 index 000000000..0103be5f4 --- /dev/null +++ b/keyboards/jj40/keymaps/like_jis/rules.mk @@ -0,0 +1,5 @@ +MOUSEKEY_ENABLE = yes +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend diff --git a/keyboards/jj40/keymaps/oscillope/backlight.c b/keyboards/jj40/keymaps/oscillope/backlight.c deleted file mode 100644 index 14c677cd6..000000000 --- a/keyboards/jj40/keymaps/oscillope/backlight.c +++ /dev/null @@ -1,60 +0,0 @@ -/** - * Backlighting code for PS2AVRGB boards (ATMEGA32A) - * Kenneth A. (github.com/krusli | krusli.me) - */ - -#include "quantum.h" - -#include <avr/pgmspace.h> -#include <avr/interrupt.h> - -// Port D: digital pins of the AVR chipset -#define NUMLOCK_PORT (1 << 0) // D0 -#define CAPSLOCK_PORT (1 << 1) // D1 -#define BACKLIGHT_PORT (1 << 4) // D4 -#define SCROLLLOCK_PORT (1 << 6) // D6 - -/** - * References - * Port Registers: https://www.arduino.cc/en/Reference/PortManipulation - * TCCR1A: https://electronics.stackexchange.com/questions/92350/what-is-the-difference-between-tccr1a-and-tccr1b - * Timers: http://www.avrbeginners.net/architecture/timers/timers.html - * 16-bit timer setup: http://sculland.com/ATmega168/Interrupts-And-Timers/16-Bit-Timer-Setup/ - * PS2AVRGB firmware: https://github.com/showjean/ps2avrU/tree/master/firmware - */ - -// @Override -// turn LEDs on and off depending on USB caps/num/scroll lock states. -__attribute__ ((weak)) -void led_set_user(uint8_t usb_led) { -/* It appears that these cause the v1 JJ40 PCB to hang. - * I haven't looked into why, but I don't have any LEDs on my board anyway. */ -#if 0 - if (usb_led & (1 << USB_LED_NUM_LOCK)) { - // turn on - DDRD |= NUMLOCK_PORT; - PORTD |= NUMLOCK_PORT; - } else { - // turn off - DDRD &= ~NUMLOCK_PORT; - PORTD &= ~NUMLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_CAPS_LOCK)) { - DDRD |= CAPSLOCK_PORT; - PORTD |= CAPSLOCK_PORT; - } else { - DDRD &= ~CAPSLOCK_PORT; - PORTD &= ~CAPSLOCK_PORT; - } - - if (usb_led & (1 << USB_LED_SCROLL_LOCK)) { - DDRD |= SCROLLLOCK_PORT; - PORTD |= SCROLLLOCK_PORT; - } else { - DDRD &= ~SCROLLLOCK_PORT; - PORTD &= ~SCROLLLOCK_PORT; - } -#endif -} - diff --git a/keyboards/jj40/keymaps/oscillope/config.h b/keyboards/jj40/keymaps/oscillope/config.h index d7f991fa9..e812903de 100644 --- a/keyboards/jj40/keymaps/oscillope/config.h +++ b/keyboards/jj40/keymaps/oscillope/config.h @@ -3,7 +3,6 @@ #include "../../config.h" -#define PREVENT_STUCK_MODIFIERS #define TAPPING_TERM 200 #endif diff --git a/keyboards/jj40/keymaps/oscillope/keymap.c b/keyboards/jj40/keymaps/oscillope/keymap.c index 49ceff864..1a4226194 100644 --- a/keyboards/jj40/keymaps/oscillope/keymap.c +++ b/keyboards/jj40/keymaps/oscillope/keymap.c @@ -17,11 +17,6 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. #include QMK_KEYBOARD_H -#ifdef KEYMAP -#undef KEYMAP -#endif -#define KEYMAP KEYMAP_OFFSET - #define _QWERTY 0 #define _LOWER 1 #define _RAISE 2 @@ -51,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | OS | Alt |Lower |Shift |Raise | Space | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' */ -[_QWERTY] = KEYMAP( \ +[_QWERTY] = LAYOUT_planck_1x2uR( \ KC_ESC, 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_SCLN, KC_ENT, \ KC_GRV, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT, \ @@ -62,16 +57,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Ins | | | () | [] | {} | Left | Down | Up |Right | | | + * | Ins | | | () | [] | {} | Home | PgDn | PgUp | End | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * |RESET | Back | Fwd | | | | | | Mute | Vol- | Vol+ | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | Lock | | | Prev | Stop | Play | Next | * `-----------------------------------------------------------------------------------' */ -[_LOWER] = KEYMAP( \ +[_LOWER] = LAYOUT_planck_1x2uR( \ 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_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ + KC_INS, _______, _______, CC_PRN, CC_BRC, CC_CBR, KC_HOME, KC_PGDN, KC_PGUP, KC_END, _______, _______, \ RESET, KC_WBAK, KC_WFWD, _______, _______, _______, _______, _______, KC_MUTE, KC_VOLD, KC_VOLU, _______, \ _______, _______, _______, _______, KC_LOCK, _______, _______, KC_MPRV, KC_MSTP, KC_MPLY, KC_MNXT \ ), @@ -87,14 +82,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Ctrl | OS | Alt | |Shift | | 0 | Home | PgDn | PgUp | End | * `-----------------------------------------------------------------------------------' */ -[_RAISE] = KEYMAP( \ +[_RAISE] = LAYOUT_planck_1x2uR( \ KC_CAPS, KC_AMPR, KC_ASTR, KC_UNDS, KC_LPRN, KC_RPRN, KC_7, KC_8, KC_9, KC_EQL, KC_BSPC, KC_DEL, \ KC_TAB, KC_DLR, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_4, KC_5, KC_6, KC_MINS, KC_PLUS, _______, \ CC_ARRW, KC_EXLM, KC_AT, KC_HASH, KC_LCBR, KC_RCBR, KC_1, KC_2, KC_3, _______, KC_BSLS, KC_PIPE, \ _______, _______, _______, _______, _______, _______, KC_0, KC_HOME, KC_PGDN, KC_PGUP, KC_END \ ), -[_NAV] = KEYMAP( \ +[_NAV] = LAYOUT_planck_1x2uR( \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ _______, _______, _______, _______, _______, _______, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, _______, _______, \ _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ diff --git a/keyboards/jj40/keymaps/skewwhiffy/keymap.c b/keyboards/jj40/keymaps/skewwhiffy/keymap.c new file mode 100644 index 000000000..6b193a15c --- /dev/null +++ b/keyboards/jj40/keymaps/skewwhiffy/keymap.c @@ -0,0 +1,219 @@ +/* Copyright 2017 Kenny Hung + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 2 of the License, or + * (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 +#include "keymap_uk.h" + +// Layer shorthand +enum Layers { + cm, // colemak + dv, // dvorak + qw, // qwerty + nbl, // numbers left + nbr, // numbers right + syl, // symbols left + syr, // symbols right + nal, // navigation left + nar // navigation right +}; + +// Layer buttons +#define _Z_SFT SFT_T(UK_Z) +#define _SCLSH SFT_T(UK_SCLN) +#define _SLSH SFT_T(UK_SLSH) + +#define _X_NB LT(nbl, UK_X) +#define _Q_NB LT(nbl, UK_Q) +#define _DOT_NB LT(nbr, UK_DOT) +#define _V_NB LT(nbr, UK_V) +#define __NBL LT(nbl, _______) +#define __NBR LT(nbr, _______) + +#define _C_SY LT(syl, UK_C) +#define _J_SY LT(syl, UK_J) +#define _W_SY LT(syr, UK_W) +#define _COM_SY LT(syr, UK_COMM) +#define __SYL LT(syl, _______) +#define __SYR LT(syr, _______) + +#define _V_NAL LT(nal, UK_V) +#define _K_NAL LT(nal, UK_K) +#define _M_NAR LT(nar, UK_M) +#define __NAL LT(nal, _______) +#define __NAR LT(nar, _______) + +// Custom hotkeys +#define _TERM LCTL(UK_QUOT) // Hotkey for terminal +#define _S_TAB S(UK_TAB) +#define _C_LEFT LCTL(UK_LEFT) +#define _C_RGHT LCTL(UK_RGHT) +#define _A_LEFT LALT(UK_LEFT) +#define _A_RGHT LALT(UK_RGHT) + +// Custom hotkeys +#define _TERM LCTL(UK_QUOT) // Hotkey for terminal +#define _S_TAB S(UK_TAB) +#define _C_LEFT LCTL(UK_LEFT) +#define _C_RGHT LCTL(UK_RGHT) +#define _A_LEFT LALT(UK_LEFT) +#define _A_RGHT LALT(UK_RGHT) + +enum custom_keycodes { + IJ_OMN = SAFE_RANGE // IntelliJ Omnibox +}; + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * .-----------------------------------------------------------------------------------------------------------. + * | Q | W | F | P | G | | | J | L | U | Y | ; | + * |-----------------------------------------------------------------------------------------------------------| + * | A | R | S | T | D | | | H | N | E | I | O | + * |-----------------------------------------------------------------------------------------------------------| + * | Z | X | C | V | B | | | K | M | , | . | / | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |-----------------------------------------------------------------------------------------------------------| + * | LSHIFT | LCTRL | LALT | LGUI | SPACE | ENT | DEL | BKSPC | RGUI | RALT | RCTRL | RSHIFT | + * .-----------------------------------------------------------------------------------------------------------. + */ + [cm] = LAYOUT_ortho_4x12( \ + UK_Q, UK_W, UK_F, UK_P, UK_G, _______, _______, UK_J, UK_L, UK_U, UK_Y, UK_SCLN, \ + UK_A, UK_R, UK_S, UK_T, UK_D, _______, _______, UK_H, UK_N, UK_E, UK_I, UK_O, \ + _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_K, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \ + UK_LSFT, UK_LCTL, UK_LALT, UK_LGUI, UK_SPC, UK_ENT, UK_DEL, UK_BSPC, UK_RGUI, UK_RALT, UK_RCTL, UK_RSFT \ + ), + +/* Dvorak + * .-----------------------------------------------------------------------------------------------------------. + * | ' | , | . | P | Y | | | F | G | C | R | L | + * |-----------------------------------------------------------------------------------------------------------| + * | A | O | E | U | I | | | D | H | T | N | S | + * |-----------------------------------------------------------------------------------------------------------| + * | ; | Q | J | K | X | | | B | M | W | V | Z | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |-----------------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------------------------| + */ + [dv] = LAYOUT_ortho_4x12( \ + UK_QUOT, UK_COMM, UK_DOT, UK_P, UK_Y, _______, _______, UK_F, UK_G, UK_C, UK_R, UK_L, \ + UK_A, UK_O, UK_E, UK_U, UK_I, _______, _______, UK_D, UK_H, UK_T, UK_N, UK_S, \ + _SCLSH, _Q_NB, _J_SY, _K_NAL, UK_X, _______, _______, UK_B, _M_NAR, _W_SY, _V_NB, _Z_SFT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* QWERTY + * .-----------------------------------------------------------------------------------------------------------. + * | Q | W | E | R | T | | | Y | U | I | O | P | + * |-----------------------------------------------------------------------------------------------------------| + * | A | S | D | F | G | | | H | J | K | L | ; | + * |-----------------------------------------------------------------------------------------------------------| + * | Z | X | C | V | B | | | N | M | , | . | / | + * | SHIFT | NUMBER | SYMBOL | NAV | | | | | NAV | SYMBOL | FUNC | SHIFT | + * |-----------------------------------------------------------------------------------------------------------| + * | | | | | | | | | | | | | + * .-----------------------------------------------------------------------------------------------------------. + */ + [qw] = LAYOUT_ortho_4x12( \ + UK_Q, UK_W, UK_E, UK_R, UK_T, _______, _______, UK_Y, UK_U, UK_I, UK_O, UK_P, \ + UK_A, UK_S, UK_D, UK_F, UK_G, _______, _______, UK_H, UK_J, UK_K, UK_L, UK_SCLN, \ + _Z_SFT, _X_NB, _C_SY, _V_NAL, UK_B, _______, _______, UK_N, _M_NAR, _COM_SY, _DOT_NB, _SLSH, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* Numbers _NB + * .-----------------------------------------------------------------------------------------------------------. + * | | F7 | F8 | F9 | F10 | | | | 7 | 8 | 9 | | + * |-----------------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | F4 | F5 | F6 | F11 | | | | 4 | 5 | 6 | | + * |-----------------+--------+--------+--------+--------+--------+--------+--------------------------+--------| + * | | F1 | F2 | F3 | F12 | | | 0 | 1 | 2 | 3 | . | + * |-----------------+--------+--------+--------+--------+--------+--------+-----------------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [nbl] = LAYOUT_ortho_4x12( \ + _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ + _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ + _______, __NBL, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, UK_3, UK_DOT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [nbr] = LAYOUT_ortho_4x12( \ + _______, UK_F7, UK_F8, UK_F9, UK_F10, _______, _______, _______, UK_7, UK_8, UK_9, _______, \ + _______, UK_F4, UK_F5, UK_F6, UK_F11, _______, _______, _______, UK_4, UK_5, UK_6, _______, \ + _______, UK_F1, UK_F2, UK_F3, UK_F12, _______, _______, UK_0, UK_1, UK_2, __NBR, UK_DOT, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* Symbols _SY + * .-----------------------------------------------------------------------------------------------------------. + * | ! | £ | _ | - | ~ | | | \ | { | } | / | # | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | $ | % | + | = | | | | " | ( | ) | ' | @ | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ^ | & | * | | | | | | < | [ | ] | > | ` | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [syl] = LAYOUT_ortho_4x12( \ + UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ + UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \ + UK_CIRC, UK_AMPR, __SYL, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, UK_RBRC, UK_RABK, UK_GRV, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [syr] = LAYOUT_ortho_4x12( \ + UK_EXLM, UK_PND, UK_UNDS, UK_MINS, UK_TILD, _______, _______, UK_BSLS, UK_LCBR, UK_RCBR, UK_SLSH, UK_HASH, \ + UK_DLR, UK_PERC, UK_PLUS, UK_EQL, _______, _______, _______, UK_DQUO, UK_LPRN, UK_RPRN, UK_QUOT, UK_AT, \ + UK_CIRC, UK_AMPR, UK_ASTR, UK_PIPE, _______, _______, _______, UK_LABK, UK_LBRC, __SYR, UK_RABK, UK_GRV, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + +/* + * Navigation + * .-----------------------------------------------------------------------------------------------------------. + * | Esc | Ctrl L | Up | Ctrl R | RGB RMD| RGB HD | RGB HI | RGB_TG | PtSn | ScLk | Pause | DVORAK | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | Tab | Left | Down | Right | RGB MD | RGB SD | RGB SI | COLEMAK| Insert | Home | PgUp | Term | + * +--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | ShTab | Alt L | IJ Omni| Alt R | | RGB VD | RGB VI | | ScLk | End | PgDn | QWERTY | + * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + * | | | | | | | | | | | | | + * '-----------------------------------------------------------------------------------------------------------' + */ + [nal] = LAYOUT_ortho_4x12( \ + UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \ + UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \ + _S_TAB, _A_LEFT, IJ_OMN, __NAL, _______, RGB_VAD, RGB_VAI, _______, UK_SLCK, UK_END, UK_PGDN, DF(qw), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), + [nar] = LAYOUT_ortho_4x12( \ + UK_ESC, _C_LEFT, UK_UP, _C_RGHT, RGB_RMOD,RGB_HUD, RGB_HUI, RGB_TOG, UK_PSCR, UK_SLCK, UK_PAUS, DF(dv), \ + UK_TAB, UK_LEFT, UK_DOWN, UK_RGHT, RGB_MOD, RGB_SAD, RGB_SAI, DF(cm), UK_INS, UK_HOME, UK_PGUP, _TERM, \ + _S_TAB, _A_LEFT, IJ_OMN, _A_RGHT, _______, RGB_VAD, RGB_VAI, _______, __NAR, UK_END, UK_PGDN, DF(qw), \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ + ), +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + if (record->event.pressed) { + switch(keycode) { + case IJ_OMN: + SEND_STRING(SS_TAP(X_LSHIFT)SS_TAP(X_LSHIFT)); + return false; + } + } + return true; +} diff --git a/keyboards/jj40/keymaps/suzuken/config.h b/keyboards/jj40/keymaps/suzuken/config.h index 52aaa8f24..b1d74e1e6 100644 --- a/keyboards/jj40/keymaps/suzuken/config.h +++ b/keyboards/jj40/keymaps/suzuken/config.h @@ -3,7 +3,6 @@ #include "../../config.h" -#define PREVENT_STUCK_MODIFIERS #define TAPPING_TERM 300 #endif diff --git a/keyboards/jj40/keymaps/waples/config.h b/keyboards/jj40/keymaps/waples/config.h index 52aaa8f24..b1d74e1e6 100644 --- a/keyboards/jj40/keymaps/waples/config.h +++ b/keyboards/jj40/keymaps/waples/config.h @@ -3,7 +3,6 @@ #include "../../config.h" -#define PREVENT_STUCK_MODIFIERS #define TAPPING_TERM 300 #endif diff --git a/keyboards/jj40/rules.mk b/keyboards/jj40/rules.mk index 4e6f62617..697e17a01 100644 --- a/keyboards/jj40/rules.mk +++ b/keyboards/jj40/rules.mk @@ -57,4 +57,4 @@ SRC = matrix.c i2c.c backlight.c # programming options PROGRAM_CMD = ./util/atmega32a_program.py $(TARGET).hex -LAYOUTS = ortho_4x12 planck_mit planck_grid +LAYOUTS = ortho_4x12 planck_mit |