From 0cd017d485f19a2c9ce5e8df3535d44958664ea7 Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Wed, 22 Jun 2016 16:51:25 -0400 Subject: Use Space Cadet parens on LSFT --- keyboards/planck/keymaps/cbbrowne/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 55385acd6..6ce4fd0e7 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, 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_QUOT }, + {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, -- cgit v1.2.3 From 477ed703c88822aea62152d62fb2310267edc48f Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Tue, 12 Jul 2016 11:57:05 -0400 Subject: I did not like Space Cadet paren; it jumps in in way too many extra cases --- keyboards/planck/keymaps/cbbrowne/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 6ce4fd0e7..55385acd6 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,7 +84,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, - {KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, 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_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, -- cgit v1.2.3 From 82f768e6c04c57fa44d6020e3d57a6b3de211ddc Mon Sep 17 00:00:00 2001 From: Christopher Browne Date: Mon, 18 Jul 2016 16:07:00 -0400 Subject: Notes about changes --- keyboards/planck/keymaps/cbbrowne/readme.md | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 5f08530f4..fdb099700 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -7,16 +7,10 @@ Christopher Browne This was originally based on the default keyboard map, but I have been doing sundry experimentation: -1. Experiments +1. Useful Experiments ---------------------------------------- - * To figure things out about the toolset - * I'm an Emacs guy, so will be needing a fair bit of tuning * It made sense to mess around some with keyboard maps. - - I tried added Workman alongside Dvorak and Colemak - - Boy, oh boy, these don't help!!! - - I have done 30 years of learning of Emacs key mappings, and - these alternative keyboards massively mess me up - I added a keypad, originally based on keymaps/numpad.c, but mighty substantially revised, as that one seems to be rotated 90 degrees from usual conventions for number pads @@ -30,6 +24,7 @@ doing sundry experimentation: - Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number + * Minor use of Space Cadet Shift; my SHIFT key has switched to KC_LSP0, so that when I just hit SHIFT, I get a left parens: ( which is great for Lisping. I don't have a Right Shift, so I don't get an autoclose; I think I'll live with that until a Planck successor with more lines of keys :-) 2. Some code structure ideas --------------------------------------------------- @@ -62,6 +57,10 @@ doing sundry experimentation: and shift ESC off the first column so KC_LCTL and KC_LALT can be on the first column. * I needed to swap ' and ENTER + * I tried added Workman alongside Dvorak and Colemak + - Boy, oh boy, these don't help!!! + - I have done 30 years of learning of Emacs key mappings, and + these alternative keyboards massively mess me up 4. TODO --------------------------------------------------------- @@ -73,6 +72,7 @@ doing sundry experimentation: helpers. * I do not presently have anything that handles X11 screen switching, as with Control-Alt-various - + * I ought to probably look into KC_LEAD, to have some key combos + that do not need to be concurrent -- cgit v1.2.3 From eeb100f87d96680302024e816ad7460a6d9bf281 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Thu, 21 Jul 2016 18:19:08 -0400 Subject: First draft of the 'impossible' layout. --- keyboards/planck/keymaps/impossible/Makefile | 25 ++ keyboards/planck/keymaps/impossible/keymap.c | 332 ++++++++++++++++++++++++++ keyboards/planck/keymaps/impossible/readme.md | 2 + 3 files changed, 359 insertions(+) create mode 100644 keyboards/planck/keymaps/impossible/Makefile create mode 100644 keyboards/planck/keymaps/impossible/keymap.c create mode 100644 keyboards/planck/keymaps/impossible/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/Makefile b/keyboards/planck/keymaps/impossible/Makefile new file mode 100644 index 000000000..581e08cd0 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/Makefile @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c new file mode 100644 index 000000000..2489fc270 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -0,0 +1,332 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _ALPHA 0 +#define _FN 1 +#define _QWERTY 3 +#define _COLEMAK 4 +#define _DVORAK 5 +#define _LOWER 6 +#define _RAISE 7 +#define _PLOVER 8 +#define _ADJUST 16 + +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +[_ALPHA] = { + {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, + {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, GUI_T(KC_ENTER), KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), KC_SLASH, KC_COMM, SFT_T(KC_BSPC), LT(_FN, KC_ESC), CTL_T(KC_SPC), KC_DOT, + KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_KP_0} +}, + +[_FN] = { + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, KC_ENTER, _______, KC_FN1, KC_FN2, KC_FN3}, + {_______, KC_BSLASH, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_FN10} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {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 }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = { + {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, + {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, + {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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),_______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, + {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_NOTE_ARRAY(tone_plover, false, 0); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + #endif + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md new file mode 100644 index 000000000..de9680b49 --- /dev/null +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -0,0 +1,2 @@ +# The Default Planck Layout + -- cgit v1.2.3 From a39eaa7fb573026851fff35f379e8ed75df241c0 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Fri, 22 Jul 2016 17:46:23 -0400 Subject: Switched to natural arrows, put ENTER on middle Fn, swapped Shift and CTRL. --- keyboards/planck/keymaps/impossible/keymap.c | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 2489fc270..037282ee2 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -42,19 +42,32 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Alpha-numeric + ,-----------------------------------------------------------------------------------------------. + | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | + |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | + `-----------------------------------------------------------------------------------------------' +*/ + [_ALPHA] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, GUI_T(KC_ENTER), KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), KC_SLASH, KC_COMM, SFT_T(KC_BSPC), LT(_FN, KC_ESC), CTL_T(KC_SPC), KC_DOT, - KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, KC_KP_0} + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, + KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, [_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, KC_ENTER, _______, KC_FN1, KC_FN2, KC_FN3}, - {_______, KC_BSLASH, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGUP, KC_PGDN, KC_END, KC_FN10} + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, + {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} }, /* Qwerty @@ -67,7 +80,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' - */ + */ [_QWERTY] = { {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}, -- cgit v1.2.3 From 723857bf8a59a4d9a779bfb1a0acd049bb4702d0 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Fri, 22 Jul 2016 18:17:34 -0400 Subject: Table for Fn layer. --- keyboards/planck/keymaps/impossible/keymap.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 037282ee2..6c22423ff 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -63,6 +63,18 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, +/* Symbols (FN Held) + ,-----------------------------------------------------------------------------------------------. + | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | + `-----------------------------------------------------------------------------------------------' +*/ + [_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, -- cgit v1.2.3 From 34bce6f206e30c06f4b6ccd22d461690732ea607 Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Sun, 24 Jul 2016 04:08:40 +0200 Subject: fixed stupid errors --- keyboards/planck/keymaps/bone2planck/keymap.c | 29 ++++++++++++++++----------- 1 file changed, 17 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index ceb556425..4cac60ff9 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -3,10 +3,15 @@ #ifdef BACKLIGHT_ENABLE #include "backlight.h" #endif +#include "keymap_german.h" + +/* for intellisense, comment for building #include "..\..\..\..\quantum\keymap_extras\keymap_german.h" #include "..\..\..\..\quantum\keymap_common.h" #include "..\..\..\..\tmk_core\common\keycode.h" -#define _______ = KC_TRNS; +*/ + +#define _______ KC_TRNS /* This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. It has "üäöß" as it is optimized for a mix of German & English. @@ -26,14 +31,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | | Ctrl | Esc | +* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | Alt | Ctrl | Esc | * `-----------------------------------------------------------------------------------' */ [0] = { { DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS }, { LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, - { KC_LGUI, KC_LCTL, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_NO, KC_RCTL, KC_ESC } + { KC_RGUI, KC_LCTL, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_RCTL, KC_ESC } }, /* M1 Special Characters @@ -45,7 +50,7 @@ very ergonomic placement for coding * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | | Ctrl | Esc | +* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | Alt | Ctrl | Esc | * `-----------------------------------------------------------------------------------' */ [1] = { @@ -64,7 +69,7 @@ very easy to get used to & intuituve placement * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| | Tab | Ins | Enter| | 0 | 1 | 2 | 3 | ; |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M3 | M2 | Space | M2 | M3 | | Ctrl | Esc | +* | GUI | Ctrl | Alt | M3 | M2 | Space | M2 | M3 | Alt | Ctrl | Esc | * `-----------------------------------------------------------------------------------' */ [2] = { @@ -83,12 +88,12 @@ accessed by sliding from M2 to M3 with thumb * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M3 | | Space | | M3 | | Ctrl | Esc | +* | GUI | Ctrl | Alt | M3 | | Space | | M3 | Alt | Ctrl | Esc | * `-----------------------------------------------------------------------------------' */ [3] = { - { KC_NO, KC_NO, DE_7, DE_8 DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, + { KC_NO, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, { _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, { _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ }, { _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ } @@ -104,7 +109,7 @@ slide from m4 to m5 to access flipped version * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M4 | M5 | Space | M5 | M4 | | Ctrl | Esc | +* | GUI | Ctrl | Alt | M4 | M5 | Space | M5 | M4 | Alt | Ctrl | Esc | * `-----------------------------------------------------------------------------------' */ [4] = { @@ -112,7 +117,7 @@ slide from m4 to m5 to access flipped version { KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO }, { _______, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, _______ }, { _______, _______, _______, _______, MO(5), _______, _______, MO(5), _______, _______, _______, _______ } -} +}, /* flipped Function & Media Keys @@ -123,13 +128,13 @@ slide from m4 to m5 to access flipped version * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ² | F1 | F2 | F3 | | | Prev | Play | Next | |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | | M5 | Space | M5 | | | Ctrl | Esc | +* | GUI | Ctrl | Alt | | M5 | Space | M5 | | Alt | Ctrl | Esc | * `-----------------------------------------------------------------------------------' */ [5] = { { KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO }, - { KC_NO, KC_SQ3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, - { _______, KC_SQ2, KC_F1, KC_F2, KC_F3, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, + { KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, + { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, { _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ } } }; -- cgit v1.2.3 From 58f092cf872a8f3f584b98445672f3e6809672c2 Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Sun, 24 Jul 2016 04:52:35 +0200 Subject: moved ctrl --- keyboards/planck/keymaps/bone2planck/keymap.c | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 4cac60ff9..440de7f0d 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -5,7 +5,8 @@ #endif #include "keymap_german.h" -/* for intellisense, comment for building +// for intellisense, comment for building +/* #include "..\..\..\..\quantum\keymap_extras\keymap_german.h" #include "..\..\..\..\quantum\keymap_common.h" #include "..\..\..\..\tmk_core\common\keycode.h" @@ -31,14 +32,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| F | V | Ü | Ä | Ö | Y | Z | , | . | K |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | Alt | Ctrl | Esc | +* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [0] = { - { DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS }, - { LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, - { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, - { KC_RGUI, KC_LCTL, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_RCTL, KC_ESC } + { DE_Q, DE_J, DE_D, DE_U, DE_A, DE_X, DE_P, DE_H, DE_L, DE_M, DE_W, DE_SS }, + { LT(1,KC_TAB), DE_C, DE_T, DE_I, DE_E, DE_O, DE_B, DE_N, DE_R, DE_S, DE_G, LT(1,KC_ENT) }, + { KC_LSFT, DE_F, DE_V, DE_UE, DE_AE, DE_OE, DE_Y, DE_Z, DE_COMM, DE_DOT, DE_K, KC_LSFT }, + { KC_LCTL, KC_RGUI, KC_LALT, MO(4), MO(2), KC_SPC, KC_SPC, MO(2), MO(4), KC_RALT, KC_ESC, KC_RCTL } }, /* M1 Special Characters @@ -50,7 +51,7 @@ very ergonomic placement for coding * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| # | $ | | | ~ | € | + | % | " | ' | ; |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M4 | M2 | Space | M2 | M4 | Alt | Ctrl | Esc | +* | Ctrl | GUI | Alt | M4 | M2 | Space | M2 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [1] = { @@ -69,7 +70,7 @@ very easy to get used to & intuituve placement * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| | Tab | Ins | Enter| | 0 | 1 | 2 | 3 | ; |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M3 | M2 | Space | M2 | M3 | Alt | Ctrl | Esc | +* | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [2] = { @@ -88,7 +89,7 @@ accessed by sliding from M2 to M3 with thumb * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| 0 | 1 | 2 | 3 | ; | | Tab | Ins | Enter| |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M3 | | Space | | M3 | Alt | Ctrl | Esc | +* | Ctrl | GUI | Alt | M3 | | Space | | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ @@ -109,7 +110,7 @@ slide from m4 to m5 to access flipped version * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| | Prev | Play | Next | | ² | F1 | F2 | F3 | F10 |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | M4 | M5 | Space | M5 | M4 | Alt | Ctrl | Esc | +* | Ctrl | GUI | Alt | M4 | M5 | Space | M5 | M4 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [4] = { @@ -128,7 +129,7 @@ slide from m4 to m5 to access flipped version * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| ² | F1 | F2 | F3 | | | Prev | Play | Next | |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| -* | GUI | Ctrl | Alt | | M5 | Space | M5 | | Alt | Ctrl | Esc | +* | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [5] = { -- cgit v1.2.3 From 1bfd57e2345119d5c60e95cdf82e14eb81a3b027 Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Sun, 24 Jul 2016 05:02:06 +0200 Subject: moved insert --- keyboards/planck/keymaps/bone2planck/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 440de7f0d..6390e1289 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -64,19 +64,19 @@ very ergonomic placement for coding /* Navigation & Number Blocks very easy to get used to & intuituve placement * ,-----------------------------------------------------------------------------------. -* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | | +* | | PgUp | Bksp | Up | DEL | PgDn | | 7 | 8 | 9 | | Ins | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Tab | Home | Lft | Down | Right| End | . | 4 | 5 | 6 | , | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| | Tab | Ins | Enter| | 0 | 1 | 2 | 3 | ; |Shift | +* | Shift| | Tab | | Enter| | 0 | 1 | 2 | 3 | ; |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | M3 | M2 | Space | M2 | M3 | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [2] = { - { KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_NO }, + { KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_INS }, { KC_TAB, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_ENT }, - { _______, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ }, + { _______, KC_NO, KC_TAB, KC_NO, KC_ENT, KC_NO, DE_0, DE_1, DE_2, DE_3, DE_SCLN, _______ }, { _______, _______, _______, MO(3), _______, _______, _______, _______, MO(3), _______, _______, _______ } }, @@ -94,7 +94,7 @@ accessed by sliding from M2 to M3 with thumb */ [3] = { - { KC_NO, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, + { KC_NO, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, { _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, { _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ }, { _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ } -- cgit v1.2.3 From 4e0bf283f695b4b584bb62d31bb4cd6d7d1f2203 Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Sun, 24 Jul 2016 05:11:07 +0200 Subject: added readme --- keyboards/planck/keymaps/bone2planck/readme.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 keyboards/planck/keymaps/bone2planck/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/bone2planck/readme.md b/keyboards/planck/keymaps/bone2planck/readme.md new file mode 100644 index 000000000..3c425efdd --- /dev/null +++ b/keyboards/planck/keymaps/bone2planck/readme.md @@ -0,0 +1,8 @@ +check keymap.c to the layers + +This Layout tries to emulate the Bone2 Variant of Neo2, and is intended to be used with a German QWERTZ Softwarelayout. +It has "üäöß" as it is optimized for a mix of German & English. +My favourite features are the placement of the special characters often used for programming right on the home row +and the number & navigation block combo, so you never have to move your hands from their home position. + +Bone2 wiki page: http://wiki.neo-layout.org/wiki/Bone \ No newline at end of file -- cgit v1.2.3 From 3e462fac3101955ad3561a104c24ca6125e85acd Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Mon, 25 Jul 2016 20:21:32 +0200 Subject: added missing F keys in flipped layer --- keyboards/planck/keymaps/bone2planck/keymap.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 6390e1289..5abae692c 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -123,19 +123,19 @@ slide from m4 to m5 to access flipped version /* flipped Function & Media Keys * ,-----------------------------------------------------------------------------------. -* | | | F7 | F8 | F9 | | | Print|Scroll| Pause| | | +* | | | F7 | F8 | F9 | F12 | | Print|Scroll| Pause| | | * |------+------+------+------+------+-------------+------+------+------+------+------| -* | | ³ | F4 | F5 | F6 | | | Mute | Vol- | Vol+ | | | +* | | ³ | F4 | F5 | F6 | F11 | | Mute | Vol- | Vol+ | | | * |------+------+------+------+------+------|------+------+------+------+------+------| -* | Shift| ² | F1 | F2 | F3 | | | Prev | Play | Next | |Shift | +* | Shift| ² | F1 | F2 | F3 | F10 | | Prev | Play | Next | |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Ctrl | GUI | Alt | | M5 | Space | M5 | | Alt | Esc | Ctrl | * `-----------------------------------------------------------------------------------' */ [5] = { - { KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_NO, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO }, - { KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_NO, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, - { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_NO, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, + { KC_NO, KC_NO, KC_F7, KC_F8, KC_F9, KC_F12, KC_NO, KC_PSCR, KC_SLCK, KC_PAUS, KC_NO, KC_NO }, + { KC_NO, DE_SQ3, KC_F4, KC_F5, KC_F6, KC_F11, KC_NO, KC_MUTE, KC_VOLD, KC_VOLU, KC_NO, KC_NO }, + { _______, DE_SQ2, KC_F1, KC_F2, KC_F3, KC_F10, KC_NO, KC_MPRV, KC_MPLY, KC_MNXT, KC_NO, _______ }, { _______, _______, _______, KC_NO, _______, _______, _______, _______, KC_NO, _______, _______, _______ } } }; -- cgit v1.2.3 From 8244fa40ccd89ad16ddc00210d5b1b169fb655c2 Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Tue, 26 Jul 2016 14:58:17 +0200 Subject: added config.h, and missing Ins of filpped navigation layer --- keyboards/planck/keymaps/bone2planck/config.h | 90 +++++++++++++++++++++++++++ keyboards/planck/keymaps/bone2planck/keymap.c | 6 +- 2 files changed, 93 insertions(+), 3 deletions(-) create mode 100644 keyboards/planck/keymaps/bone2planck/config.h (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/bone2planck/config.h b/keyboards/planck/keymaps/bone2planck/config.h new file mode 100644 index 000000000..ba157db92 --- /dev/null +++ b/keyboards/planck/keymaps/bone2planck/config.h @@ -0,0 +1,90 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define PREVENT_STUCK_MODIFIERS + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define MANUFACTURER Ortholinear Keyboards +#define PRODUCT The Planck Keyboard +#define DESCRIPTION A compact ortholinear keyboard + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* Planck PCB default pin-out */ +#define MATRIX_ROW_PINS { D0, D5, B5, B6 } +#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define UNUSED_PINS + +#define BACKLIGHT_PIN B7 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#ifdef SUBPROJECT_rev3 + #include "rev3/config.h" +#endif +#ifdef SUBPROJECT_rev4 + #include "rev4/config.h" +#endif + +#endif diff --git a/keyboards/planck/keymaps/bone2planck/keymap.c b/keyboards/planck/keymaps/bone2planck/keymap.c index 5abae692c..7db3197a7 100644 --- a/keyboards/planck/keymaps/bone2planck/keymap.c +++ b/keyboards/planck/keymaps/bone2planck/keymap.c @@ -5,7 +5,7 @@ #endif #include "keymap_german.h" -// for intellisense, comment for building +// for intellisense, has to be commented for building /* #include "..\..\..\..\quantum\keymap_extras\keymap_german.h" #include "..\..\..\..\quantum\keymap_common.h" @@ -83,7 +83,7 @@ very easy to get used to & intuituve placement /* Flipped Navigation & Number Blocks for one handed use accessed by sliding from M2 to M3 with thumb * ,-----------------------------------------------------------------------------------. -* | | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | +* | Ins | | 7 | 8 | 9 | | PgUp | Bksp | Up | DEL | PgDn | | * |------+------+------+------+------+-------------+------+------+------+------+------| * | Tab | . | 4 | 5 | 6 | , | Home | Left | Down | Right| End | Enter| * |------+------+------+------+------+------|------+------+------+------+------+------| @@ -94,7 +94,7 @@ accessed by sliding from M2 to M3 with thumb */ [3] = { - { KC_NO, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, + { KC_INS, KC_NO, DE_7, DE_8, DE_9, KC_NO, KC_PGUP, KC_BSPC, KC_UP, KC_DEL, KC_PGDN, KC_NO }, { _______, DE_DOT, DE_4, DE_5, DE_6, DE_COMM, KC_HOME, KC_LEFT, KC_DOWN, KC_RGHT, KC_END, _______ }, { _______, DE_0, DE_1, DE_2, DE_3, DE_SCLN, KC_NO, KC_TAB, KC_INS, KC_ENT, KC_NO, _______ }, { _______, _______, _______, _______, KC_NO, _______, _______, KC_NO, _______, _______, _______, _______ } -- cgit v1.2.3 From a41a7a9100b9f4c6bfdf49b39b05e626ffd95397 Mon Sep 17 00:00:00 2001 From: Jason Janse van Rensburg Date: Tue, 26 Jul 2016 16:19:34 +0200 Subject: include base config.h instead of copying it --- keyboards/planck/keymaps/bone2planck/config.h | 93 ++------------------------- 1 file changed, 5 insertions(+), 88 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/bone2planck/config.h b/keyboards/planck/keymaps/bone2planck/config.h index ba157db92..60aff6db0 100644 --- a/keyboards/planck/keymaps/bone2planck/config.h +++ b/keyboards/planck/keymaps/bone2planck/config.h @@ -1,90 +1,7 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#define PREVENT_STUCK_MODIFIERS - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define MANUFACTURER Ortholinear Keyboards -#define PRODUCT The Planck Keyboard -#define DESCRIPTION A compact ortholinear keyboard - -/* key matrix size */ -#define MATRIX_ROWS 4 -#define MATRIX_COLS 12 - -/* Planck PCB default pin-out */ -#define MATRIX_ROW_PINS { D0, D5, B5, B6 } -#define MATRIX_COL_PINS { F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define UNUSED_PINS - -#define BACKLIGHT_PIN B7 - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#ifdef SUBPROJECT_rev3 - #include "rev3/config.h" -#endif -#ifdef SUBPROJECT_rev4 - #include "rev4/config.h" +#ifndef CONFIG_USER_H +#define CONFIG_USER_H #endif -#endif +#include "../../config.h" + +#define PREVENT_STUCK_MODIFIERS \ No newline at end of file -- cgit v1.2.3 From fb2a7d787a6818ea9aefcff5ce36bac3fc48fa6c Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 17:29:19 -0400 Subject: Removed unused layers (left QWERTY for later use/reference) --- keyboards/planck/keymaps/impossible/keymap.c | 50 ++-------------------------- 1 file changed, 3 insertions(+), 47 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 6c22423ff..ddf4e2feb 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -17,18 +17,12 @@ extern keymap_config_t keymap_config; #define _ALPHA 0 #define _FN 1 -#define _QWERTY 3 -#define _COLEMAK 4 -#define _DVORAK 5 -#define _LOWER 6 -#define _RAISE 7 -#define _PLOVER 8 -#define _ADJUST 16 +#define _QWERTY 2 +#define _PLOVER 3 +#define _ADJUST 4 enum planck_keycodes { QWERTY = SAFE_RANGE, - COLEMAK, - DVORAK, PLOVER, LOWER, RAISE, @@ -242,44 +236,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case COLEMAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_colemak, false, 0); - #endif - persistant_default_layer_set(1UL<<_COLEMAK); - } - return false; - break; - case DVORAK: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_dvorak, false, 0); - #endif - persistant_default_layer_set(1UL<<_DVORAK); - } - return false; - break; - case LOWER: - if (record->event.pressed) { - layer_on(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_LOWER); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; - case RAISE: - if (record->event.pressed) { - layer_on(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } else { - layer_off(_RAISE); - update_tri_layer(_LOWER, _RAISE, _ADJUST); - } - return false; - break; case BACKLIT: if (record->event.pressed) { register_code(KC_RSFT); -- cgit v1.2.3 From 465cf08c6398da60ef8029aa2d813ed023fbc253 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 17:37:56 -0400 Subject: Removed unused layers (keeping QWERTY for later/reference) --- keyboards/planck/keymaps/impossible/keymap.c | 81 ++-------------------------- 1 file changed, 4 insertions(+), 77 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index ddf4e2feb..468677620 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -48,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | `-----------------------------------------------------------------------------------------------' */ - + [_ALPHA] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, @@ -57,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, -/* Symbols (FN Held) +/* FN-key held ,-----------------------------------------------------------------------------------------------. | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| @@ -86,7 +86,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | * `-----------------------------------------------------------------------------------' - */ + */ [_QWERTY] = { {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}, @@ -94,78 +94,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} }, -/* Colemak - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_COLEMAK] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, - {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, - -/* Dvorak - * ,-----------------------------------------------------------------------------------. - * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | O | E | U | I | D | H | T | N | S | / | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' - */ -[_DVORAK] = { - {KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC}, - {KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH}, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} -}, - -/* Lower - * ,-----------------------------------------------------------------------------------. - * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_LOWER] = { - {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),_______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - -/* Raise - * ,-----------------------------------------------------------------------------------. - * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | Next | Vol- | Vol+ | Play | - * `-----------------------------------------------------------------------------------' - */ -[_RAISE] = { - {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, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, - /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. * | # | # | # | # | # | # | # | # | # | # | # | # | @@ -209,9 +137,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); + float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); float tone_plover[][2] = SONG(PLOVER_SOUND); float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -- cgit v1.2.3 From ff8136b8837615e342ee475a0968168a08a81ca9 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 17:39:21 -0400 Subject: Modified Plover layer for Impossible's home position. --- keyboards/planck/keymaps/impossible/keymap.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 468677620..8f85e0fb4 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -96,21 +96,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------. - * | # | # | # | # | # | # | # | # | # | # | # | # | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | S | T | P | H | * | * | F | P | L | T | D | + * | S | T | P | H | * | F | P | L | T | D | | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * | S | K | W | R | * | R | B | G | S | Z | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Exit | | | A | O | | E | U | | | | + * | # | # | # | # | | # | # | # | # | # | | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Exit | | A | O | | E | U | | | | | | * `-----------------------------------------------------------------------------------' */ [_PLOVER] = { - {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, - {XXXXXXX, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC}, - {XXXXXXX, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {EXT_PLV, XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX} + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, XXXXXXX, XXXXXXX}, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX, XXXXXXX}, + {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, + {EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, /* Adjust (Lower + Raise) @@ -124,6 +124,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' */ + [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, -- cgit v1.2.3 From 57952949fe2fa119e986e96363565248a9461eb2 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 26 Jul 2016 23:33:21 -0400 Subject: General table cleanup. --- keyboards/planck/keymaps/impossible/keymap.c | 97 ++++++++++++++-------------- 1 file changed, 49 insertions(+), 48 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 8f85e0fb4..2a9197aec 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -38,16 +38,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Alpha-numeric - ,-----------------------------------------------------------------------------------------------. - | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | - |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | - `-----------------------------------------------------------------------------------------------' -*/ + * ,-----------------------------------------------------------------------------------------------. + * | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | + * `-----------------------------------------------------------------------------------------------' + */ [_ALPHA] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, @@ -58,16 +58,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, /* FN-key held - ,-----------------------------------------------------------------------------------------------. - | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | - |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | - |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | - `-----------------------------------------------------------------------------------------------' -*/ + * ,-----------------------------------------------------------------------------------------------. + * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | + * `-----------------------------------------------------------------------------------------------' + */ [_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, @@ -77,16 +77,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, /* Qwerty - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Brite| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Shift | Z | X | C | V | B | N | M | , | . | / |Enter | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Brite | Ctrl | Alt | GUI |Lower | Sp ace |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------------------' */ + [_QWERTY] = { {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}, @@ -95,15 +96,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { }, /* Plover layer (http://opensteno.org) - * ,-----------------------------------------------------------------------------------. - * | S | T | P | H | * | F | P | L | T | D | | | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | S | K | W | R | * | R | B | G | S | Z | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | # | # | # | # | | # | # | # | # | # | | | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Exit | | A | O | | E | U | | | | | | - * `-----------------------------------------------------------------------------------' + * ,-----------------------------------------------------------------------------------------------. + * | S | T | P | H | * | F | P | L | T | D | | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | S | K | W | R | * | R | B | G | S | Z | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | # | # | # | # | | # | # | # | # | # | | | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | Exit | | A | O | | E | U | | | | | | + * `-----------------------------------------------------------------------------------------------' */ [_PLOVER] = { @@ -113,16 +114,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} }, -/* Adjust (Lower + Raise) - * ,-----------------------------------------------------------------------------------. - * | | Reset| | | | | | | | | | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | - * |------+------+------+------+------+------|------+------+------+------+------+------| - * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | - * `-----------------------------------------------------------------------------------' +/* Adjust + * ,-----------------------------------------------------------------------------------------------. + * | | Reset | | | | | | | | | | Del | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | | | |Aud on |Audoff |AGnorm |AGswap |Qwerty | | |Plover | | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | |Voice- |Voice+ |Mus on |Musoff |MIDIon |MIDIof | | | | | | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------------------' */ [_ADJUST] = { -- cgit v1.2.3 From a4e5a4d566f79b2b1c7bb286d25f127d631230d9 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Thu, 28 Jul 2016 13:49:25 -0400 Subject: Modified Qwerty, created Qwerty with numbers --- keyboards/planck/keymaps/impossible/keymap.c | 64 +++++++++++++++++----------- 1 file changed, 40 insertions(+), 24 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 2a9197aec..fe9c5dc28 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -20,6 +20,7 @@ extern keymap_config_t keymap_config; #define _QWERTY 2 #define _PLOVER 3 #define _ADJUST 4 +#define _QWERTY2 5 enum planck_keycodes { QWERTY = SAFE_RANGE, @@ -36,7 +37,6 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Alpha-numeric * ,-----------------------------------------------------------------------------------------------. * | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | @@ -50,51 +50,69 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_ALPHA] = { - {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, - {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, - KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} + {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, + {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} }, /* FN-key held * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | DFU | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * | DFU |Insert | PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| ` |CTL/Bsp| Fn/Ent|SFT/SPC| ; | Home | PgDn | End | F10 | / | + * |Alt/Tab|Gui/Esc| ` |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | / | * `-----------------------------------------------------------------------------------------------' */ [_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, - {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, + {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} }, /* Qwerty * ,-----------------------------------------------------------------------------------------------. - * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * | Esc | Q | W | E | R | T | Y | U | I | O | P | / | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * | Tab | A | S | D | F | G | H | J | K | L | ; | " | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Shift | Z | X | C | V | B | N | M | , | . | / |Enter | + * | Shift | Z | X | C | V | B | N | M | , | . | Up | Enter | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Brite | Ctrl | Alt | GUI |Lower | Sp ace |Raise | Left | Down | Up |Right | + * | Ctrl | Alt | GUI | | | Bksp | Space | | | Left | Down | Right | * `-----------------------------------------------------------------------------------------------' */ [_QWERTY] = { - {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 }, - {BACKLIT, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH}, + {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_UP, KC_ENT }, + {KC_LCTL, KC_LALT, KC_LGUI, _______, _______, KC_BSPC, KC_SPC, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT} }, +/* Qwerty W/ Numbers + * ,-----------------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | TAB | Q | W | E | R | T | Y | U | I | O | P | / | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | Shift | A | S | D | F | G | H | J | K | L | ; | " | + * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| + * | Ctrl | Z | X | C | V | SPC | B | N | M | , | . | Enter | + * `-----------------------------------------------------------------------------------------------' + */ + +[_QWERTY2] = { + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC/3_7, KC_8, KC_9, KC_0, 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_SLSH}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT}, +1}, + /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------------------. * | S | T | P | H | * | F | P | L | T | D | | | @@ -128,7 +146,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_ADJUST] = { {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______}, {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} } @@ -182,8 +200,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { stop_all_notes(); PLAY_NOTE_ARRAY(tone_plover, false, 0); #endif - layer_off(_RAISE); - layer_off(_LOWER); layer_off(_ADJUST); layer_on(_PLOVER); if (!eeconfig_is_enabled()) { -- cgit v1.2.3 From 6567fa1ebeabe8fc25df91e8f75330488763b403 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Thu, 28 Jul 2016 14:56:26 -0400 Subject: Fixed Function keys (Impossible layout) --- keyboards/planck/keymaps/impossible/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index fe9c5dc28..edc2ed873 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -69,10 +69,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_FN12, KC_FN7, KC_FN8, KC_FN9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_FN11, KC_FN4, KC_FN5, KC_FN6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_FN1, KC_FN2, KC_FN3}, - {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_FN10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty -- cgit v1.2.3 From c018743729ce55effcec81efa8663dbc54626d15 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Fri, 29 Jul 2016 00:08:48 -0400 Subject: Connected all layers through Adjust layer --- keyboards/planck/keymaps/impossible/keymap.c | 154 ++++++++++++--------------- 1 file changed, 69 insertions(+), 85 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index edc2ed873..4ef16aa3a 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -15,20 +15,17 @@ extern keymap_config_t keymap_config; // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _ALPHA 0 -#define _FN 1 +#define _WORKMAN 0 +#define _WORKMAN_FN 1 #define _QWERTY 2 -#define _PLOVER 3 -#define _ADJUST 4 -#define _QWERTY2 5 +#define _QWERTY_FN 3 +#define _PLOVER 4 +#define _ADJUST 5 enum planck_keycodes { - QWERTY = SAFE_RANGE, - PLOVER, - LOWER, - RAISE, - BACKLIT, - EXT_PLV + WORKMAN = SAFE_RANGE, + QWERTY, + PLOVER }; // Fillers to make layering more clear @@ -37,7 +34,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Alpha-numeric +/* Workman Alpha-numeric * ,-----------------------------------------------------------------------------------------------. * | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| @@ -45,73 +42,73 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 | / | + * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/ / | * `-----------------------------------------------------------------------------------------------' */ -[_ALPHA] = { +[_WORKMAN] = { {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, KC_SLASH} + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_WORKMAN_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJUST, KC_SLASH)} }, -/* FN-key held +/* FN-key held (Workman) * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | DFU |Insert | PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * | Tab | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| ` |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | / | + * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | * `-----------------------------------------------------------------------------------------------' */ -[_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {RESET, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, _______, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} +[_WORKMAN_FN] = { + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {KC_Tab, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty * ,-----------------------------------------------------------------------------------------------. - * | Esc | Q | W | E | R | T | Y | U | I | O | P | / | + * |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Tab | A | S | D | F | G | H | J | K | L | ; | " | + * | Ctrl | Q | W | E | R | T | Y | U | I | O | P | Enter | + * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| + * | Shift | A | S | D | F | G | H | J | K | L | ; | " | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Shift | Z | X | C | V | B | N | M | , | . | Up | Enter | - * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Ctrl | Alt | GUI | | | Bksp | Space | | | Left | Down | Right | + * |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/ / | * `-----------------------------------------------------------------------------------------------' */ [_QWERTY] = { - {KC_ESC, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_SLSH}, - {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_UP, KC_ENT }, - {KC_LCTL, KC_LALT, KC_LGUI, _______, _______, KC_BSPC, KC_SPC, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT} + {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_QWERTY_FN, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, }, -/* Qwerty W/ Numbers +/* FN-key held (Qwerty) * ,-----------------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | - * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | / | - * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Shift | A | S | D | F | G | H | J | K | L | ; | " | + * | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Ctrl | ~ | | PgUp | | | | | Up | - | = | F12 | + * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| + * | Shift | | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Ctrl | Z | X | C | V | SPC | B | N | M | , | . | Enter | + * |Alt/Tab| | CapsLk| ScrLk | NumLk | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | * `-----------------------------------------------------------------------------------------------' */ -[_QWERTY2] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC/3_7, KC_8, KC_9, KC_0, 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_SLSH}, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {KC_LCTL, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_SPC, KC_N, KC_M, KC_COMM, KC_DOT, KC_ENT}, -1}, +[_QWERTY_FN] = { + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, + {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, + {_______, XXXXXXX, KC_CAPSLOCK, KC_SLCK, KC_NLCK, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} +}, /* Plover layer (http://opensteno.org) * ,-----------------------------------------------------------------------------------------------. @@ -121,49 +118,49 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | # | # | # | # | | # | # | # | # | # | | | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Exit | | A | O | | E | U | | | | | | + * | | | A | O | | E | U | | | | | Adjust| * `-----------------------------------------------------------------------------------------------' */ [_PLOVER] = { - {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, XXXXXXX, XXXXXXX}, - {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, XXXXXXX, XXXXXXX}, - {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, - {EXT_PLV, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX} + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX}, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX}, + {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_ADJUST)} }, /* Adjust * ,-----------------------------------------------------------------------------------------------. - * | | Reset | | | | | | | | | | Del | + * | | | | | | | | | | | | RESET | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | | | |Aud on |Audoff |AGnorm |AGswap |Qwerty | | |Plover | | + * | | | | | | | | |Voice +| Audio |MIDIoff| | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | |Voice- |Voice+ |Mus on |Musoff |MIDIon |MIDIof | | | | | | + * | | | | | | | | |Voice -| Music |MIDI on| | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | | | | | | + * | | | | | | | | |Workman| Qwerty| Plover| Adjust| * `-----------------------------------------------------------------------------------------------' */ [_ADJUST] = { - {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, - {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, _______, _______, PLOVER, _______}, - {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, + {_______, _______, _______, _______, _______, _______, _______, _______, MUV_IN, AU_TOG, MI_OFF, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MU_TOG, MI_ON, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, WORKMAN, QWERTY, PLOVER, _______} } - }; #ifdef AUDIO_ENABLE float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_workman[][2] = SONG(QWERTY_SOUND); +float tone_qwerty[][2] = SONG(COLEMAK_SOUND); float tone_plover[][2] = SONG(PLOVER_SOUND); -float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); + float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); -float tone_goodbye[][2] = SONG(GOODBYE_SOUND); #endif @@ -174,49 +171,36 @@ void persistant_default_layer_set(uint16_t default_layer) { bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case QWERTY: + case WORKMAN: if (record->event.pressed) { #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + PLAY_NOTE_ARRAY(tone_workman, false, 0); #endif - persistant_default_layer_set(1UL<<_QWERTY); + persistant_default_layer_set(1UL<<_WORKMAN); } return false; break; - case BACKLIT: + case QWERTY: if (record->event.pressed) { - register_code(KC_RSFT); - #ifdef BACKLIGHT_ENABLE - backlight_step(); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); #endif - } else { - unregister_code(KC_RSFT); + persistant_default_layer_set(1UL<<_QWERTY); } return false; break; case PLOVER: if (record->event.pressed) { #ifdef AUDIO_ENABLE - stop_all_notes(); PLAY_NOTE_ARRAY(tone_plover, false, 0); #endif - layer_off(_ADJUST); - layer_on(_PLOVER); if (!eeconfig_is_enabled()) { - eeconfig_init(); + eeconfig_init(); } keymap_config.raw = eeconfig_read_keymap(); keymap_config.nkro = 1; eeconfig_update_keymap(keymap_config.raw); - } - return false; - break; - case EXT_PLV: - if (record->event.pressed) { - #ifdef AUDIO_ENABLE - PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); - #endif - layer_off(_PLOVER); + persistant_default_layer_set(1UL<<_PLOVER); } return false; break; -- cgit v1.2.3 From 5f2d3f27de2913656176516f437880ec0c296e7d Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Sat, 30 Jul 2016 00:56:43 -0400 Subject: Moved CapsLk, ScrollLk, and NumLk to Adjust layer --- keyboards/planck/keymaps/impossible/keymap.c | 34 ++++++++++++++-------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 4ef16aa3a..bf5588ad5 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -57,19 +57,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Caps | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Tab | Insert| PrtSc | ScrLk | Pause | NumLk | Menu | | PgUp | F1 | F2 | F3 | + * | Tab | Insert| PrtSc | | Pause | | Menu | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | * `-----------------------------------------------------------------------------------------------' */ [_WORKMAN_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, - {KC_CAPSLOCK, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {KC_Tab, KC_INS, KC_PSCR, KC_SLCK, KC_PAUSE, KC_NUMLOCK, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {XXXXXXX, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {KC_Tab, KC_INS, KC_PSCR, XXXXXXX, KC_PAUSE, XXXXXXX, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty @@ -99,15 +99,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Shift | | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |Alt/Tab| | CapsLk| ScrLk | NumLk | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | + * |Alt/Tab| | | | | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | * `-----------------------------------------------------------------------------------------------' */ [_QWERTY_FN] = { - {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, - {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, - {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, - {_______, XXXXXXX, KC_CAPSLOCK, KC_SLCK, KC_NLCK, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, + {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} }, /* Plover layer (http://opensteno.org) @@ -133,19 +133,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------------. * | | | | | | | | | | | | RESET | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | | | | | | | | |Voice +| Audio |MIDIoff| | + * | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | | | | | | | | |Voice -| Music |MIDI on| | + * | | | | | | | | ScrLk |Voice -| Music |MIDI on| | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | |Workman| Qwerty| Plover| Adjust| + * | | | | | | | | Numlk |Workman| Qwerty| Plover| Adjust| * `-----------------------------------------------------------------------------------------------' */ [_ADJUST] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, - {_______, _______, _______, _______, _______, _______, _______, _______, MUV_IN, AU_TOG, MI_OFF, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, MU_TOG, MI_ON, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, WORKMAN, QWERTY, PLOVER, _______} + {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______} } }; -- cgit v1.2.3 From 4b74c90cdbe820fc662eb183fa3e138f16191437 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Sun, 31 Jul 2016 22:39:25 -0400 Subject: Added quote key. --- keyboards/planck/keymaps/impossible/keymap.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index bf5588ad5..b1815e901 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -57,19 +57,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------------------. * | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | [ | ] | - | Del | = | ( | ) | F11 | F4 | F5 | F6 | + * | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Tab | Insert| PrtSc | | Pause | | Menu | | PgUp | F1 | F2 | F3 | + * | Menu | Insert| PrtSc | = | Pause | / | | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | * `-----------------------------------------------------------------------------------------------' */ [_WORKMAN_FN] = { - {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, - {XXXXXXX, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_EQUAL, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {KC_Tab, KC_INS, KC_PSCR, XXXXXXX, KC_PAUSE, XXXXXXX, KC_MENU, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} + {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, + {KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, + {KC_MENU, KC_INS, KC_PSCR, KC_EQUAL, KC_PAUSE, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} }, /* Qwerty @@ -97,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Ctrl | ~ | | PgUp | | | | | Up | - | = | F12 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Shift | | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | + * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * |Alt/Tab| | | | | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | * `-----------------------------------------------------------------------------------------------' -- cgit v1.2.3 From 76ef37e72d0cba9c83775e82c086534e8d45a7b8 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Mon, 1 Aug 2016 18:54:25 -0400 Subject: Corrected Qwerty/Fn Mismatch. --- keyboards/planck/keymaps/impossible/keymap.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index b1815e901..65d8ac5fd 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -85,10 +85,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_QWERTY] = { - {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, KC_B, LT(_QWERTY_FN, KC_SPC), KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, + {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QWERTY_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, }, /* FN-key held (Qwerty) -- cgit v1.2.3 From 0acb394ac41f56895d4287d950a79bca5437a45c Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 2 Aug 2016 22:32:27 -0400 Subject: Moved Insert, PrtSc, Pause to Adjust; Corner enter --- keyboards/planck/keymaps/impossible/keymap.c | 70 ++++++++++++++-------------- 1 file changed, 35 insertions(+), 35 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index 65d8ac5fd..e816f359a 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -16,11 +16,11 @@ extern keymap_config_t keymap_config; // entirely and just use numbers. #define _WORKMAN 0 -#define _WORKMAN_FN 1 +#define _FN 1 #define _QWERTY 2 -#define _QWERTY_FN 3 +#define _QW_FN 3 #define _PLOVER 4 -#define _ADJUST 5 +#define _ADJ 5 enum planck_keycodes { WORKMAN = SAFE_RANGE, @@ -42,15 +42,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/ / | + * |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ [_WORKMAN] = { - {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, - {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, - {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, - {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_WORKMAN_FN, KC_ENTER), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJUST, KC_SLASH)} + {KC_Q, KC_D, KC_R, KC_W, KC_B, KC_F, KC_U, KC_P, KC_J, KC_KP_7, KC_KP_8, KC_KP_9}, + {KC_A, KC_S, KC_H, KC_T, KC_G, KC_N, KC_E, KC_O, KC_I, KC_KP_4, KC_KP_5, KC_KP_6}, + {KC_Z, KC_X, KC_M, KC_C, KC_V, KC_L, KC_Y, KC_K, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3}, + {ALT_T(KC_TAB), GUI_T(KC_ESC), KC_COMM, CTL_T(KC_BSPC), LT(_FN, KC_ENT), SFT_T(KC_SPC), KC_DOT, KC_LEFT, KC_DOWN, KC_RGHT, KC_KP_0, LT(_ADJ, KC_ENT)} }, /* FN-key held (Workman) @@ -59,55 +59,55 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * | Menu | Insert| PrtSc | = | Pause | / | | | PgUp | F1 | F2 | F3 | + * | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * |Alt/Tab| Gui | ~ |CTL/Bsp|Fn/Ent |SFT/Spc| ; | Home | PgDn | End | F10 | \ | + * |Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ -[_WORKMAN_FN] = { +[_FN] = { {KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_F12, KC_F7, KC_F8, KC_F9}, {KC_TAB, KC_LBRACKET, KC_RBRACKET, KC_MINUS, KC_DELETE, KC_QUOT, KC_LPRN, KC_RPRN, KC_F11, KC_F4, KC_F5, KC_F6}, - {KC_MENU, KC_INS, KC_PSCR, KC_EQUAL, KC_PAUSE, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, - {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, KC_BSLASH} + {KC_MENU, _______, _______, KC_EQUAL, KC_BSLS, KC_SLSH, XXXXXXX, XXXXXXX, KC_PGUP, KC_F1, KC_F2, KC_F3}, + {_______, KC_LGUI, KC_GRAVE, _______, _______, _______, KC_SCOLON, KC_HOME, KC_PGDN, KC_END, KC_F10, _______} }, /* Qwerty * ,-----------------------------------------------------------------------------------------------. * |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | Ctrl | Q | W | E | R | T | Y | U | I | O | P | Enter | + * | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| * | Shift | A | S | D | F | G | H | J | K | L | ; | " | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/ / | + * |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ [_QWERTY] = { - {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, - {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, - {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, - {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QWERTY_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJUST, KC_SLASH)}, + {GUI_T(KC_ESC), KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC}, + {KC_LCTL, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_ENT}, + {KC_LSFT, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT}, + {ALT_T(KC_TAB), KC_Z, KC_X, KC_C, KC_V, LT(_QW_FN, KC_SPC), KC_B, KC_N, KC_M, KC_COMM, KC_DOT, LT(_ADJ, KC_ENT)}, }, /* FN-key held (Qwerty) * ,-----------------------------------------------------------------------------------------------. * | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Ctrl | ~ | | PgUp | | | | | Up | - | = | F12 | + * | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| - * |Alt/Tab| | | | | Fn/Spc| | Insert| PrtSc | Pause | Menu | \ | + * |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ -[_QWERTY_FN] = { - {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, - {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, - {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, KC_INS, KC_PSCR, KC_PAUSE, KC_MENU, KC_BSLASH} +[_QW_FN] = { + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, + {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______} }, /* Plover layer (http://opensteno.org) @@ -118,7 +118,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | # | # | # | # | | # | # | # | # | # | | | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| - * | | | A | O | | E | U | | | | | Adjust| + * | | | A | O | | E | U | | | | |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ @@ -126,26 +126,26 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_U, KC_I, KC_O, KC_P, KC_LBRC, XXXXXXX, XXXXXXX}, {KC_A, KC_S, KC_D, KC_F, KC_G, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, XXXXXXX, XXXXXXX}, {KC_1, KC_1, KC_1, KC_1, XXXXXXX, KC_1, KC_1, KC_1, KC_1, KC_1, XXXXXXX, XXXXXXX}, - {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MO(_ADJUST)} + {XXXXXXX, XXXXXXX, KC_C, KC_V, XXXXXXX, KC_N, KC_M, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, LT(_ADJ, KC_ENT)} }, /* Adjust * ,-----------------------------------------------------------------------------------------------. - * | | | | | | | | | | | | RESET | + * | | | | | | | | | Insert| PrtSc | Pause | RESET | * |-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| * | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * | | | | | | | | ScrLk |Voice -| Music |MIDI on| | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | | | | | | | | Numlk |Workman| Qwerty| Plover| Adjust| + * | | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ -[_ADJUST] = { - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET}, - {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______}, - {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______} +[_ADJ] = { + {_______, _______, _______, _______, _______, _______, _______, _______, KC_INS, KC_PSCR, KC_PAUSE, RESET}, + {_______, _______, _______, _______, _______, _______, _______, KC_CLCK, MUV_IN, AU_TOG, MI_OFF, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_SLCK, MUV_DE, MU_TOG, MI_ON, _______}, + {_______, _______, _______, _______, _______, _______, _______, KC_NLCK, WORKMAN, QWERTY, PLOVER, _______} } }; -- cgit v1.2.3 From 5f37b11f2c300a95e0e9e34517c5c29a3345be83 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 9 Aug 2016 11:03:12 +0100 Subject: changed order of bottom row of symbol layer to ease acess to brackets --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index a747dcb15..ed187df1d 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -71,7 +71,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------. * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | | ~ | | | + | [ | { | } | ] | = | \ | ` | | + * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -79,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_SYMB] = { {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC }, {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, - {_______, KC_TILD, KC_PIPE, KC_PLUS, KC_LBRC, KC_LCBR, KC_RCBR, KC_RBRC, KC_EQL, KC_BSLS, KC_GRV, _______}, + {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, -- cgit v1.2.3 From 725dd7328f9963959f72318af912ed66f5a5f513 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 9 Aug 2016 11:09:52 +0100 Subject: updated readme.md to reflect keymap changes --- keyboards/planck/keymaps/callum/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index d4f3449f1..030def7f7 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -31,9 +31,9 @@ On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ti None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected. ## The `SYMB` layer -![](http://i.imgur.com/iuU144Y.png) +![](http://i.imgur.com/thh1ne2.png) -The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, with brackets in the centre; then normally shifted symbols to the left, and non shifted to the right, in order of most to least used. +The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers. `esc` and `del` are repeated here since I wanted to be able to reach either, one handed, with either hand. -- cgit v1.2.3 From 993d72b11fca8d50296570dc85e9354f8045c4a6 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 12 Aug 2016 21:05:52 +0100 Subject: added a lock screen key --- keyboards/planck/keymaps/callum/keymap.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index ed187df1d..494ed30b0 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -20,7 +20,8 @@ enum planck_keycodes { BASE = SAFE_RANGE, MOVE, SYMB, - FUNC + FUNC, + LOCK }; // Fillers to make layering more clear @@ -87,7 +88,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |-----------------------------------------------------------------------------------. - * | | Play | Prev | Next | BL+ | | | | | | | | + * | | Play | Prev | Next | BL+ | | | Lock | | | | | * |------+------+------+------+------+------|------+------+------+------+------+------| * | | Mute | Vol- | Vol+ | BL- | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -96,7 +97,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, _______, _______}, {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } @@ -133,6 +134,18 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case LOCK: + if (record->event.pressed) { + register_code(KC_RSFT); + register_code(KC_RGUI); + register_code(KC_POWER); + } else { + unregister_code(KC_POWER); + unregister_code(KC_RGUI); + unregister_code(KC_RSFT); + } + return false; + break; } return true; } -- cgit v1.2.3 From 32216066e7a6881378f7f46995a00da36c0d34f3 Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Fri, 19 Aug 2016 14:36:41 -0600 Subject: Adding nicer Infinity build instructions. --- keyboards/ergodox/readme.md | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index f81d7cd8d..9f8941863 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -1,3 +1,14 @@ +# Infinity on Ubuntu Quickstart + +To build an Infinity firmware under Ubuntu (tested on 15.10): + + - Run the `util/install_dependencies.sh` script as root. + - Build the firmware with `make keymap=keymapname subproject=infinity` + - Plug in the left hand keyboard only. + - Press the program button (back of keyboard, above thumb pad). + - Install the firmware with `sudo make dfu-util keymap=keymapname subproject=infinity` + - Install the right hand firmware, but I haven't figured this out yet. + # Getting started There are two main ways you could customize the ErgoDox (EZ and Infinity) -- cgit v1.2.3 From b918aa6bab85e7dba586a9ee2bde650b721113c2 Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Fri, 19 Aug 2016 14:49:29 -0600 Subject: Adding submodule note. --- keyboards/ergodox/readme.md | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 9f8941863..c3aa6c9da 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -3,6 +3,7 @@ To build an Infinity firmware under Ubuntu (tested on 15.10): - Run the `util/install_dependencies.sh` script as root. + - Check out the submodules with `git submodule update --init --recursive` - Build the firmware with `make keymap=keymapname subproject=infinity` - Plug in the left hand keyboard only. - Press the program button (back of keyboard, above thumb pad). -- cgit v1.2.3 From 30c63b1495ac49cf4f7ea9e6271ade53496f7770 Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Fri, 19 Aug 2016 14:52:05 -0600 Subject: Noting the change directory. --- keyboards/ergodox/readme.md | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index c3aa6c9da..1c1181dba 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -4,6 +4,7 @@ To build an Infinity firmware under Ubuntu (tested on 15.10): - Run the `util/install_dependencies.sh` script as root. - Check out the submodules with `git submodule update --init --recursive` + - Go into the ErgoDox directory with `cd keyboards/ergodox` - Build the firmware with `make keymap=keymapname subproject=infinity` - Plug in the left hand keyboard only. - Press the program button (back of keyboard, above thumb pad). -- cgit v1.2.3 From 44441de8cad7255fd0637459ed39b89e34751b78 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 7 Aug 2016 17:04:39 +0300 Subject: Split keyboard makefiles into rules and Makefile --- keyboards/alps64/Makefile | 69 +---------------------- keyboards/alps64/rules.mk | 66 ++++++++++++++++++++++ keyboards/amj60/Makefile | 71 +----------------------- keyboards/amj60/rules.mk | 66 ++++++++++++++++++++++ keyboards/arrow_pad/Makefile | 73 +----------------------- keyboards/arrow_pad/rules.mk | 70 +++++++++++++++++++++++ keyboards/atomic/Makefile | 72 +----------------------- keyboards/atomic/rules.mk | 69 +++++++++++++++++++++++ keyboards/atreus/Makefile | 89 +---------------------------- keyboards/atreus/rules.mk | 82 +++++++++++++++++++++++++++ keyboards/bantam44/Makefile | 73 +----------------------- keyboards/bantam44/rules.mk | 67 ++++++++++++++++++++++ keyboards/chibios_test/Makefile | 11 +--- keyboards/chibios_test/rules.mk | 8 +++ keyboards/clueboard/Makefile | 108 +----------------------------------- keyboards/clueboard/rules.mk | 103 ++++++++++++++++++++++++++++++++++ keyboards/cluecard/Makefile | 77 +------------------------ keyboards/cluecard/rules.mk | 70 +++++++++++++++++++++++ keyboards/cluepad/Makefile | 71 +----------------------- keyboards/cluepad/rules.mk | 65 ++++++++++++++++++++++ keyboards/ergodox/Makefile | 33 +---------- keyboards/ergodox/rules.mk | 28 ++++++++++ keyboards/gh60/Makefile | 77 +------------------------ keyboards/gh60/rules.mk | 68 +++++++++++++++++++++++ keyboards/handwired/Makefile | 2 +- keyboards/handwired/onekey/Makefile | 66 +--------------------- keyboards/handwired/rules.mk | 0 keyboards/hhkb/Makefile | 91 +----------------------------- keyboards/hhkb/rules.mk | 84 ++++++++++++++++++++++++++++ keyboards/infinity_chibios/Makefile | 69 +---------------------- keyboards/infinity_chibios/rules.mk | 66 ++++++++++++++++++++++ keyboards/jd45/Makefile | 72 +----------------------- keyboards/jd45/rules.mk | 67 ++++++++++++++++++++++ keyboards/kc60/Makefile | 77 +------------------------ keyboards/kc60/rules.mk | 70 +++++++++++++++++++++++ keyboards/kinesis/Makefile | 80 +------------------------- keyboards/kinesis/rules.mk | 73 ++++++++++++++++++++++++ keyboards/lets_split/Makefile | 77 +------------------------ keyboards/lets_split/rules.mk | 74 ++++++++++++++++++++++++ keyboards/phantom/Makefile | 75 +------------------------ keyboards/phantom/rules.mk | 69 +++++++++++++++++++++++ keyboards/planck/Makefile | 71 +----------------------- keyboards/planck/rules.mk | 67 ++++++++++++++++++++++ keyboards/preonic/Makefile | 72 +----------------------- keyboards/preonic/rules.mk | 69 +++++++++++++++++++++++ keyboards/retro_refit/Makefile | 75 +------------------------ keyboards/retro_refit/rules.mk | 68 +++++++++++++++++++++++ keyboards/s60-x/Makefile | 76 +------------------------ keyboards/s60-x/rules.mk | 69 +++++++++++++++++++++++ keyboards/satan/Makefile | 71 +----------------------- keyboards/satan/rules.mk | 66 ++++++++++++++++++++++ keyboards/sixkeyboard/Makefile | 76 +------------------------ keyboards/sixkeyboard/rules.mk | 70 +++++++++++++++++++++++ keyboards/tv44/Makefile | 76 +------------------------ keyboards/tv44/rules.mk | 69 +++++++++++++++++++++++ 55 files changed, 1791 insertions(+), 1902 deletions(-) create mode 100644 keyboards/alps64/rules.mk create mode 100644 keyboards/amj60/rules.mk create mode 100644 keyboards/arrow_pad/rules.mk create mode 100644 keyboards/atomic/rules.mk create mode 100644 keyboards/atreus/rules.mk create mode 100644 keyboards/bantam44/rules.mk create mode 100644 keyboards/chibios_test/rules.mk create mode 100644 keyboards/clueboard/rules.mk create mode 100644 keyboards/cluecard/rules.mk create mode 100644 keyboards/cluepad/rules.mk create mode 100644 keyboards/ergodox/rules.mk create mode 100644 keyboards/gh60/rules.mk create mode 100644 keyboards/handwired/rules.mk create mode 100644 keyboards/hhkb/rules.mk create mode 100644 keyboards/infinity_chibios/rules.mk create mode 100644 keyboards/jd45/rules.mk create mode 100644 keyboards/kc60/rules.mk create mode 100644 keyboards/kinesis/rules.mk create mode 100644 keyboards/lets_split/rules.mk create mode 100644 keyboards/phantom/rules.mk create mode 100644 keyboards/planck/rules.mk create mode 100644 keyboards/preonic/rules.mk create mode 100644 keyboards/retro_refit/rules.mk create mode 100644 keyboards/s60-x/rules.mk create mode 100644 keyboards/satan/rules.mk create mode 100644 keyboards/sixkeyboard/rules.mk create mode 100644 keyboards/tv44/rules.mk (limited to 'keyboards') diff --git a/keyboards/alps64/Makefile b/keyboards/alps64/Makefile index d8325e6c8..4e2a6f00f 100644 --- a/keyboards/alps64/Makefile +++ b/keyboards/alps64/Makefile @@ -1,70 +1,3 @@ - - -# Target file name (without extension). - -# project specific files -SRC = led.c - -# MCU name -MCU = atmega32u2 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/alps64/rules.mk b/keyboards/alps64/rules.mk new file mode 100644 index 000000000..c326d3e26 --- /dev/null +++ b/keyboards/alps64/rules.mk @@ -0,0 +1,66 @@ + + +# Target file name (without extension). + +# project specific files +SRC = led.c + +# MCU name +MCU = atmega32u2 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA \ No newline at end of file diff --git a/keyboards/amj60/Makefile b/keyboards/amj60/Makefile index 1f695aa4d..4e2a6f00f 100644 --- a/keyboards/amj60/Makefile +++ b/keyboards/amj60/Makefile @@ -1,70 +1,3 @@ - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/amj60/rules.mk b/keyboards/amj60/rules.mk new file mode 100644 index 000000000..18403ac32 --- /dev/null +++ b/keyboards/amj60/rules.mk @@ -0,0 +1,66 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/arrow_pad/Makefile b/keyboards/arrow_pad/Makefile index 09fcf3e7a..4e2a6f00f 100644 --- a/keyboards/arrow_pad/Makefile +++ b/keyboards/arrow_pad/Makefile @@ -1,74 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= yes # USB Nkey Rollover -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/arrow_pad/rules.mk b/keyboards/arrow_pad/rules.mk new file mode 100644 index 000000000..3dca9b6ea --- /dev/null +++ b/keyboards/arrow_pad/rules.mk @@ -0,0 +1,70 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= yes # USB Nkey Rollover +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/atomic/Makefile b/keyboards/atomic/Makefile index 08e9205cb..4e2a6f00f 100644 --- a/keyboards/atomic/Makefile +++ b/keyboards/atomic/Makefile @@ -1,73 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/atomic/rules.mk b/keyboards/atomic/rules.mk new file mode 100644 index 000000000..d0f3a3a1c --- /dev/null +++ b/keyboards/atomic/rules.mk @@ -0,0 +1,69 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/atreus/Makefile b/keyboards/atreus/Makefile index 5894d231f..4e2a6f00f 100644 --- a/keyboards/atreus/Makefile +++ b/keyboards/atreus/Makefile @@ -1,88 +1,3 @@ - - -ifdef TEENSY2 - OPT_DEFS += -DATREUS_TEENSY2 - ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex -else - OPT_DEFS += -DATREUS_ASTAR - OPT_DEFS += -DCATERINA_BOOTLOADER - ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) -endif - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA -# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -# MIDI_ENABLE ?= YES # MIDI controls -UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - -USB ?= /dev/cu.usbmodem1411 - -upload: build - $(ATREUS_UPLOAD_COMMAND) - +endif \ No newline at end of file diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk new file mode 100644 index 000000000..d71f50bb2 --- /dev/null +++ b/keyboards/atreus/rules.mk @@ -0,0 +1,82 @@ + + +ifdef TEENSY2 + OPT_DEFS += -DATREUS_TEENSY2 + ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +else + OPT_DEFS += -DATREUS_ASTAR + OPT_DEFS += -DCATERINA_BOOTLOADER + ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) +endif + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID + +USB ?= /dev/cu.usbmodem1411 + +upload: build + $(ATRUES_UPLOAD_COMMAND) \ No newline at end of file diff --git a/keyboards/bantam44/Makefile b/keyboards/bantam44/Makefile index 03893dbf8..4e2a6f00f 100644 --- a/keyboards/bantam44/Makefile +++ b/keyboards/bantam44/Makefile @@ -1,72 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -# MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - +endif \ No newline at end of file diff --git a/keyboards/bantam44/rules.mk b/keyboards/bantam44/rules.mk new file mode 100644 index 000000000..baa0e9e7a --- /dev/null +++ b/keyboards/bantam44/rules.mk @@ -0,0 +1,67 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/chibios_test/Makefile b/keyboards/chibios_test/Makefile index d9f2b8b83..4b07a6234 100644 --- a/keyboards/chibios_test/Makefile +++ b/keyboards/chibios_test/Makefile @@ -1,14 +1,5 @@ SUBPROJECT_DEFAULT = stm32_f072_onekey -#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration -MOUSEKEY_ENABLE ?= yes # Mouse keys -EXTRAKEY_ENABLE ?= yes # Audio control and System control -CONSOLE_ENABLE ?= yes # Console for debug -COMMAND_ENABLE ?= yes # Commands for debug and configuration -SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover -CUSTOM_MATRIX ?= yes # Custom matrix file - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/chibios_test/rules.mk b/keyboards/chibios_test/rules.mk new file mode 100644 index 000000000..4b5a84535 --- /dev/null +++ b/keyboards/chibios_test/rules.mk @@ -0,0 +1,8 @@ +#BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug +COMMAND_ENABLE ?= yes # Commands for debug and configuration +SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover +CUSTOM_MATRIX ?= yes # Custom matrix file \ No newline at end of file diff --git a/keyboards/clueboard/Makefile b/keyboards/clueboard/Makefile index e6b13f955..b9bada8f8 100644 --- a/keyboards/clueboard/Makefile +++ b/keyboards/clueboard/Makefile @@ -1,109 +1,5 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make all = Make software. -# -# make clean = Clean out built project files. -# -# make coff = Convert ELF to AVR COFF. -# -# make extcoff = Convert ELF to AVR Extended COFF. -# -# make program = Download the hex file to the device. -# Please customize your programmer settings(PROGRAM_CMD) -# -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -# make dfu = Download the hex file to the device, using dfu-programmer (must -# have dfu-programmer installed). -# -# make flip = Download the hex file to the device, using Atmel FLIP (must -# have Atmel FLIP installed). -# -# make dfu-ee = Download the eeprom file to the device, using dfu-programmer -# (must have dfu-programmer installed). -# -# make flip-ee = Download the eeprom file to the device, using Atmel FLIP -# (must have Atmel FLIP installed). -# -# make debug = Start either simulavr or avarice as specified for debugging, -# with avr-gdb or avr-insight as the front end for debugging. -# -# make filename.s = Just compile filename.c into the assembler code only. -# -# make filename.i = Create a preprocessed source file for use in submitting -# bug reports to the GCC project. -# -# To rebuild project do "make clean" then "make all". -#---------------------------------------------------------------------------- - SUBPROJECT_DEFAULT = rev2 -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change to no to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -AUDIO_ENABLE ?= no -RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/clueboard/rules.mk b/keyboards/clueboard/rules.mk new file mode 100644 index 000000000..3909fbd5c --- /dev/null +++ b/keyboards/clueboard/rules.mk @@ -0,0 +1,103 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +AUDIO_ENABLE ?= no +RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file diff --git a/keyboards/cluecard/Makefile b/keyboards/cluecard/Makefile index 029d0b967..4e2a6f00f 100644 --- a/keyboards/cluecard/Makefile +++ b/keyboards/cluecard/Makefile @@ -1,76 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= yes # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/cluecard/rules.mk b/keyboards/cluecard/rules.mk new file mode 100644 index 000000000..454235877 --- /dev/null +++ b/keyboards/cluecard/rules.mk @@ -0,0 +1,70 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= yes # Audio output on port C6 diff --git a/keyboards/cluepad/Makefile b/keyboards/cluepad/Makefile index a331ff4dc..4e2a6f00f 100644 --- a/keyboards/cluepad/Makefile +++ b/keyboards/cluepad/Makefile @@ -1,70 +1,3 @@ - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -# MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -# EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -# CONSOLE_ENABLE ?= yes # Console for debug(+400) -# COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= yes # Enable numpad's backlight functionality -RGBLIGHT_ENABLE ?= yes -# MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/cluepad/rules.mk b/keyboards/cluepad/rules.mk new file mode 100644 index 000000000..19b16b95a --- /dev/null +++ b/keyboards/cluepad/rules.mk @@ -0,0 +1,65 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +# MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +# EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable numpad's backlight functionality +RGBLIGHT_ENABLE ?= yes +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file diff --git a/keyboards/ergodox/Makefile b/keyboards/ergodox/Makefile index 05fb588d1..716535005 100644 --- a/keyboards/ergodox/Makefile +++ b/keyboards/ergodox/Makefile @@ -1,34 +1,5 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- SUBPROJECT_DEFAULT = ez -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ -SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= yes # Unicode - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/ergodox/rules.mk b/keyboards/ergodox/rules.mk new file mode 100644 index 000000000..ac63d4eff --- /dev/null +++ b/keyboards/ergodox/rules.mk @@ -0,0 +1,28 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make = Make software. +# +# make clean = Clean out built project files. +# +# That's pretty much all you need. To compile, always go make clean, +# followed by make. +# +# For advanced users only: +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +#---------------------------------------------------------------------------- +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ +SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= yes # Unicode diff --git a/keyboards/gh60/Makefile b/keyboards/gh60/Makefile index 39a9cc0ae..4e2a6f00f 100644 --- a/keyboards/gh60/Makefile +++ b/keyboards/gh60/Makefile @@ -1,74 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -# CONSOLE_ENABLE ?= yes # Console for debug(+400) -# COMMAND_ENABLE ?= yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -# MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - - -ifndef QUANTUM_DIR - include ../../Makefile -endif - +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/gh60/rules.mk b/keyboards/gh60/rules.mk new file mode 100644 index 000000000..73f4bd76e --- /dev/null +++ b/keyboards/gh60/rules.mk @@ -0,0 +1,68 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/handwired/Makefile b/keyboards/handwired/Makefile index 57493a47c..4e2a6f00f 100644 --- a/keyboards/handwired/Makefile +++ b/keyboards/handwired/Makefile @@ -1,3 +1,3 @@ -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/onekey/Makefile b/keyboards/handwired/onekey/Makefile index c6d10856a..4e2a6f00f 100644 --- a/keyboards/handwired/onekey/Makefile +++ b/keyboards/handwired/onekey/Makefile @@ -1,65 +1,3 @@ - - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend -#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA - -ifndef QUANTUM_DIR - include ../../../Makefile +ifndef MAKEFILE_INCLUDED + include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/rules.mk b/keyboards/handwired/rules.mk new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/hhkb/Makefile b/keyboards/hhkb/Makefile index 6fe973e1e..4e2a6f00f 100644 --- a/keyboards/hhkb/Makefile +++ b/keyboards/hhkb/Makefile @@ -1,90 +1,3 @@ - - -# project specific files -SRC = matrix.c - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -#OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# as per original hasu settings -OPT_DEFS += -DBOOTLOADER_SIZE=512 - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -# MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - - - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - -ifneq (, $(findstring yes, $(HHKB_JP))) - OPT_DEFS += -DHHKB_JP -endif - -debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION -debug-on: all - -debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT -debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) -debug-off: all +endif \ No newline at end of file diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk new file mode 100644 index 000000000..b43b5e23f --- /dev/null +++ b/keyboards/hhkb/rules.mk @@ -0,0 +1,84 @@ + + +# project specific files +SRC = matrix.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +#OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# as per original hasu settings +OPT_DEFS += -DBOOTLOADER_SIZE=512 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID + +ifneq (, $(findstring yes, $(HHKB_JP))) + OPT_DEFS += -DHHKB_JP +endif + +debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION +debug-on: all + +debug-off: EXTRAFLAGS += -DNO_DEBUG -DNO_PRINT +debug-off: OPT_DEFS := $(filter-out -DCONSOLE_ENABLE,$(OPT_DEFS)) +debug-off: all diff --git a/keyboards/infinity_chibios/Makefile b/keyboards/infinity_chibios/Makefile index 649b43e64..4e2a6f00f 100644 --- a/keyboards/infinity_chibios/Makefile +++ b/keyboards/infinity_chibios/Makefile @@ -1,70 +1,3 @@ -# project specific files -SRC = matrix.c \ - led.c - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -# - For Infinity KB, SERIES = K20x -MCU_FAMILY = KINETIS -MCU_SERIES = K20x - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX128BLDR4 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 and Infinity KB -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = k20x5 - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -# - MCHCK_K20 for Infinity KB -BOARD = MCHCK_K20 - -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration -## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE ?= yes # Mouse keys -EXTRAKEY_ENABLE ?= yes # Audio control and System control -CONSOLE_ENABLE ?= yes # Console for debug -COMMAND_ENABLE ?= yes # Commands for debug and configuration -SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover -CUSTOM_MATRIX ?= yes # Custom matrix file - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/infinity_chibios/rules.mk b/keyboards/infinity_chibios/rules.mk new file mode 100644 index 000000000..56d6470b5 --- /dev/null +++ b/keyboards/infinity_chibios/rules.mk @@ -0,0 +1,66 @@ +# project specific files +SRC = matrix.c \ + led.c + +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +# - For Infinity KB, SERIES = K20x +MCU_FAMILY = KINETIS +MCU_SERIES = K20x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX128BLDR4 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 and Infinity KB +# - k20x7 for Teensy 3.1 and 3.2 +MCU_STARTUP = k20x5 + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +# - MCHCK_K20 for Infinity KB +BOARD = MCHCK_K20 + +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 7 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug +COMMAND_ENABLE ?= yes # Commands for debug and configuration +SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover +CUSTOM_MATRIX ?= yes # Custom matrix file \ No newline at end of file diff --git a/keyboards/jd45/Makefile b/keyboards/jd45/Makefile index 75d544f16..4e2a6f00f 100644 --- a/keyboards/jd45/Makefile +++ b/keyboards/jd45/Makefile @@ -1,71 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/jd45/rules.mk b/keyboards/jd45/rules.mk new file mode 100644 index 000000000..2f1e266a1 --- /dev/null +++ b/keyboards/jd45/rules.mk @@ -0,0 +1,67 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +# NKRO_ENABLE ?= yes # USB Nkey Rollover - not yet supported in LUFA +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID \ No newline at end of file diff --git a/keyboards/kc60/Makefile b/keyboards/kc60/Makefile index b00a488b9..4e2a6f00f 100644 --- a/keyboards/kc60/Makefile +++ b/keyboards/kc60/Makefile @@ -1,76 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - +endif \ No newline at end of file diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk new file mode 100644 index 000000000..4efd6f988 --- /dev/null +++ b/keyboards/kc60/rules.mk @@ -0,0 +1,70 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 diff --git a/keyboards/kinesis/Makefile b/keyboards/kinesis/Makefile index ca077e636..4e2a6f00f 100644 --- a/keyboards/kinesis/Makefile +++ b/keyboards/kinesis/Makefile @@ -1,79 +1,3 @@ - -## Project specific files - -SRC= matrix.c - -# MCU name -MCU = at90usb1286 -#MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=1024 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE = no # Audio output should be port E6, current quantum library hardcodes C6, which we use for programming -CUSTOM_MATRIX=yes # need to do our own thing with the matrix - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/kinesis/rules.mk b/keyboards/kinesis/rules.mk new file mode 100644 index 000000000..a4a2b7d15 --- /dev/null +++ b/keyboards/kinesis/rules.mk @@ -0,0 +1,73 @@ + +## Project specific files + +SRC= matrix.c + +# MCU name +MCU = at90usb1286 +#MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=1024 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE = no # Audio output should be port E6, current quantum library hardcodes C6, which we use for programming +CUSTOM_MATRIX=yes # need to do our own thing with the matrix diff --git a/keyboards/lets_split/Makefile b/keyboards/lets_split/Makefile index b9f07636b..4e2a6f00f 100644 --- a/keyboards/lets_split/Makefile +++ b/keyboards/lets_split/Makefile @@ -1,78 +1,3 @@ -SRC += matrix.c \ - i2c.c \ - split_util.c \ - serial.c - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= yes # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -CUSTOM_MATRIX = yes - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk new file mode 100644 index 000000000..6961fbd55 --- /dev/null +++ b/keyboards/lets_split/rules.mk @@ -0,0 +1,74 @@ +SRC += matrix.c \ + i2c.c \ + split_util.c \ + serial.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= yes # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend + +CUSTOM_MATRIX = yes \ No newline at end of file diff --git a/keyboards/phantom/Makefile b/keyboards/phantom/Makefile index 3a71fd0ee..4e2a6f00f 100644 --- a/keyboards/phantom/Makefile +++ b/keyboards/phantom/Makefile @@ -1,74 +1,3 @@ - - -SRC = led.c - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE ?=yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID - - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/phantom/rules.mk b/keyboards/phantom/rules.mk new file mode 100644 index 000000000..c6b8ca6c3 --- /dev/null +++ b/keyboards/phantom/rules.mk @@ -0,0 +1,69 @@ + + +SRC = led.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?=yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/planck/Makefile b/keyboards/planck/Makefile index 23944f92e..7d49c5ef9 100644 --- a/keyboards/planck/Makefile +++ b/keyboards/planck/Makefile @@ -1,74 +1,5 @@ - SUBPROJECT_DEFAULT = rev4 -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/planck/rules.mk b/keyboards/planck/rules.mk new file mode 100644 index 000000000..25db53a31 --- /dev/null +++ b/keyboards/planck/rules.mk @@ -0,0 +1,67 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/preonic/Makefile b/keyboards/preonic/Makefile index 08e9205cb..4e2a6f00f 100644 --- a/keyboards/preonic/Makefile +++ b/keyboards/preonic/Makefile @@ -1,73 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif \ No newline at end of file diff --git a/keyboards/preonic/rules.mk b/keyboards/preonic/rules.mk new file mode 100644 index 000000000..d0f3a3a1c --- /dev/null +++ b/keyboards/preonic/rules.mk @@ -0,0 +1,69 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/retro_refit/Makefile b/keyboards/retro_refit/Makefile index 2dd8cc5f7..4e2a6f00f 100644 --- a/keyboards/retro_refit/Makefile +++ b/keyboards/retro_refit/Makefile @@ -1,74 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -# MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - +endif \ No newline at end of file diff --git a/keyboards/retro_refit/rules.mk b/keyboards/retro_refit/rules.mk new file mode 100644 index 000000000..10fbfa5c9 --- /dev/null +++ b/keyboards/retro_refit/rules.mk @@ -0,0 +1,68 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/s60-x/Makefile b/keyboards/s60-x/Makefile index 8b51d4609..4e2a6f00f 100644 --- a/keyboards/s60-x/Makefile +++ b/keyboards/s60-x/Makefile @@ -1,75 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/s60-x/rules.mk b/keyboards/s60-x/rules.mk new file mode 100644 index 000000000..7ec93933a --- /dev/null +++ b/keyboards/s60-x/rules.mk @@ -0,0 +1,69 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 \ No newline at end of file diff --git a/keyboards/satan/Makefile b/keyboards/satan/Makefile index a0879fc9c..4e2a6f00f 100644 --- a/keyboards/satan/Makefile +++ b/keyboards/satan/Makefile @@ -1,70 +1,3 @@ - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) -BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/satan/rules.mk b/keyboards/satan/rules.mk new file mode 100644 index 000000000..1102584d8 --- /dev/null +++ b/keyboards/satan/rules.mk @@ -0,0 +1,66 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/sixkeyboard/Makefile b/keyboards/sixkeyboard/Makefile index 6f273064a..4e2a6f00f 100644 --- a/keyboards/sixkeyboard/Makefile +++ b/keyboards/sixkeyboard/Makefile @@ -1,75 +1,3 @@ - - -SRC = matrix.c - -# MCU name -#MCU = at90usb1287 -MCU = atmega16u2 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= no # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -CUSTOM_MATRIX = yes - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - +endif \ No newline at end of file diff --git a/keyboards/sixkeyboard/rules.mk b/keyboards/sixkeyboard/rules.mk new file mode 100644 index 000000000..2c99985a9 --- /dev/null +++ b/keyboards/sixkeyboard/rules.mk @@ -0,0 +1,70 @@ + + +SRC = matrix.c + +# MCU name +#MCU = at90usb1287 +MCU = atmega16u2 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= no # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= no # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +CUSTOM_MATRIX = yes \ No newline at end of file diff --git a/keyboards/tv44/Makefile b/keyboards/tv44/Makefile index 45ca12780..4e2a6f00f 100644 --- a/keyboards/tv44/Makefile +++ b/keyboards/tv44/Makefile @@ -1,75 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= yes # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/tv44/rules.mk b/keyboards/tv44/rules.mk new file mode 100644 index 000000000..dbba6bace --- /dev/null +++ b/keyboards/tv44/rules.mk @@ -0,0 +1,69 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= yes # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 -- cgit v1.2.3 From 051017c3129a17a1f4c610f19067c60bf0a49da9 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 7 Aug 2016 18:38:03 +0300 Subject: Split subproject make files into Makefile and rules.mk --- keyboards/chibios_test/stm32_f072_onekey/Makefile | 42 +---------- keyboards/chibios_test/stm32_f072_onekey/rules.mk | 41 +++++++++++ keyboards/chibios_test/stm32_f103_onekey/Makefile | 53 +------------ keyboards/chibios_test/stm32_f103_onekey/rules.mk | 52 +++++++++++++ keyboards/chibios_test/teensy_lc_onekey/Makefile | 48 +----------- keyboards/chibios_test/teensy_lc_onekey/rules.mk | 49 ++++++++++++ keyboards/clueboard/rev1/Makefile | 6 +- keyboards/clueboard/rev1/rules.mk | 5 ++ keyboards/clueboard/rev2/Makefile | 6 +- keyboards/clueboard/rev2/rules.mk | 5 ++ keyboards/ergodox/ez/Makefile | 77 +------------------ keyboards/ergodox/ez/rules.mk | 76 +++++++++++++++++++ keyboards/ergodox/infinity/Makefile | 78 +------------------- keyboards/ergodox/infinity/rules.mk | 77 +++++++++++++++++++ keyboards/handwired/CMD60/Makefile | 74 +------------------ keyboards/handwired/CMD60/rules.mk | 73 ++++++++++++++++++ keyboards/handwired/fivethirteen/Makefile | 74 +------------------ keyboards/handwired/fivethirteen/rules.mk | 73 ++++++++++++++++++ keyboards/handwired/minorca/Makefile | 70 +----------------- keyboards/handwired/minorca/rules.mk | 67 +++++++++++++++++ keyboards/handwired/onekey/Makefile | 2 +- keyboards/handwired/onekey/rules.mk | 65 ++++++++++++++++ keyboards/handwired/traveller/Makefile | 90 +---------------------- keyboards/handwired/traveller/rules.mk | 89 ++++++++++++++++++++++ keyboards/planck/rev3/Makefile | 4 +- keyboards/planck/rev3/rules.mk | 5 ++ keyboards/planck/rev4/Makefile | 4 +- keyboards/planck/rev4/rules.mk | 5 ++ 28 files changed, 705 insertions(+), 605 deletions(-) create mode 100644 keyboards/chibios_test/stm32_f072_onekey/rules.mk create mode 100644 keyboards/chibios_test/stm32_f103_onekey/rules.mk create mode 100644 keyboards/chibios_test/teensy_lc_onekey/rules.mk create mode 100644 keyboards/clueboard/rev1/rules.mk create mode 100644 keyboards/clueboard/rev2/rules.mk create mode 100644 keyboards/ergodox/ez/rules.mk create mode 100644 keyboards/ergodox/infinity/rules.mk create mode 100644 keyboards/handwired/CMD60/rules.mk create mode 100644 keyboards/handwired/fivethirteen/rules.mk create mode 100644 keyboards/handwired/minorca/rules.mk create mode 100644 keyboards/handwired/onekey/rules.mk create mode 100644 keyboards/handwired/traveller/rules.mk create mode 100644 keyboards/planck/rev3/rules.mk create mode 100644 keyboards/planck/rev4/rules.mk (limited to 'keyboards') diff --git a/keyboards/chibios_test/stm32_f072_onekey/Makefile b/keyboards/chibios_test/stm32_f072_onekey/Makefile index eae38c4b2..191c6bb66 100644 --- a/keyboards/chibios_test/stm32_f072_onekey/Makefile +++ b/keyboards/chibios_test/stm32_f072_onekey/Makefile @@ -1,41 +1,3 @@ -# project specific files -SRC = matrix.c \ - led.c - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F0xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -MCU_LDSCRIPT = STM32F072xB -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f0xx -# it should exist either in /os/hal/boards/ -# or /boards -BOARD = ST_STM32F072B_DISCOVERY -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m0 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 6 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf -# This also requires a patch to chibios: -# /tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 - -# Build Options -# comment out to disable the options. -# -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f072_onekey/rules.mk b/keyboards/chibios_test/stm32_f072_onekey/rules.mk new file mode 100644 index 000000000..eae38c4b2 --- /dev/null +++ b/keyboards/chibios_test/stm32_f072_onekey/rules.mk @@ -0,0 +1,41 @@ +# project specific files +SRC = matrix.c \ + led.c + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F0xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +MCU_LDSCRIPT = STM32F072xB +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f0xx +# it should exist either in /os/hal/boards/ +# or /boards +BOARD = ST_STM32F072B_DISCOVERY +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m0 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 6 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + +# Build Options +# comment out to disable the options. +# +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/chibios_test/stm32_f103_onekey/Makefile b/keyboards/chibios_test/stm32_f103_onekey/Makefile index 307ca5b19..191c6bb66 100644 --- a/keyboards/chibios_test/stm32_f103_onekey/Makefile +++ b/keyboards/chibios_test/stm32_f103_onekey/Makefile @@ -1,52 +1,3 @@ -# project specific files -SRC = matrix.c \ - led.c - -# GENERIC STM32F103C8T6 board - stm32duino bootloader -OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 -MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader -BOARD = GENERIC_STM32_F103 - -# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD) -# OPT_DEFS = -# MCU_LDSCRIPT = STM32F103x8 -# BOARD = GENERIC_STM32_F103 - -# MAPLE MINI -# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000 -# MCU_LDSCRIPT = STM32F103xB_maplemini_bootloader -# BOARD = MAPLEMINI_STM32_F103 - -## chip/board settings -# the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -MCU_FAMILY = STM32 -MCU_SERIES = STM32F1xx -# linker script to use -# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# startup code to use -# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -MCU_STARTUP = stm32f1xx -# it should exist either in /os/hal/boards/ -# or /boards -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m3 -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -ARMV = 7 -# If you want to be able to jump to bootloader from firmware on STM32 MCUs, -# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in -# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have -# a custom board definition that you plan to reuse). -# If you're not setting it here, leave it commented out. -# It is chip dependent, the correct number can be looked up here (page 175): -# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf -# This also requires a patch to chibios: -# /tmk_core/tool/chibios/ch-bootloader-jump.patch -#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 - - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/chibios_test/stm32_f103_onekey/rules.mk b/keyboards/chibios_test/stm32_f103_onekey/rules.mk new file mode 100644 index 000000000..307ca5b19 --- /dev/null +++ b/keyboards/chibios_test/stm32_f103_onekey/rules.mk @@ -0,0 +1,52 @@ +# project specific files +SRC = matrix.c \ + led.c + +# GENERIC STM32F103C8T6 board - stm32duino bootloader +OPT_DEFS = -DCORTEX_VTOR_INIT=0x2000 +MCU_LDSCRIPT = STM32F103x8_stm32duino_bootloader +BOARD = GENERIC_STM32_F103 + +# GENERIC STM32F103C8T6 board - no bootloader (programmer over serial or SWD) +# OPT_DEFS = +# MCU_LDSCRIPT = STM32F103x8 +# BOARD = GENERIC_STM32_F103 + +# MAPLE MINI +# OPT_DEFS = -DCORTEX_VTOR_INIT=0x5000 +# MCU_LDSCRIPT = STM32F103xB_maplemini_bootloader +# BOARD = MAPLEMINI_STM32_F103 + +## chip/board settings +# the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +MCU_FAMILY = STM32 +MCU_SERIES = STM32F1xx +# linker script to use +# it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# startup code to use +# is should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +MCU_STARTUP = stm32f1xx +# it should exist either in /os/hal/boards/ +# or /boards +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m3 +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +ARMV = 7 +# If you want to be able to jump to bootloader from firmware on STM32 MCUs, +# set the correct BOOTLOADER_ADDRESS. Either set it here, or define it in +# ./bootloader_defs.h or in ./boards//bootloader_defs.h (if you have +# a custom board definition that you plan to reuse). +# If you're not setting it here, leave it commented out. +# It is chip dependent, the correct number can be looked up here (page 175): +# http://www.st.com/web/en/resource/technical/document/application_note/CD00167594.pdf +# This also requires a patch to chibios: +# /tmk_core/tool/chibios/ch-bootloader-jump.patch +#STM32_BOOTLOADER_ADDRESS = 0x1FFFC800 + + +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/chibios_test/teensy_lc_onekey/Makefile b/keyboards/chibios_test/teensy_lc_onekey/Makefile index 43ea9d82d..191c6bb66 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/Makefile +++ b/keyboards/chibios_test/teensy_lc_onekey/Makefile @@ -1,49 +1,3 @@ -# project specific files -SRC = matrix.c \ - led.c - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -MCU_FAMILY = KINETIS -MCU_SERIES = KL2x - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -MCU_LDSCRIPT = MKL26Z64 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = kl2x - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -BOARD = PJRC_TEENSY_LC - -# Cortex version -# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4 -MCU = cortex-m0plus - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile endif \ No newline at end of file diff --git a/keyboards/chibios_test/teensy_lc_onekey/rules.mk b/keyboards/chibios_test/teensy_lc_onekey/rules.mk new file mode 100644 index 000000000..43ea9d82d --- /dev/null +++ b/keyboards/chibios_test/teensy_lc_onekey/rules.mk @@ -0,0 +1,49 @@ +# project specific files +SRC = matrix.c \ + led.c + +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +MCU_FAMILY = KINETIS +MCU_SERIES = KL2x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +MCU_LDSCRIPT = MKL26Z64 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 +# - k20x7 for Teensy 3.1 and 3.2 +MCU_STARTUP = kl2x + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +BOARD = PJRC_TEENSY_LC + +# Cortex version +# Teensy LC is cortex-m0plus; Teensy 3.x are cortex-m4 +MCU = cortex-m0plus + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/clueboard/rev1/Makefile b/keyboards/clueboard/rev1/Makefile index 80a942d06..191c6bb66 100644 --- a/keyboards/clueboard/rev1/Makefile +++ b/keyboards/clueboard/rev1/Makefile @@ -1,5 +1,3 @@ -BACKLIGHT_ENABLE = no - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/clueboard/rev1/rules.mk b/keyboards/clueboard/rev1/rules.mk new file mode 100644 index 000000000..80a942d06 --- /dev/null +++ b/keyboards/clueboard/rev1/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = no + +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/clueboard/rev2/Makefile b/keyboards/clueboard/rev2/Makefile index cea967b79..191c6bb66 100644 --- a/keyboards/clueboard/rev2/Makefile +++ b/keyboards/clueboard/rev2/Makefile @@ -1,5 +1,3 @@ -BACKLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/clueboard/rev2/rules.mk b/keyboards/clueboard/rev2/rules.mk new file mode 100644 index 000000000..cea967b79 --- /dev/null +++ b/keyboards/clueboard/rev2/rules.mk @@ -0,0 +1,5 @@ +BACKLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/ergodox/ez/Makefile b/keyboards/ergodox/ez/Makefile index 37e554b30..191c6bb66 100644 --- a/keyboards/ergodox/ez/Makefile +++ b/keyboards/ergodox/ez/Makefile @@ -1,76 +1,3 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- - -# # project specific files -SRC = twimaster.c \ - matrix.c - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# comment out to disable the options. -# - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif +endif \ No newline at end of file diff --git a/keyboards/ergodox/ez/rules.mk b/keyboards/ergodox/ez/rules.mk new file mode 100644 index 000000000..37e554b30 --- /dev/null +++ b/keyboards/ergodox/ez/rules.mk @@ -0,0 +1,76 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make = Make software. +# +# make clean = Clean out built project files. +# +# That's pretty much all you need. To compile, always go make clean, +# followed by make. +# +# For advanced users only: +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +#---------------------------------------------------------------------------- + +# # project specific files +SRC = twimaster.c \ + matrix.c + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# comment out to disable the options. +# + +ifndef QUANTUM_DIR + include ../../../Makefile +endif diff --git a/keyboards/ergodox/infinity/Makefile b/keyboards/ergodox/infinity/Makefile index ccb735a48..191c6bb66 100644 --- a/keyboards/ergodox/infinity/Makefile +++ b/keyboards/ergodox/infinity/Makefile @@ -1,77 +1,3 @@ -# project specific files -SRC = matrix.c \ - led.c - -## chip/board settings -# - the next two should match the directories in -# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -# - For Infinity KB, SERIES = K20x -MCU_FAMILY = KINETIS -MCU_SERIES = K20x - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -# - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader -# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX256BLDR8 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 and Infinity 60% -# - k20x7 for Teensy 3.1, 3.2 and Infinity ErgoDox -MCU_STARTUP = k20x7 - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -# - MCHCK_K20 for Infinity KB -#BOARD = MCHCK_K20 -BOARD = PJRC_TEENSY_3_1 - -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000 - -# Build Options -# comment out to disable the options. -# -CUSTOM_MATRIX ?= yes # Custom matrix file -SERIAL_LINK_ENABLE = yes -VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile -LCD_ENABLE ?= yes -LED_ENABLE ?= yes -LCD_BACKLIGHT_ENABLE ?= yes - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif - -ifdef LCD_ENABLE -include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk -endif - -ifdef LED_ENABLE -include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk -endif +endif \ No newline at end of file diff --git a/keyboards/ergodox/infinity/rules.mk b/keyboards/ergodox/infinity/rules.mk new file mode 100644 index 000000000..ccb735a48 --- /dev/null +++ b/keyboards/ergodox/infinity/rules.mk @@ -0,0 +1,77 @@ +# project specific files +SRC = matrix.c \ + led.c + +## chip/board settings +# - the next two should match the directories in +# /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +# - For Infinity KB, SERIES = K20x +MCU_FAMILY = KINETIS +MCU_SERIES = K20x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +# - MK20DX128BLDR4 for Infinity 60% with Kiibohd bootloader +# - MK20DX256BLDR8 for Infinity ErgoDox with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX256BLDR8 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 and Infinity 60% +# - k20x7 for Teensy 3.1, 3.2 and Infinity ErgoDox +MCU_STARTUP = k20x7 + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +# - MCHCK_K20 for Infinity KB +#BOARD = MCHCK_K20 +BOARD = PJRC_TEENSY_3_1 + +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 7 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +OPT_DEFS += -DCORTEX_VTOR_INIT=0x00002000 + +# Build Options +# comment out to disable the options. +# +CUSTOM_MATRIX ?= yes # Custom matrix file +SERIAL_LINK_ENABLE = yes +VISUALIZER_ENABLE ?= no #temporarily disabled to make everything compile +LCD_ENABLE ?= yes +LED_ENABLE ?= yes +LCD_BACKLIGHT_ENABLE ?= yes + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +ifdef LCD_ENABLE +include $(SUBPROJECT_PATH)/drivers/gdisp/st7565ergodox/driver.mk +endif + +ifdef LED_ENABLE +include $(SUBPROJECT_PATH)/drivers/gdisp/IS31FL3731C/driver.mk +endif diff --git a/keyboards/handwired/CMD60/Makefile b/keyboards/handwired/CMD60/Makefile index 711759917..191c6bb66 100644 --- a/keyboards/handwired/CMD60/Makefile +++ b/keyboards/handwired/CMD60/Makefile @@ -1,73 +1,3 @@ - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/handwired/CMD60/rules.mk b/keyboards/handwired/CMD60/rules.mk new file mode 100644 index 000000000..711759917 --- /dev/null +++ b/keyboards/handwired/CMD60/rules.mk @@ -0,0 +1,73 @@ + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + + diff --git a/keyboards/handwired/fivethirteen/Makefile b/keyboards/handwired/fivethirteen/Makefile index 711759917..191c6bb66 100644 --- a/keyboards/handwired/fivethirteen/Makefile +++ b/keyboards/handwired/fivethirteen/Makefile @@ -1,73 +1,3 @@ - -# MCU name -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/handwired/fivethirteen/rules.mk b/keyboards/handwired/fivethirteen/rules.mk new file mode 100644 index 000000000..711759917 --- /dev/null +++ b/keyboards/handwired/fivethirteen/rules.mk @@ -0,0 +1,73 @@ + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + + diff --git a/keyboards/handwired/minorca/Makefile b/keyboards/handwired/minorca/Makefile index 155c1f9a2..191c6bb66 100644 --- a/keyboards/handwired/minorca/Makefile +++ b/keyboards/handwired/minorca/Makefile @@ -1,71 +1,3 @@ -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=512 - -# Build Options -# change to "no" to disable the options, or define them in the Makefile in -# the appropriate keymap folder that will get included automatically -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality -MIDI_ENABLE ?= no # MIDI controls -AUDIO_ENABLE ?= no # Audio output on port C6 -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. - -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/minorca/rules.mk b/keyboards/handwired/minorca/rules.mk new file mode 100644 index 000000000..c51371a78 --- /dev/null +++ b/keyboards/handwired/minorca/rules.mk @@ -0,0 +1,67 @@ +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=512 + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no # Audio output on port C6 +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend \ No newline at end of file diff --git a/keyboards/handwired/onekey/Makefile b/keyboards/handwired/onekey/Makefile index 4e2a6f00f..191c6bb66 100644 --- a/keyboards/handwired/onekey/Makefile +++ b/keyboards/handwired/onekey/Makefile @@ -1,3 +1,3 @@ ifndef MAKEFILE_INCLUDED - include ../../Makefile + include ../../../Makefile endif \ No newline at end of file diff --git a/keyboards/handwired/onekey/rules.mk b/keyboards/handwired/onekey/rules.mk new file mode 100644 index 000000000..c6d10856a --- /dev/null +++ b/keyboards/handwired/onekey/rules.mk @@ -0,0 +1,65 @@ + + +# MCU name +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +#SLEEP_LED_ENABLE = yes # Breathing sleep LED during USB suspend +#NKRO_ENABLE = yes # USB Nkey Rollover - not yet supported in LUFA + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/traveller/Makefile b/keyboards/handwired/traveller/Makefile index 12a4b71f4..191c6bb66 100644 --- a/keyboards/handwired/traveller/Makefile +++ b/keyboards/handwired/traveller/Makefile @@ -1,89 +1,3 @@ - -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - -# for avr upload -USB ?= /dev/cu.usbmodem1421 -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - - -ifdef TEENSY2 - OPT_DEFS += -DATREUS_TEENSY2 - ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex -else - OPT_DEFS += -DATREUS_ASTAR - OPT_DEFS += -DCATERINA_BOOTLOADER - ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ - avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) -endif -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# MCU name - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= no # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 -RGBLIGHT_ENABLE = yes - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile -endif - -upload: build - $(ATREUS_UPLOAD_COMMAND) - +endif \ No newline at end of file diff --git a/keyboards/handwired/traveller/rules.mk b/keyboards/handwired/traveller/rules.mk new file mode 100644 index 000000000..12a4b71f4 --- /dev/null +++ b/keyboards/handwired/traveller/rules.mk @@ -0,0 +1,89 @@ + +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + +# for avr upload +USB ?= /dev/cu.usbmodem1421 +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + + +ifdef TEENSY2 + OPT_DEFS += -DATREUS_TEENSY2 + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex +else + OPT_DEFS += -DATREUS_ASTAR + OPT_DEFS += -DCATERINA_BOOTLOADER + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) +endif +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# MCU name + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= no # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 +RGBLIGHT_ENABLE = yes + +ifndef QUANTUM_DIR + include ../../../Makefile +endif + +upload: build + $(ATREUS_UPLOAD_COMMAND) + diff --git a/keyboards/planck/rev3/Makefile b/keyboards/planck/rev3/Makefile index 3ed1445e4..191c6bb66 100644 --- a/keyboards/planck/rev3/Makefile +++ b/keyboards/planck/rev3/Makefile @@ -1,5 +1,3 @@ -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile endif \ No newline at end of file diff --git a/keyboards/planck/rev3/rules.mk b/keyboards/planck/rev3/rules.mk new file mode 100644 index 000000000..3ed1445e4 --- /dev/null +++ b/keyboards/planck/rev3/rules.mk @@ -0,0 +1,5 @@ +AUDIO_ENABLE ?= no # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/rev4/Makefile b/keyboards/planck/rev4/Makefile index ed09f85a4..191c6bb66 100644 --- a/keyboards/planck/rev4/Makefile +++ b/keyboards/planck/rev4/Makefile @@ -1,5 +1,3 @@ -AUDIO_ENABLE ?= yes # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../../Makefile endif \ No newline at end of file diff --git a/keyboards/planck/rev4/rules.mk b/keyboards/planck/rev4/rules.mk new file mode 100644 index 000000000..ed09f85a4 --- /dev/null +++ b/keyboards/planck/rev4/rules.mk @@ -0,0 +1,5 @@ +AUDIO_ENABLE ?= yes # Audio output on port C6 + +ifndef QUANTUM_DIR + include ../../../Makefile +endif \ No newline at end of file -- cgit v1.2.3 From da226e61261e0c11e678d2086c00b2a45726083e Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 20 Aug 2016 03:22:16 +0300 Subject: Update keyboard readme files with new makefile instructions --- keyboards/arrow_pad/readme.md | 8 +++++--- keyboards/atomic/readme.md | 7 ++++--- keyboards/atreus/readme.md | 7 ++++--- keyboards/bantam44/readme.md | 7 ++++--- keyboards/clueboard/readme.md | 26 +++++++++++++------------- keyboards/cluecard/readme.md | 6 +++--- keyboards/ergodox/readme.md | 6 +++--- keyboards/gh60/readme.md | 8 +++++--- keyboards/hhkb/readme.md | 8 +++++--- keyboards/kc60/readme.md | 10 ++++++---- keyboards/kinesis/readme.md | 6 +++--- keyboards/planck/readme.md | 8 +++++--- keyboards/preonic/readme.md | 8 +++++--- keyboards/retro_refit/readme.md | 8 +++++--- keyboards/s60-x/readme.md | 4 ++-- keyboards/tv44/readme.md | 6 +++--- 16 files changed, 75 insertions(+), 58 deletions(-) (limited to 'keyboards') diff --git a/keyboards/arrow_pad/readme.md b/keyboards/arrow_pad/readme.md index 5aa44cce5..2e9a64f2e 100644 --- a/keyboards/arrow_pad/readme.md +++ b/keyboards/arrow_pad/readme.md @@ -12,13 +12,15 @@ Download or clone the whole firmware and navigate to the keyboards/arrow_pad fol Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` + Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/atomic/readme.md b/keyboards/atomic/readme.md index ab1e7ba1f..674dcf113 100644 --- a/keyboards/atomic/readme.md +++ b/keyboards/atomic/readme.md @@ -13,13 +13,14 @@ Download or clone the whole firmware and navigate to the keyboards/atomic folder Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/atreus/readme.md b/keyboards/atreus/readme.md index 734f58f0f..a4077668e 100644 --- a/keyboards/atreus/readme.md +++ b/keyboards/atreus/readme.md @@ -174,13 +174,14 @@ Download or clone the whole firmware and navigate to the keyboards/planck folder Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/bantam44/readme.md b/keyboards/bantam44/readme.md index 89d7f9d05..462f67c12 100644 --- a/keyboards/bantam44/readme.md +++ b/keyboards/bantam44/readme.md @@ -12,13 +12,14 @@ Download or clone the whole firmware and navigate to the keyboards/Bantam44 fold Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/clueboard/readme.md b/keyboards/clueboard/readme.md index 6c29c09ec..4a76e2908 100644 --- a/keyboards/clueboard/readme.md +++ b/keyboards/clueboard/readme.md @@ -31,36 +31,36 @@ If you would like to use one of the alternative keymaps, or create your own, see ## Clueboard 1.0 -If you have a first generation Clueboard (one with a black PCB) you will need to use the revision 1 code. To do so add `SUBPROJECT=rev1` to your make command, like this: +If you have a first generation Clueboard (one with a black PCB) you will need to use the revision 1 code. To do so add `rev1` to your make command, like this: ``` -$ make SUBPROJECT=rev1 +$ make rev1 ``` And when flashing your keyboard: ``` -$ make SUBPROJECT=rev1 dfu +$ make rev1-dfu ``` -If you are flashing an alternative layout to your rev1, include both `SUBPROJECT=rev1` and `KEYMAP=` in your command, for example when flashing max: +If you are flashing an alternative layout to your rev1, include both `rev1` and `` in your command, for example when flashing max: ``` -$ make SUBPROJECT=rev1 KEYMAP=max dfu +$ make rev1-max-dfu ``` ## Alternate Keymaps -There are many alternative and user-contributed layouts available in the [keymaps/](keymaps/) directory. To compile and flash an alternative you will want to add `KEYMAP=` to your command: +There are many alternative and user-contributed layouts available in the [keymaps/](keymaps/) directory. To compile and flash an alternative you will want to add `` to your command: ``` -$ make KEYMAP=skully +$ make skully ``` -And when flashing your keyboard, put `KEYMAP=` between "make" and "dfu": +And when flashing your keyboard, put `` between "make" and "dfu": ``` -$ make KEYMAP=skully dfu +$ make skully-dfu ``` ### Notable Layouts @@ -76,15 +76,15 @@ These layouts are notable for one reason or another. If you are looking for idea There are a lot of possibilities when creating your own keymap, and the primary documentation for doing that is [Customizing Your Keymap](/readme.md##customizing-your-keymap) in the main readme.md. As a way to get started, here is the procedure I recommend: * Copy `[keymaps/default](keymaps/default/)` to `keymaps/`. -* Compile the firmware (`$ make KEYMAP=`) -* Flash the firmware (`$ make KEYMAP= dfu`) +* Compile the firmware (`$ make `) +* Flash the firmware (`$ make -dfu`) * Make sure everything works like the default keyboard * Modify `keymaps//readme.md` to tell others about your layout. * Modify `keymaps//keymap.c` to reflect your desired layout. -* Compile your new custom firmware (`$ make KEYMAP=`) +* Compile your new custom firmware (`$ make `) ** If you have warnings you may flash without fixing them, but something may not work right. ** If you have any errors you must fix them before continuing. -* Flash the firmware (`$ make KEYMAP= dfu`) +* Flash the firmware (`$ make -dfu`) ## Share Your Keymap diff --git a/keyboards/cluecard/readme.md b/keyboards/cluecard/readme.md index ae1afbbfd..be13fc017 100644 --- a/keyboards/cluecard/readme.md +++ b/keyboards/cluecard/readme.md @@ -13,16 +13,16 @@ Depending on which keymap you would like to use, you will have to compile slight ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: ``` -$ make keymap=[default|jack|] +$ make [default|jack|] ``` Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index f81d7cd8d..a96e415de 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -19,10 +19,10 @@ If you are just compiling an existing keymap and don't want to create your own, 3. Set up a build environment as per the readme. 4. Copy `keyboards/ergodox/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`) 5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work. -6. Compile your firmware by running `make keymap=keymap_name`. For example, `make keymap=german`. This will result in a hex file, which will be called `ergodox_ez_keymap_name.hex`, e.g. `ergodox_ez_german.hex`. For **Infinity ErgoDox** you need to add `subproject=infinity` to the make command. -7. **ErgoDox EZ** - Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successful build by running `make teensy keymap=keymap_name`. +6. Compile your firmware by running `make keymap_name`. For example, `make german`. This will result in a hex file, which will be called `ergodox_ez_keymap_name.hex`, e.g. `ergodox_ez_german.hex`. For **Infinity ErgoDox** you need to add `infinity` to the make command like this `make infinity-german`. +7. **ErgoDox EZ** - Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successful build by running `make keymap_name-teensy`. - **Infinity ErgoDox** - Flash the firmware by running `make dfu-util keymap=keymap_name subproject=infinity` + **Infinity ErgoDox** - Flash the firmware by running `make infinity-keymap_name-dfu-util` 8. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics. Good luck! :) diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md index 92302d507..20afb0db0 100644 --- a/keyboards/gh60/readme.md +++ b/keyboards/gh60/readme.md @@ -48,13 +48,15 @@ Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c fo Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` + Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/hhkb/readme.md b/keyboards/hhkb/readme.md index 39d49b32a..367c0a08f 100644 --- a/keyboards/hhkb/readme.md +++ b/keyboards/hhkb/readme.md @@ -168,13 +168,15 @@ Download or clone the whole firmware and navigate to the keyboards/planck folder Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a file in the keymaps folder named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` + Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/kc60/readme.md b/keyboards/kc60/readme.md index acc0df68d..0639512dd 100644 --- a/keyboards/kc60/readme.md +++ b/keyboards/kc60/readme.md @@ -10,18 +10,20 @@ Download or clone the whole firmware and navigate to the keyboards/kc60 folder. Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` + Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. ## WS2812 Support ![Image of KC60 with RGB Underglow](keymaps/ws2812/ws2812_example.jpg) -Build with WS2812 Support by running `make KEYMAP=ws2812`. +Build with WS2812 Support by running `make ws2812`. diff --git a/keyboards/kinesis/readme.md b/keyboards/kinesis/readme.md index a990f9cb9..79c86581e 100644 --- a/keyboards/kinesis/readme.md +++ b/keyboards/kinesis/readme.md @@ -27,16 +27,16 @@ Depending on which keymap you would like to use, you will have to compile slight ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: ``` -$ make keymap=[default|jack|] +$ make [default|jack|] ``` Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` diff --git a/keyboards/planck/readme.md b/keyboards/planck/readme.md index f89fdeb93..4b24a690e 100644 --- a/keyboards/planck/readme.md +++ b/keyboards/planck/readme.md @@ -13,15 +13,17 @@ Download or clone the whole firmware and navigate to the keyboards/planck folder Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` + Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. ### Notable forks (which some of the keymap files are from) diff --git a/keyboards/preonic/readme.md b/keyboards/preonic/readme.md index f0be255a0..10763ee97 100644 --- a/keyboards/preonic/readme.md +++ b/keyboards/preonic/readme.md @@ -13,13 +13,15 @@ Download or clone the whole firmware and navigate to the keyboards/preonic folde Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap, create a file in the keymaps folder named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` + Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/retro_refit/readme.md b/keyboards/retro_refit/readme.md index b01a1a9ca..77df861ce 100644 --- a/keyboards/retro_refit/readme.md +++ b/keyboards/retro_refit/readme.md @@ -12,13 +12,15 @@ Download or clone the whole firmware and navigate to the keyboards/retro_refit f Depending on which keymap you would like to use, you will have to compile slightly differently. ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + ``` -$ make KEYMAP=[default|jack|] +$ make [default|jack|] ``` + Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/s60-x/readme.md b/keyboards/s60-x/readme.md index 099d58699..94ce82922 100644 --- a/keyboards/s60-x/readme.md +++ b/keyboards/s60-x/readme.md @@ -42,9 +42,9 @@ The recommended programs for flashing your keyboard are [Atmel FLIP](http://www. ## Building the firmware -To build firmware binary hex file with a certain keymap just run `make` with the `keymap` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - $ make keymap=[custom|poker|poker_set|poker_bit|plain|hasu|spacefn|hhkb|] + $ make [custom|poker|poker_set|poker_bit|plain|hasu|spacefn|hhkb|] For a more detailed explanation of the build process and the environment setup, see the ["Getting Started" section](/readme.md#getting-started). diff --git a/keyboards/tv44/readme.md b/keyboards/tv44/readme.md index e3b557fe2..4f691a4ca 100644 --- a/keyboards/tv44/readme.md +++ b/keyboards/tv44/readme.md @@ -13,16 +13,16 @@ Depending on which keymap you would like to use, you will have to compile slight ### Default -To build with the default keymap, simply run `make`. +To build with the default keymap, simply run `make default`. ### Other Keymaps Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create a folder with the name of your keymap in the keymaps folder, and see keymap documentation (you can find in top readme.md) and existant keymap files. -To build the firmware binary hex file with a keymap just do `make` with `keymap` option like: +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: ``` -$ make keymap=[default|jack|] +$ make [default|jack|] ``` Keymaps follow the format **__keymap.c__** and are stored in folders in the `keymaps` folder, eg `keymaps/my_keymap/` \ No newline at end of file -- cgit v1.2.3 From 9e03517ae51ff30d332accae27469ae3b1b25e73 Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Fri, 19 Aug 2016 21:47:00 -0600 Subject: Restructuring of the ergodox README. --- keyboards/ergodox/readme.md | 134 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 105 insertions(+), 29 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 1c1181dba..1627883c9 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -1,44 +1,121 @@ -# Infinity on Ubuntu Quickstart +# Customizing Keymap -To build an Infinity firmware under Ubuntu (tested on 15.10): +There are external tools for customizing the layout, but those do not use +the featurs of this qmk firmware. These sites include: + + - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for Ez + - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files + +You can also find an existing firmware that you like, for example from: + + - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) + +This qmk firmware also provides the ability to customize keymaps, but requires +a toolchain to build the firmware. See below for instructions on building +firmware and customizing keymaps. + +# Customizing Keymaps + +There are many existing keymaps in the "keymaps" directory. If you just want +to use one of them, you don't need to modify keymaps and can just build and +flash the firmware as described below. These directories each have a +"readme.md" file which describe them. + +If none of the existing keymaps suit you, you can create your own custom +keymap. This will require some experience with coding. Follow these steps +to customize a keymap: + + - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) + + - Clone the qmk_firmware repository + + - Set up your build environment (see below). + + - Make a new directory under "keymaps" to hold your customizations. + + - Copy an existing keymap that is close to what you want, such as + "keymaps/default/keymap.c". + + - Use an editor to modify the new "keymap.c". See "Finding the keycodes you + need" below). Try to edit the comments as well, so the "text graphics" + represent your layout correctly. + + - Compile your new firmware (see below) + + - Flash your firmware (see below) + + - Test the changes. + + - Submit your keymap as a pull request to the qmk_firmware repository so + others can use it. You will want to add a "readme.md" that describes the + keymap. + +# Build Dependencies + +Before you can build, you will need the build dependencies. There is a script +to try to do this for Linux: - Run the `util/install_dependencies.sh` script as root. - - Check out the submodules with `git submodule update --init --recursive` - - Go into the ErgoDox directory with `cd keyboards/ergodox` + +For the Infinity, you need the chibios submodules to be checked out or you +will receive errors about the build process being unable to find the chibios +files. Check them out with: + + - Go to the top level repo directory and run: `git submodule update --init --recursive` + +# Flashing Firmware + +## ErgoDox Ez + +The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). + +Linux users need to modify udev rules as described on the Teensy Linux page. +Some distributions provide a binary, maybe called `teensy-loader-cli`). + +To flash the firmware: + + - Build the firmware with `make keymap=keymapname`, for example `make + keymap=default` + + - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. + `ergodox_ez_default.hex` + + - Start the teensy loader. + + - Load the .hex file into it. + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corder. + + - Click the button in the Teensy app to download the firmware. + +## ErgoDox Infinity + +The Infinity is two completely independent keyboards, and needs to be flashed +for the left and right halves seperately. To flash them: + + - Remove the build directory with `rm -rf ../../.build` + - Build the firmware with `make keymap=keymapname subproject=infinity` - - Plug in the left hand keyboard only. - - Press the program button (back of keyboard, above thumb pad). - - Install the firmware with `sudo make dfu-util keymap=keymapname subproject=infinity` - - Install the right hand firmware, but I haven't figured this out yet. -# Getting started + - Plug in the left hand keyboard only. -There are two main ways you could customize the ErgoDox (EZ and Infinity) + - Press the program button (back of keyboard, above thumb pad). -## The Easy Way: Use an existing firmware file and just flash it (ErgoDox EZ only) + - Install the firmware with `sudo make dfu-util keymap=keymapname subproject=infinity` -1. Download and install the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). Some Linux distributions already provide a binary (may be called `teensy-loader-cli`), so you may prefer to use this. -2. Find a firmware file you like. There are [dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) you can browse and download. You can also use the [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) to create a firmware Hex file you like. -3. Download the firmware file -4. Connect the keyboard, press its Reset button (gently insert a paperclip into the hole in the top-right corner) and flash it using the Teensy loader you installed on step 1 and the firmware you downloaded. + - Remove the left-hand build with `rm -rf ../../.build` -## More technical: compile an existing keymap, or create your own totally custom firmware by editing the source files. + - Build left hand firmware with `make keymap=keymapname subproject=infinity MASTER=right` -This requires a little bit of familiarity with coding. -If you are just compiling an existing keymap and don't want to create your own, you can skip step 4, 5 and 8. + - Plug in the right hand keyboard only. -1. Go to https://github.com/jackhumbert/qmk_firmware and read the readme at the base of this repository, top to bottom. Then come back here :) -2. Clone the repository (download it) -3. Set up a build environment as per the readme. -4. Copy `keyboards/ergodox/keymaps/default/keymap.c` into `keymaps/your_name/keymap.c` (for example, `keymaps/german/keymap.c`) -5. Edit this file, changing keycodes to your liking (see "Finding the keycodes you need" below). Try to edit the comments as well, so the "text graphics" represent your layout correctly. See below for more tips on sharing your work. -6. Compile your firmware by running `make keymap=keymap_name`. For example, `make keymap=german`. This will result in a hex file, which will be called `ergodox_ez_keymap_name.hex`, e.g. `ergodox_ez_german.hex`. For **Infinity ErgoDox** you need to add `subproject=infinity` to the make command. -7. **ErgoDox EZ** - Flash this hex file using the [Teensy loader](https://www.pjrc.com/teensy/loader.html) as described in step 4 in the "Easy Way" above. If you prefer you can automatically flash the hex file after successful build by running `make teensy keymap=keymap_name`. + - Press the program button (back of keyboard, above thumb pad). - **Infinity ErgoDox** - Flash the firmware by running `make dfu-util keymap=keymap_name subproject=infinity` -8. Submit your work as a pull request to this repository, so others can also use it. :) See below on specifics. + - Install the firmware with `sudo make dfu-util keymap=keymapname subproject=infinity MASTER=right` -Good luck! :) +More information on the Infinity firmware is available in the [TMK/chibios for +Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) ## Contributing your keymap @@ -49,7 +126,6 @@ The QMK firmware is open-source, so it would be wonderful to have your contribut 3. `readme.md` - a readme file, which GitHub would display by default when people go to your directory. Explain what's different about your keymap, what you tweaked or how it works. No specific format to follow, just communicate what you did. :) 4. Any graphics you wish to add. This is absolutely not a must. If you feel like it, you can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to make something and grab a screenshot, but it's really not a must. If you do have graphics, your readme can just embed the graphic as a link, just like I did with the default layout. - ## Finding the keycodes you need Let's say you want a certain key in your layout to send a colon; to figure out what keycode to use to make it do that, you're going to need `quantum/keymap_common.h`. -- cgit v1.2.3 From d98e5ddf30e6ced925e3d4fa705ae5449808074b Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Fri, 19 Aug 2016 21:50:04 -0600 Subject: Tweaks after review. --- keyboards/ergodox/readme.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 1627883c9..349a0ce40 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -1,4 +1,4 @@ -# Customizing Keymap +# Keymap Options There are external tools for customizing the layout, but those do not use the featurs of this qmk firmware. These sites include: @@ -117,7 +117,7 @@ for the left and right halves seperately. To flash them: More information on the Infinity firmware is available in the [TMK/chibios for Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) -## Contributing your keymap +# Contributing your keymap The QMK firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed dozens of user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. @@ -126,7 +126,7 @@ The QMK firmware is open-source, so it would be wonderful to have your contribut 3. `readme.md` - a readme file, which GitHub would display by default when people go to your directory. Explain what's different about your keymap, what you tweaked or how it works. No specific format to follow, just communicate what you did. :) 4. Any graphics you wish to add. This is absolutely not a must. If you feel like it, you can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to make something and grab a screenshot, but it's really not a must. If you do have graphics, your readme can just embed the graphic as a link, just like I did with the default layout. -## Finding the keycodes you need +# Finding the keycodes you need Let's say you want a certain key in your layout to send a colon; to figure out what keycode to use to make it do that, you're going to need `quantum/keymap_common.h`. -- cgit v1.2.3 From 0418ecc073d420fff3be2603bfb7a6fa234bd357 Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Mon, 22 Aug 2016 10:26:18 -0600 Subject: Changes from review by @fredizzimo and @Xyverz --- keyboards/ergodox/readme.md | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 349a0ce40..304f2b01f 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -1,18 +1,3 @@ -# Keymap Options - -There are external tools for customizing the layout, but those do not use -the featurs of this qmk firmware. These sites include: - - - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for Ez - - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files - -You can also find an existing firmware that you like, for example from: - - - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) - -This qmk firmware also provides the ability to customize keymaps, but requires -a toolchain to build the firmware. See below for instructions on building -firmware and customizing keymaps. # Customizing Keymaps @@ -94,8 +79,6 @@ To flash the firmware: The Infinity is two completely independent keyboards, and needs to be flashed for the left and right halves seperately. To flash them: - - Remove the build directory with `rm -rf ../../.build` - - Build the firmware with `make keymap=keymapname subproject=infinity` - Plug in the left hand keyboard only. @@ -104,8 +87,6 @@ for the left and right halves seperately. To flash them: - Install the firmware with `sudo make dfu-util keymap=keymapname subproject=infinity` - - Remove the left-hand build with `rm -rf ../../.build` - - Build left hand firmware with `make keymap=keymapname subproject=infinity MASTER=right` - Plug in the right hand keyboard only. @@ -133,3 +114,19 @@ Let's say you want a certain key in your layout to send a colon; to figure out w That file contains a big list of all of the special, fancy keys (like, being able to send % on its own and whatnot). If you want to send a plain vanilla key, you can look up its code under `doc/keycode.txt`. That's where all the boring keys hang out. + +# Other Firmware Options + +There are external tools for customizing the layout, but those do not use +the featurs of this qmk firmware. These sites include: + + - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for Ez + - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files + +You can also find an existing firmware that you like, for example from: + + - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) + +This qmk firmware also provides the ability to customize keymaps, but requires +a toolchain to build the firmware. See below for instructions on building +firmware and customizing keymaps. -- cgit v1.2.3 From feebc58d327b969fe1ef11cd5b5989a60c51ac87 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Tue, 23 Aug 2016 09:42:11 +0300 Subject: Split kitten_paw into Makefile/rules.mk --- keyboards/kitten_paw/Makefile | 76 +------------------------------------------ keyboards/kitten_paw/rules.mk | 72 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 73 insertions(+), 75 deletions(-) create mode 100644 keyboards/kitten_paw/rules.mk (limited to 'keyboards') diff --git a/keyboards/kitten_paw/Makefile b/keyboards/kitten_paw/Makefile index 912292173..57b2ef62e 100644 --- a/keyboards/kitten_paw/Makefile +++ b/keyboards/kitten_paw/Makefile @@ -1,77 +1,3 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u2 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 - OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= no # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -CUSTOM_MATRIX = yes -SRC += matrix.c led.c - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile endif - diff --git a/keyboards/kitten_paw/rules.mk b/keyboards/kitten_paw/rules.mk new file mode 100644 index 000000000..dab7cabc5 --- /dev/null +++ b/keyboards/kitten_paw/rules.mk @@ -0,0 +1,72 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u2 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 + OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= no # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 + +CUSTOM_MATRIX = yes +SRC += matrix.c led.c -- cgit v1.2.3 From 7debe7cd777f50ef0adf4d3b4623946232f1eccf Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Wed, 24 Aug 2016 09:26:41 -0600 Subject: Changes based on @fredizzimo review, flashing Infinity details --- keyboards/ergodox/readme.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 304f2b01f..4730de36f 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -1,3 +1,15 @@ +# The Easy Way + +If you can find firmware someone else has made that does what you want, that +is the easiest way to customize your ErgoDox. It requires no programming +experience or the setup of a build environment. + +Quickstart: + + - Find and download an [existing firmware](#other-firmware-options) + + - Then flash the firmware to your [ErgoDox Ez](#ergodox-ez) + or [ErgoDox Infinity](#ergodox-infinity) # Customizing Keymaps @@ -98,6 +110,28 @@ for the left and right halves seperately. To flash them: More information on the Infinity firmware is available in the [TMK/chibios for Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) +### Infinity Master/Two Halves + +The Infinity is two completely independent keyboards, that can connect together. +You have a few options in how you flash the firmware: + +- Flash the left half, rebuild the firmware with "MASTER=right" and then flash + the right half. This allows you to plug in either half directly to the + computer and is what the above instructions do. + +- Flash the left half, then flash the same firmware on the right. This only + works when the left half is plugged directly to the computer and the keymap + is mirrored. It saves the small extra step of rebuilding with + "MASTER=right". + +- The same as the previous one but with "MASTER=right" when you build the + firmware, then flash the same firmware to both halves. You just have to + directly connect the right half to the computer. + +- For minor changes such as changing only the keymap without having updated + any part of the firmware code itself, you can program only the MASTER half. + It is safest to program both halves though. + # Contributing your keymap The QMK firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed dozens of user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. -- cgit v1.2.3 From 0dfd1712bb22be9fe63b8754eb8fe72675906c6f Mon Sep 17 00:00:00 2001 From: Sean Reifschneider Date: Wed, 24 Aug 2016 09:30:29 -0600 Subject: Making the existing firmware link better --- keyboards/ergodox/readme.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/readme.md b/keyboards/ergodox/readme.md index 4730de36f..b113ca7dd 100644 --- a/keyboards/ergodox/readme.md +++ b/keyboards/ergodox/readme.md @@ -6,7 +6,8 @@ experience or the setup of a build environment. Quickstart: - - Find and download an [existing firmware](#other-firmware-options) + - Find and download an existing firmware + [from Other Firmware Options](#other-firmware-options) - Then flash the firmware to your [ErgoDox Ez](#ergodox-ez) or [ErgoDox Infinity](#ergodox-infinity) -- cgit v1.2.3 From f512179e66e4d4dfbcc92c6ba1aaa1b6cf1ef12b Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Wed, 24 Aug 2016 13:17:01 +0200 Subject: ergodox: Update algernon's keymap to v1.6 Major changes include: Base layer changes ------------------ * The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. * The `:;` and `-_` keys are now available on the base layer, on their **ADORE** location, too, just below `[{(`/`]})`. * The `Apps` key has been replaced by `F12`. * The `-`/`_` is no longer a tap-dance key. ADORE layer changes ------------------- * Adjustments were made to the **ADORE** layer, to separate some inconvenient combinations. Miscellaneous changes --------------------- * `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. * The mouse acceleration keys on the **Navigation and Media* layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. * When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. Heatmap ------- * The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. * The heatmap generator received a lot of updates. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/Makefile | 9 +- .../keymaps/algernon/images/adore-layer.png | Bin 93748 -> 93893 bytes .../ergodox/keymaps/algernon/images/base-layer.png | Bin 95222 -> 95204 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 494 +++++++----------- keyboards/ergodox/keymaps/algernon/readme.md | 67 ++- .../algernon/tools/heatmap-adore-layout.json | 533 -------------------- .../algernon/tools/heatmap-base-layout.json | 533 -------------------- .../algernon/tools/heatmap-layout.ADORE.json | 553 +++++++++++++++++++++ .../algernon/tools/heatmap-layout.Dvorak.json | 542 ++++++++++++++++++++ .../keymaps/algernon/tools/log-to-heatmap.py | 368 +++++++++----- 10 files changed, 1564 insertions(+), 1535 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json delete mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json create mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json create mode 100644 keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/keyboards/ergodox/keymaps/algernon/Makefile index 00194857a..7c2b3ad97 100644 --- a/keyboards/ergodox/keymaps/algernon/Makefile +++ b/keyboards/ergodox/keymaps/algernon/Makefile @@ -1,22 +1,23 @@ BOOTMAGIC_ENABLE=no COMMAND_ENABLE=no SLEEP_LED_ENABLE=no -UNICODE_ENABLE=no FORCE_NKRO ?= yes DEBUG_ENABLE = no CONSOLE_ENABLE = no TAP_DANCE_ENABLE = yes KEYLOGGER_ENABLE ?= yes +UCIS_ENABLE = yes +MOUSEKEY_ENABLE ?= yes -ADORE_AUTOLOG ?= no +AUTOLOG_ENABLE ?= no ifeq (${FORCE_NKRO},yes) OPT_DEFS += -DFORCE_NKRO endif -ifeq (${ADORE_AUTOLOG},yes) +ifeq (${AUTOLOG_ENABLE},yes) KEYLOGGER_ENABLE = yes -OPT_DEFS += -DADORE_AUTOLOG +OPT_DEFS += -DAUTOLOG_ENABLE endif ifeq (${KEYLOGGER_ENABLE},yes) diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index 44ad8a1eb..3d0a5fb20 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png and b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/base-layer.png b/keyboards/ergodox/keymaps/algernon/images/base-layer.png index da159fbe2..7ea57aae3 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/base-layer.png and b/keyboards/ergodox/keymaps/algernon/images/base-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 144030e2e..9f476d8a6 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -2,6 +2,7 @@ * algernon's ErgoDox EZ layout, please see the readme.md file! */ +#include #include "ergodox.h" #include "led.h" #include "debug.h" @@ -33,7 +34,6 @@ enum { // Buttons that do extra stuff A_GUI, A_PLVR, - A_ESC, A_MPN, // Function / number keys @@ -47,7 +47,6 @@ enum { KF_8, KF_9, KF_10, - KF_11, // =, F11 // Application select keys APP_SLK, // Slack @@ -62,6 +61,11 @@ enum { A_MDL, A_MDR, + // Mouse acceleration + A_ACL0, + A_ACL1, + A_ACL2, + // Hungarian layer keys HU_AA, // Á HU_OO, // Ó @@ -89,7 +93,6 @@ enum { enum { CT_CLN = 0, - CT_MNS, CT_TA, CT_LBP, CT_RBP @@ -102,7 +105,11 @@ uint16_t gui_timer = 0; uint16_t kf_timers[12]; #if KEYLOGGER_ENABLE +# ifdef AUTOLOG_ENABLE +bool log_enable = true; +# else bool log_enable = false; +# endif #endif bool time_travel = false; @@ -114,12 +121,12 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Base Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | ~ | ' | , | . | P | Y | [ | | ] | F | G | C | R | L | \ | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | + * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | - * |-----------+------+------+------+------+------| ( | | ) |------+------+------+------+------+-----------| + * |-----------+------+------+------+------+------| : | | - |------+------+------+------+------+-----------| * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | : | | - | | | | | @@ -135,21 +142,21 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( // left hand M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,KC_LBRC +,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) ,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I -,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,KC_LPRN +,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_CLN) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) ,F(F_ALT),F(F_GUI) ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),M(A_ESC) + ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_APP ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,KC_RBRC ,KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS + ,KC_F12 ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 + ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL - ,KC_RPRN ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP - ,TD(CT_MNS),KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_MINS ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP + ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL ,KC_LEAD @@ -159,13 +166,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 1: Adore layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | Apps | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | `~ | X | W | K | L | M | ( | | ) | F | H | C | P | Y | \ | + * | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | Z | Q | ' | , | . | : | | - | B | G | V | J | / | | + * | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | | | | | | | | * `-----------------------------------' `-----------------------------------' @@ -180,20 +187,20 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [ADORE] = KEYMAP( // left hand KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,KC_GRV ,KC_X ,KC_W ,KC_K ,KC_L ,KC_M ,TD(CT_LBP) +,KC_GRV ,KC_Y ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) ,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U ,KC_NO ,KC_Z ,KC_Q ,KC_QUOT,KC_COMM,KC_DOT ,TD(CT_CLN) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,F(F_ALT),F(F_GUI) ,F(F_CTRL) - ,KC_BSPC,F(F_SFT),M(A_ESC) + ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_APP ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS + ,KC_F12 ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 + ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_X ,KC_BSLS ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL - ,TD(CT_MNS),KC_B ,KC_G ,KC_V ,KC_J ,KC_SLSH ,KC_NO + ,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL @@ -363,14 +370,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [NMDIA] = KEYMAP( // left hand - KC_ACL0 ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) -,KC_ACL1 ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO -,KC_ACL2 ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO + M(A_ACL0) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) +,M(A_ACL1) ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO +,M(A_ACL2) ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO ,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLU ,KC_VOLD - ,KC_SPC,KC_ENTER,M(A_ESC) + ,KC_SPC,KC_ENTER,KC_ESC // right hand ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO @@ -439,7 +446,7 @@ const uint16_t PROGMEM fn_actions[] = { ,[F_CTRL] = ACTION_MODS_ONESHOT (MOD_LCTL) }; -void toggle_steno(int pressed) +static void toggle_steno(int pressed) { uint8_t layer = biton32(layer_state); @@ -462,7 +469,7 @@ void toggle_steno(int pressed) } } -macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) +static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) { uint8_t need_shift = 0; uint8_t hold_shift = 0; @@ -507,46 +514,43 @@ macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_char) return MACRO_NONE; } -void ang_handle_kf (keyrecord_t *record, uint8_t id) +static bool from_appsel; + +static void ang_handle_kf (keyrecord_t *record, uint8_t id) { uint8_t code = id - KF_1; if (record->event.pressed) { kf_timers[code] = timer_read (); } else { - uint8_t kc; + uint8_t kc_base; - if (timer_elapsed (kf_timers[code]) > TAPPING_TERM) { + if (from_appsel) { + from_appsel = false; + return; + } + + if (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM) { // Long press - kc = KC_F1 + code; + kc_base = KC_F1; } else { - if (id == KF_11) - kc = KC_EQL; - else - kc = KC_1 + code; + kc_base = KC_1; } + kf_timers[code] = 0; + code += kc_base; - register_code (kc); - unregister_code (kc); + register_code (code); + unregister_code (code); } } +static struct { + uint8_t idx; +} m_accel_state; + const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { - case A_ESC: - if (record->event.pressed) { - if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) { - clear_oneshot_mods (); - } else { - register_code (KC_ESC); - } - layer_off (HUN); - } else { - unregister_code (KC_ESC); - } - break; - case A_MPN: if (record->event.pressed) { if (keyboard_report->mods & MOD_BIT(KC_LSFT) || @@ -588,6 +592,7 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case HU_UEE: return ang_do_hun (record, KC_EQL, KC_U); +#if MOUSEKEY_ENABLE /* Mouse movement */ case A_MUL: if (record->event.pressed) { @@ -633,6 +638,24 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) mousekey_send(); break; + case A_ACL0 ... A_ACL2: + if (record->event.pressed) { + uint8_t idx = id - A_ACL0; + if (m_accel_state.idx == id) { + mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0); + m_accel_state.idx = 0; + } else { + if (m_accel_state.idx) { + mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0); + m_accel_state.idx = 0; + } + mousekey_on(KC_ACL0 + idx); + m_accel_state.idx = id; + } + } + break; +#endif + /* Plover base */ case A_PLVR: toggle_steno(record->event.pressed); @@ -663,22 +686,34 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case APP_SLK: + from_appsel = true; return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END); case APP_EMCS: + from_appsel = true; return MACRODOWN(T(G), T(N), T(U), T(SPC), T(E), T(M), T(A), T(C), T(S), T(SPC), T(2), T(4), T(ENT), END); case APP_TERM: - return MACRODOWN(T(T), T(E), T(R), T(M), T(ENT), END); + from_appsel = true; + if (!record->event.pressed) { + register_code(KC_ESC); + unregister_code(KC_ESC); + wait_ms(TAPPING_TERM + 25); + register_code(KC_DEL); + unregister_code(KC_DEL); + } + break; case APP_CHRM: + from_appsel = true; return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); case APP_MSIC: + from_appsel = true; return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END); /* Function keys */ - case KF_1 ... KF_11: + case KF_1 ... KF_10: ang_handle_kf (record, id); break; } @@ -686,12 +721,14 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; -uint8_t is_adore = 0; +static uint8_t is_adore = 0; // Runs just one time when the keyboard initializes. void matrix_init_user(void) { uint8_t dl; + set_unicode_input_mode(UC_LNX); + ergodox_led_all_on(); for (int i = LED_BRIGHTNESS_HI; i > LED_BRIGHTNESS_LO; i--) { ergodox_led_all_set (i); @@ -709,120 +746,38 @@ void matrix_init_user(void) { dl = eeconfig_read_default_layer (); if (dl == (1UL << ADORE)) { is_adore = 1; -#if ADORE_AUTOLOG - log_enable = true; -#endif } }; LEADER_EXTERNS(); -void ang_do_unicode (void) { - register_code (KC_RCTL); - register_code (KC_RSFT); - register_code (KC_U); - unregister_code (KC_U); - unregister_code (KC_RSFT); - unregister_code (KC_RCTL); - wait_ms (100); -} +static void ang_tap (uint8_t code, ...) { + uint8_t kc = code; + va_list ap; -void ang_tap (uint16_t codes[]) { - for (int i = 0; codes[i] != 0; i++) { - register_code (codes[i]); - unregister_code (codes[i]); - wait_ms (50); - } + va_start(ap, code); + + do { + register_code(kc); + unregister_code(kc); + wait_ms(50); + kc = va_arg(ap, int); + } while (kc != 0); + va_end(ap); } #define TAP_ONCE(code) \ register_code (code); \ unregister_code (code) -void ang_tap_dance_bp_finished (qk_tap_dance_state_t *state, void *user_data) { - bool left, parens; - - if (state->count > 2) { - state->count = 0; - return; - } - - if (state->keycode == TD(CT_LBP)) - left = true; - else - left = false; - - if (state->count == 1) - parens = false; - else - parens = true; - - if (parens) { - register_code (KC_RSFT); - if (left) { - TAP_ONCE(KC_9); - } else { - TAP_ONCE(KC_0); - } - unregister_code (KC_RSFT); - } else { - if (left) { - TAP_ONCE (KC_LBRC); - } else { - TAP_ONCE (KC_RBRC); - } - } -} - -void ang_tap_dance_cln_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_RSFT); - register_code (KC_SCLN); - } else if (state->count == 2) { - register_code (KC_SCLN); - } -} - -void ang_tap_dance_cln_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_SCLN); - unregister_code (KC_RSFT); - } else if (state->count == 2) { - unregister_code (KC_SCLN); - } -} - -void ang_tap_dance_mns_finished (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - register_code (KC_MINS); - } else if (state->count == 2) { - register_code (KC_RSFT); - register_code (KC_MINS); - } -} - -void ang_tap_dance_mns_reset (qk_tap_dance_state_t *state, void *user_data) { - if (state->count == 1) { - unregister_code (KC_MINS); - } else if (state->count == 2) { - unregister_code (KC_RSFT); - unregister_code (KC_MINS); - } -} - typedef struct { bool layer_toggle; bool sticky; - bool finished_once; } td_ta_state_t; -void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { +static void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; - if (td_ta->finished_once) { - return; - } - if (td_ta->sticky) { td_ta->sticky = false; td_ta->layer_toggle = false; @@ -830,7 +785,6 @@ void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { return; } - td_ta->finished_once = true; if (state->count == 1 && !state->pressed) { register_code (KC_TAB); td_ta->sticky = false; @@ -842,35 +796,29 @@ void ang_tap_dance_ta_finished (qk_tap_dance_state_t *state, void *user_data) { } } -void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { +static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data) { td_ta_state_t *td_ta = (td_ta_state_t *) user_data; if (!td_ta->layer_toggle) unregister_code (KC_TAB); if (!td_ta->sticky) layer_off (ARRW); - - td_ta->finished_once = false; } qk_tap_dance_action_t tap_dance_actions[] = { - [CT_CLN] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_cln_finished, ang_tap_dance_cln_reset) - ,[CT_MNS] = ACTION_TAP_DANCE_FN_ADVANCED (NULL, ang_tap_dance_mns_finished, ang_tap_dance_mns_reset) + [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) ,[CT_TA] = { .fn = { NULL, ang_tap_dance_ta_finished, ang_tap_dance_ta_reset }, - .user_data = (void *)&((td_ta_state_t) { false, false, false }) + .user_data = (void *)&((td_ta_state_t) { false, false }) } - ,[CT_LBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished) - ,[CT_RBP] = ACTION_TAP_DANCE_FN (ang_tap_dance_bp_finished) + ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN) + ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) }; -static uint16_t uni[32]; -static uint8_t unicnt; -static bool unimagic = false; - // Runs constantly in the background, in a loop. void matrix_scan_user(void) { uint8_t layer = biton32(layer_state); + bool is_arrow = false; if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) unregister_code (KC_LGUI); @@ -893,13 +841,19 @@ void matrix_scan_user(void) { ergodox_right_led_2_set (LED_BRIGHTNESS_HI); } + if (layer_state & (1UL << ARRW)) { + ergodox_right_led_1_on (); + ergodox_right_led_3_on (); + is_arrow = true; + } + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { ergodox_right_led_1_set (LED_BRIGHTNESS_HI); ergodox_right_led_1_on (); } else { ergodox_right_led_1_set (LED_BRIGHTNESS_LO); - if (layer != NMDIA && layer != PLVR && layer != ADORE) + if (layer != NMDIA && layer != PLVR && layer != ADORE && !is_arrow) ergodox_right_led_1_off (); } @@ -919,7 +873,7 @@ void matrix_scan_user(void) { ergodox_right_led_3_on (); } else { ergodox_right_led_3_set (LED_BRIGHTNESS_LO); - if (layer != HUN && layer != PLVR && layer != ADORE) + if (layer != HUN && layer != PLVR && layer != ADORE && !is_arrow) ergodox_right_led_3_off (); } @@ -936,20 +890,17 @@ void matrix_scan_user(void) { } #endif + SEQ_ONE_KEY (KC_Q) { + register_code16 (LCTL(KC_1)); + unregister_code16 (LCTL(KC_1)); + } + SEQ_ONE_KEY (KC_T) { time_travel = !time_travel; } SEQ_ONE_KEY (KC_U) { - ang_do_unicode (); - } - - SEQ_TWO_KEYS (KC_LEAD, KC_U) { - unicnt = 0; - unimagic = true; - register_code(KC_RSFT); - TAP_ONCE(KC_U); - unregister_code(KC_RSFT); + qk_ucis_start(); } SEQ_ONE_KEY (KC_V) { @@ -958,25 +909,23 @@ void matrix_scan_user(void) { SEQ_ONE_KEY (KC_L) { /* λ */ - ang_do_unicode (); - - uint16_t codes[] = {KC_0, KC_3, KC_B, KC_B, KC_ENT, 0}; - ang_tap (codes); + unicode_input_start(); + register_hex(0x03bb); + unicode_input_finish(); } SEQ_ONE_KEY (KC_Y) { - uint16_t codes[] = {KC_BSLS, KC_O, KC_SLSH, 0}; - ang_tap (codes); + ang_tap (KC_BSLS, KC_O, KC_SLSH, 0); } SEQ_ONE_KEY (KC_S) { - ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); + unicode_input_start(); register_hex(0xaf); unicode_input_finish(); TAP_ONCE (KC_BSLS); register_code (KC_RSFT); TAP_ONCE (KC_MINS); TAP_ONCE (KC_9); unregister_code (KC_RSFT); - ang_do_unicode (); TAP_ONCE (KC_3); TAP_ONCE (KC_0); TAP_ONCE (KC_C); TAP_ONCE (KC_4); TAP_ONCE (KC_SPC); + unicode_input_start (); register_hex(0x30c4); unicode_input_finish(); register_code (KC_RSFT); TAP_ONCE (KC_0); TAP_ONCE (KC_MINS); unregister_code (KC_RSFT); TAP_ONCE (KC_SLSH); - ang_do_unicode (); TAP_ONCE (KC_A); TAP_ONCE (KC_F); TAP_ONCE (KC_SPC); + unicode_input_start (); register_hex(0xaf); unicode_input_finish(); } SEQ_TWO_KEYS (KC_W, KC_M) { @@ -987,8 +936,7 @@ void matrix_scan_user(void) { wait_ms (1000); - uint16_t codes[] = {KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0}; - ang_tap (codes); + ang_tap (KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0); register_code (KC_LGUI); register_code (KC_UP); unregister_code (KC_UP); @@ -1013,13 +961,7 @@ void matrix_scan_user(void) { ergodox_right_led_2_off (); wait_ms (100); ergodox_right_led_1_off (); -#if ADORE_AUTOLOG - log_enable = true; -#endif } else { -#if ADORE_AUTOLOG - log_enable = false; -#endif is_adore = 0; default_layer_and (0); default_layer_or (1UL << BASE); @@ -1043,140 +985,38 @@ void matrix_scan_user(void) { static uint16_t last4[4]; -bool is_uni_seq(char *seq) { - uint8_t i; - - for (i = 0; seq[i]; i++) { - uint16_t code; - if (('1' <= seq[i]) && (seq[i] <= '9')) - code = seq[i] - '1' + KC_1; - else if (seq[i] == '0') - code = KC_0; - else - code = seq[i] - 'a' + KC_A; - - if (i > unicnt) - return false; - if (uni[i] != code) - return false; - } - - if (uni[i] == KC_ENT || uni[i] == KC_SPC) - return true; - - return false; -} - -uint16_t hex_to_keycode(uint8_t hex) -{ - if (hex == 0x0) { - return KC_0; - } else if (hex < 0xA) { - return KC_1 + (hex - 0x1); - } else { - return KC_A + (hex - 0xA); - } -} - -void register_hex(uint16_t hex) { - bool leading_zeros = true; - - for(int i = 3; i >= 0; i--) { - uint8_t digit = ((hex >> (i*4)) & 0xF); - if (digit != 0) - leading_zeros = false; - else if (leading_zeros) - continue; - register_code(hex_to_keycode(digit)); - unregister_code(hex_to_keycode(digit)); - wait_ms(10); - } -} - -typedef struct { - char *symbol; - uint16_t codes[4]; -} qk_ucis_symbol_t; - -static qk_ucis_symbol_t ucis_symbol_table[] = { - {"poop", {0x1, 0xf4a9, 0}}, - {"rofl", {0x1, 0xf923, 0}}, - {"kiss", {0x1, 0xf619, 0}}, - {"snowman", {0x2603, 0}}, - {NULL, {}} -}; - -bool process_record_ucis (uint16_t keycode, keyrecord_t *record) { - uint8_t i; - - if (!unimagic) - return true; - - if (!record->event.pressed) - return true; - - uni[unicnt] = keycode; - unicnt++; - - if (keycode == KC_BSPC) { - if (unicnt >= 2) { - unicnt-= 2; - return true; - } else { - unicnt--; - return false; - } - } - - if (keycode == KC_ENT || keycode == KC_SPC) { - bool symbol_found = false; - - for (i = unicnt; i > 0; i--) { - register_code (KC_BSPC); - unregister_code (KC_BSPC); - wait_ms(10); - } - - ang_do_unicode(); - wait_ms(10); - for (i = 0; ucis_symbol_table[i].symbol; i++) { - if (is_uni_seq (ucis_symbol_table[i].symbol)) { - symbol_found = true; - for (uint8_t j = 0; ucis_symbol_table[i].codes[j]; j++) { - register_hex(ucis_symbol_table[i].codes[j]); - } - break; - } - } - if (!symbol_found) { - for (i = 0; i < unicnt - 1; i++) { - uint8_t code; - - if (uni[i] > KF_1) - code = uni[i] - KF_1 + KC_1; - else - code = uni[i]; - TAP_ONCE(code); - wait_ms (10); - } - } - - unimagic = false; - return true; - } - return true; -} +const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE +( + UCIS_SYM("poop", 0x1f4a9), + UCIS_SYM("rofl", 0x1f923), + UCIS_SYM("kiss", 0x1f619), + UCIS_SYM("snowman", 0x2603), + UCIS_SYM("coffee", 0x2615), + UCIS_SYM("heart", 0x2764), + UCIS_SYM("bolt", 0x26a1) +); bool process_record_user (uint16_t keycode, keyrecord_t *record) { #if KEYLOGGER_ENABLE if (log_enable) { - xprintf ("KL: col=%d, row=%d\n", record->event.key.col, - record->event.key.row); + xprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, + record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak"); } #endif - if (!process_record_ucis (keycode, record)) - return false; + if (keycode == KC_ESC && record->event.pressed) { + bool queue = true; + + if ((get_oneshot_mods ()) && !has_oneshot_mods_timed_out ()) { + clear_oneshot_mods (); + queue = false; + } + if (layer_state & (1UL<event.pressed) { uint8_t p; @@ -1188,15 +1028,13 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) { last4[3] = keycode; if (last4[0] == KC_D && last4[1] == KC_A && last4[2] == KC_T && last4[3] == KC_E) { - uint16_t codes[] = {KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0}; - ang_tap (codes); + ang_tap (KC_E, KC_SPC, KC_MINS, KC_D, KC_SPC, KC_QUOT, 0); register_code (KC_RSFT); register_code (KC_EQL); unregister_code (KC_EQL); unregister_code (KC_RSFT); - uint16_t codes2[] = {KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0}; - ang_tap (codes2); + ang_tap (KC_4, KC_SPC, KC_D, KC_A, KC_Y, KC_S, KC_QUOT, 0); return false; } @@ -1204,3 +1042,17 @@ bool process_record_user (uint16_t keycode, keyrecord_t *record) { return true; } + +void qk_ucis_symbol_fallback (void) { + for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { + uint8_t code; + + if (qk_ucis_state.codes[i] > KF_1) + code = qk_ucis_state.codes[i] - KF_1 + KC_1; + else + code = qk_ucis_state.codes[i]; + register_code(code); + unregister_code(code); + wait_ms (10); + } +} diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 26dfddbe6..5e7adb332 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -3,11 +3,15 @@ algernon's layout ======================= -This is an unconventional layout for the ErgoDox EZ. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox]. +This is an unconventional layout for the [ErgoDox EZ][ez]. For more details about the history of the layout, see my [blog posts about my ErgoDox journey][blog-ergodox]. + [ez]: https://ergodox-ez.com/ [blog-ergodox]: https://asylum.madhouse-project.org/blog/tags/ergodox/ -Some of the things in the layout only work when one uses Spacemacs and GNOME under Linux. Your mileage may vary. +Some of the things in the layout only work when one uses [Spacemacs][spacemacs] and [GNOME][gnome] under Linux. Your mileage may vary. + + [spacemacs]: http://spacemacs.org/ + [gnome]: https://www.gnome.org/ ## Table of Contents @@ -40,10 +44,10 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest * The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. * The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. * The **Media** and **Hun** layer keys are one-shot, the **STENO** key is a toggle. -* When holding any of the **Arrow** layer keys, the arrow layer activates while the layer key is held. Tapping the key produces the normal key. +* When holding the `Tab`/**Arrow** key, the arrow layer activates while the key is held. Tapping the key produces the normal, `Tab` key. Double-tapping it toggles the **Arrow** layer on until a third tap. * Tapping the `:` key once yields `:`, tapping it twice yields `;`. +* Tapping the `[{(`/`)}]` keys once yields `[` (or `{` when shifted), tapping them twice yields `(`. * The **Lead** key allows me to type in a sequence of keys, and trigger some actions: - - `LEAD u` enters unicode input mode, by sending the GTK+ key sequence that does this. - `LEAD l` uses the unicode input method to enter a `λ`. - `LEAD s` does a lot of magic to type in a shruggie: `¯\_(ツ)_/¯` - `LEAD y` types `\o/`. @@ -52,7 +56,7 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest - `LEAD v` prints the firmware version, the keyboard and the keymap. - `LEAD d` toggles logging keypress positions to the HID console. - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader. - - `LEAD LEAD u` enters the [Unicode symbol input][#unicode-symbol-input] mode. + - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode. ## ADORE layer @@ -91,6 +95,7 @@ For the layers, the following rules apply: * When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active. * When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue* LEDs are on. * When the [Navigation and media layer](#navigation-and-media-layer) is active, the *red* and *green* ones are on. +* When the **ARROW** layer is active, the *red* and *blue* ones are on. * For the [Steno layer](#steno-layer), all LEDs will be turned on. Unless noted otherwise, the layers use a dim light for the LEDs, while modifiers use a stronger one, and modifiers override any layer preferences. For example, when on the one-handed layer, with the left side active (*red* light blinking), if `Shift` is on, the *red* light will be constantly on. @@ -116,7 +121,7 @@ This is an experimental feature, and may or may not work reliably. When the keypress logging functionality is enabled (by `LEAD d`), the keyboard will output a line every time a key is pressed, containing the position of the key in the matrix. This allows one to collect this information, and build analytics over it, such as a heat map, including dead keys too. -Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, simply point `tools/log-to-heatmap.py` to a base layout file (one is included in the `tools/` directory), and the key position log. The latter one can create by running `hid-listen`, and redirecting its output to a file. +Included with the firmware is a small tool that can parse these logs, and create a heatmap that one can import into [KLE][kle]. To use it, either pipe the output of `hid_listen` into it, or pipe it an already saved log, and it will save the results into files in an output directory (given on the command-line). See the output of `tools/log-to-heatmap.py --help` for more information. [kle]: http://www.keyboard-layout-editor.com/ @@ -151,7 +156,35 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the # Changelog -## v1.5 - 2016-08-12 +## v1.6 + +*2016-08-24* + +### Base layer changes + +* The parentheses & bracket keys have been merged: tapping them results in `[` or `{` (if it was shifted), double tapping leads to `(`. +* The `:;` and `-_` keys are now available on the base layer, on their [ADORE](#adore-layer) location, too, just below `[{(`/`]})`. +* The `Apps` key has been replaced by `F12`. +* The `-`/`_` is no longer a tap-dance key. + +### ADORE layer changes + +* Adjustments were made to the [ADORE](#adore-layer) layer, to separate some inconvenient combinations. + +### Miscellaneous changes + +* `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. +* The mouse acceleration keys on the [Navigation and Media](#navigation-and-media-layer) layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. +* When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. + +### Heatmap + +* The built-in keylogger has been greatly enhanced, it now outputs the pressed state, and the layer (Dvorak or ADORE). As such, the `ADORE_AUTOLOG` option has been removed, instead there is `AUTOLOG_ENABLE` now, which when enabled, makes the keylogger start when the keyboard boots. It defaults to off. +* The heatmap generator received a lot of updates. + +## v1.5 + +*2016-08-12* * The **1HAND** layer has been removed. * A `Delete` key is now available on the right thumb cluster. @@ -161,7 +194,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * On the **ARROW** layer, `Backspace` has been replaced by `Enter`. * There is some experimental support for entering Unicode symbols. -## v1.4 - 2016-07-29 +## v1.4 + +*2016-07-29* * When toggling the key logging on or off, the LEDs will do a little dance. * The keylogger is now optional, but enabled by default. Use `KEYLOGGER_ENABLE=no` on the `make` command line to disable it. @@ -169,14 +204,18 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * The `-`/`_` key was turned into a tap-dance key too. * There is now a way to travel time with the keyboard, toggle the feature on by hitting `LEAD t`. -## v1.3 - 2016-07-06 +## v1.3 + +*2016-07-06* * Added support for logging keys, by pressing `LEAD d`. Also included is a tool to generate a [heatmap](#heatmap) out of the logs. * The arrow and navigation keys were rearranged again, and now require an additional key being held to activate. See the [base layer](#base-layer) for an image that shows where arrows are. * The **experimental** layer has been redone, and is now called [ADORE](#adore-layer), and as such, can be enabled by `LEAD a` now. * Switching between Dvorak and ADORE is now persisted into EEPROM, and survives a reboot. -## v1.2 - 2016-06-22 +## v1.2 + +*2016-06-22* * The forced NKRO mode can be easily toggled off at compile-time, to make the firmware compatible with [certain operating systems](#using-on-windows). * The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. @@ -187,7 +226,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. * The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. -## v1.1 - 2016-06-14 +## v1.1 + +*2016-06-14* * The keyboard starts in NKRO mode, bootmagic and other things are disabled. * A [Steno](#steno-layer) layer was added, to be used with Plover. @@ -201,7 +242,9 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the - `:` now inputs `;` when shifted. * `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers. -## v1.0 - 2016-05-26 +## v1.0 + +*2016-05-26* Initial version. diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json deleted file mode 100644 index 544f61ce8..000000000 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-adore-layout.json +++ /dev/null @@ -1,533 +0,0 @@ -[ - { - "backcolor": "#ffffff", - "name": "ErgoDox - algernon's layout: Heatmap", - "author": "Gergely Nagy ", - "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", - "switchMount": "cherry", - "switchBrand": "gateron", - "switchType": "KS-3-Tea", - "pcb": true, - "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" - }, - [ - { - "x": 3.5, - "c": "#a7d0db", - "fa": [ - 0, - 0, - 2 - ] - }, - "#\n3\nF3", - { - "x": 10.5, - "c": "#a7d0db", - "t": "#000000", - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - }, - "*\n8\nF8" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "@\n2\nF2", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "$\n4\nF4", - { - "x": 8.5 - }, - "&\n7\nF7", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "(\n9\nF9" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "%\n5\nF5", - { - "c": "#f9cd31", - "a": 7, - "f": 2 - }, - "STENO", - { - "x": 4.5, - "f": 6 - }, - "", - { - "c": "#7adabd", - "a": 4, - "f": 3, - "fa": [ - 0, - 0, - 2 - ] - }, - "^\n6\nF6" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "f": 3, - "w": 1.5 - }, - "\n\n~\n`", - { - "t": "#0d0d0b" - }, - "!\n1\nF1", - { - "x": 14.5 - }, - ")\n0\nF10", - { - "a": 7, - "w": 1.5 - }, - "F11" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 6 - }, - "L", - { - "x": 10.5 - }, - "C" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", - "a": 4 - }, - ">\n.", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "a": 6 - }, - "W", - { - "x": 8.5 - }, - "H", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "P" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "M", - { - "c": "#93c9b7", - "a": 4, - "h": 1.5 - }, - "{\n[", - { - "x": 4.5, - "h": 1.5 - }, - "}\n]", - { - "c": "#7adabd", - "a": 6 - }, - "F" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", - "f": 6, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "a": 4, - "f": 3 - }, - "<\n,", - { - "x": 14.5, - "a": 6 - }, - "Y", - { - "a": 4, - "w": 1.5 - }, - "|\n\\" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 6 - }, - "E", - { - "x": 10.5 - }, - "T" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "O", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "n": true - }, - "I", - { - "x": 8.5, - "n": true - }, - "R", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "N" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "U", - { - "x": 6.5 - }, - "D" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", - "fa": [ - 6 - ], - "w": 1.5 - }, - "\n\nTab", - { - "f": 3 - }, - "A", - { - "x": 14.5, - "f": 3 - }, - "S", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 6 - ], - "w": 1.5 - }, - "+\n=" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#93c9b7", - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "(", - { - "x": 4.5, - "h": 1.5 - }, - ")" - ], - [ - { - "y": -0.75, - "x": 3.5, - "c": "#a7d0db", - "a": 4, - "f": 3 - }, - "\"\n'", - { - "x": 10.5 - }, - "V" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "Z", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "K", - { - "x": 8.5 - }, - "G", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "J" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "X", - { - "x": 6.5 - }, - "B" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "f": 9, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "t": "#0d0d0b", - "a": 4, - "f": 3 - }, - "?\n/", - { - "x": 14.5, - "a": 6 - }, - "Q", - { - "c": "#ffb07b", - "t": "#000000", - "f": 9, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#d9dae0", - "g": true, - "a": 7, - "f": 3 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "", - { - "x": 1, - "c": "#d4872a", - "g": false, - "a": 5 - }, - ";\n:", - { - "x": 8.5 - }, - "_\n-", - { - "x": 1, - "c": "#d9dae0", - "g": true, - "a": 7 - }, - "" - ], - [ - { - "y": -0.75, - "x": 0.5 - }, - "", - {}, - "", - { - "x": 14.5 - }, - "", - {}, - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#f9cd31", - "g": false - }, - "Alt", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 9 - ] - }, - "\n\n\n" - ], - [ - { - "c": "#d4872a", - "a": 7, - "f": 9, - "h": 2 - }, - "", - { - "h": 2 - }, - "", - { - "c": "#f9cd31", - "f": 3 - }, - "Ctrl" - ], - [ - { - "x": 2, - "c": "#e26757" - }, - "ESC" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "MEDIA", - {}, - "1HAND" - ], - [ - { - "x": -3 - }, - "LEAD", - { - "c": "#d4872a", - "f": 9, - "h": 2 - }, - "", - { - "f": 3, - "h": 2 - }, - "SPC" - ], - [ - { - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "HUN" - ] -] diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json deleted file mode 100644 index 148bb1f23..000000000 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-base-layout.json +++ /dev/null @@ -1,533 +0,0 @@ -[ - { - "backcolor": "#ffffff", - "name": "ErgoDox - algernon's layout: Heatmap", - "author": "Gergely Nagy ", - "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", - "switchMount": "cherry", - "switchBrand": "gateron", - "switchType": "KS-3-Tea", - "pcb": true, - "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" - }, - [ - { - "x": 3.5, - "c": "#a7d0db", - "fa": [ - 0, - 0, - 2 - ] - }, - "#\n3\nF3", - { - "x": 10.5, - "c": "#a7d0db", - "t": "#000000", - "a": 4, - "fa": [ - 0, - 0, - 2 - ] - }, - "*\n8\nF8" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "@\n2\nF2", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "$\n4\nF4", - { - "x": 8.5 - }, - "&\n7\nF7", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "(\n9\nF9" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "%\n5\nF5", - { - "c": "#f9cd31", - "a": 7, - "f": 2 - }, - "STENO", - { - "x": 4.5, - "f": 6 - }, - "", - { - "c": "#7adabd", - "a": 4, - "f": 3, - "fa": [ - 0, - 0, - 2 - ] - }, - "^\n6\nF6" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "f": 3, - "w": 1.5 - }, - "\n\n~\n`", - { - "t": "#0d0d0b" - }, - "!\n1\nF1", - { - "x": 14.5 - }, - ")\n0\nF10", - { - "a": 7, - "w": 1.5 - }, - "F11" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 4 - }, - ">\n.", - { - "x": 10.5, - "a": 6 - }, - "C" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", - "a": 4 - }, - "<\n,", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "a": 6 - }, - "P", - { - "x": 8.5 - }, - "G", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "R" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "Y", - { - "c": "#93c9b7", - "a": 4, - "h": 1.5 - }, - "{\n[", - { - "x": 4.5, - "h": 1.5 - }, - "}\n]", - { - "c": "#7adabd", - "a": 6 - }, - "F" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", - "f": 6, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "a": 4, - "f": 3 - }, - "\"\n'", - { - "x": 14.5, - "a": 6 - }, - "L", - { - "a": 4, - "w": 1.5 - }, - "|\n\\" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#a7d0db", - "t": "#000000", - "a": 6 - }, - "E", - { - "x": 10.5 - }, - "T" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "O", - { - "x": 1, - "c": "#7adabd", - "t": "#000000", - "n": true - }, - "U", - { - "x": 8.5, - "n": true - }, - "H", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "N" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "I", - { - "x": 6.5 - }, - "D" - ], - [ - { - "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", - "fa": [ - 6 - ], - "w": 1.5 - }, - "\n\nTab", - { - "f": 3 - }, - "A", - { - "x": 14.5, - "f": 3 - }, - "S", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 0, - 0, - 0, - 0, - 6 - ], - "w": 1.5 - }, - "+\n=" - ], - [ - { - "y": -0.625, - "x": 6.5, - "c": "#93c9b7", - "t": "#000000", - "a": 7, - "h": 1.5 - }, - "(", - { - "x": 4.5, - "h": 1.5 - }, - ")" - ], - [ - { - "y": -0.75, - "x": 3.5, - "c": "#a7d0db", - "a": 6 - }, - "J", - { - "x": 10.5 - }, - "W" - ], - [ - { - "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "Q", - { - "x": 1, - "c": "#7adabd", - "t": "#000000" - }, - "K", - { - "x": 8.5 - }, - "M", - { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" - }, - "V" - ], - [ - { - "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" - }, - "X", - { - "x": 6.5 - }, - "B" - ], - [ - { - "y": -0.875, - "c": "#ffb07b", - "f": 9, - "w": 1.5 - }, - "\n\n", - { - "c": "#ffb2d2", - "t": "#0d0d0b", - "a": 4, - "f": 3 - }, - "?\n/", - { - "x": 14.5, - "a": 6 - }, - "Z", - { - "c": "#ffb07b", - "t": "#000000", - "f": 9, - "w": 1.5 - }, - "" - ], - [ - { - "y": -0.375, - "x": 3.5, - "c": "#d9dae0", - "g": true, - "a": 7, - "f": 3 - }, - "", - { - "x": 10.5 - }, - "" - ], - [ - { - "y": -0.875, - "x": 2.5 - }, - "", - { - "x": 1, - "c": "#d4872a", - "g": false, - "a": 5 - }, - ";\n:", - { - "x": 8.5 - }, - "_\n-", - { - "x": 1, - "c": "#d9dae0", - "g": true, - "a": 7 - }, - "" - ], - [ - { - "y": -0.75, - "x": 0.5 - }, - "", - {}, - "", - { - "x": 14.5 - }, - "", - {}, - "" - ], - [ - { - "r": 30, - "rx": 6.5, - "ry": 4.25, - "y": -1, - "x": 1, - "c": "#f9cd31", - "g": false - }, - "Alt", - { - "a": 4, - "fa": [ - 0, - 0, - 0, - 9 - ] - }, - "\n\n\n" - ], - [ - { - "c": "#d4872a", - "a": 7, - "f": 9, - "h": 2 - }, - "", - { - "h": 2 - }, - "", - { - "c": "#f9cd31", - "f": 3 - }, - "Ctrl" - ], - [ - { - "x": 2, - "c": "#e26757" - }, - "ESC" - ], - [ - { - "r": -30, - "rx": 13, - "y": -1, - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "MEDIA", - {}, - "1HAND" - ], - [ - { - "x": -3 - }, - "LEAD", - { - "c": "#d4872a", - "f": 9, - "h": 2 - }, - "", - { - "f": 3, - "h": 2 - }, - "SPC" - ], - [ - { - "x": -3, - "c": "#f9cd31", - "f": 2 - }, - "HUN" - ] -] diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json new file mode 100644 index 000000000..4dfa877a7 --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json @@ -0,0 +1,553 @@ +[ + { + "backcolor": "#ffffff", + "name": "ErgoDox - algernon's layout: Heatmap", + "author": "Gergely Nagy ", + "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", + "switchMount": "cherry", + "switchBrand": "gateron", + "switchType": "KS-3-Tea", + "pcb": true, + "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" + }, + [ + { + "x": 3.5, + "c": "#a7d0db", + "fa": [ + 0, + 0, + 2 + ] + }, + "#\n3\nF3", + { + "x": 10.5, + "c": "#a7d0db", + "t": "#000000", + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + }, + "*\n8\nF8" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "@\n2\nF2", + { + "x": 1, + "c": "#7adabd", + "t": "#000000" + }, + "$\n4\nF4", + { + "x": 8.5 + }, + "&\n7\nF7", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "(\n9\nF9" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "%\n5\nF5", + { + "c": "#f9cd31", + "a": 7, + "f": 2 + }, + "STENO", + { + "x": 4.5, + "f": 3 + }, + "F12", + { + "c": "#7adabd", + "a": 4, + "f": 3, + "fa": [ + 0, + 0, + 2 + ] + }, + "^\n6\nF6" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "f": 9, + "a": 6, + "w": 1.5 + }, + "\n\n", + { + "t": "#0d0d0b", + "f": 3, + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + }, + "!\n1\nF1", + { + "x": 14.5 + }, + ")\n0\nF10", + { + "a": 7, + "w": 1.5 + }, + "F11" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 6 + }, + "G", + { + "x": 10.5 + }, + "C" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b", + "a": 6 + }, + "W", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "a": 6 + }, + "L", + { + "x": 8.5 + }, + "H", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "P" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "M", + { + "c": "#93c9b7", + "a": 4, + "fa": [0, 0, 0], + "h": 1.5 + }, + "{\n(\n[", + { + "x": 4.5, + "h": 1.5 + }, + "}\n)\n]", + { + "c": "#7adabd", + "a": 6 + }, + "F" + ], + [ + { + "y": -0.875, + "c": "#ffb07b", + "t": "#0d0d0b", + "f": 3, + "a": 4, + "w": 1.5 + }, + "\n\n~\n`", + { + "c": "#ffb2d2", + "a": 6, + "f": 3 + }, + "Y", + { + "x": 14.5, + "a": 6 + }, + "X", + { + "a": 4, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 6 + }, + "E", + { + "x": 10.5 + }, + "T" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "O", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "n": true + }, + "I", + { + "x": 8.5, + "n": true + }, + "R", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "N" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "U", + { + "x": 6.5 + }, + "D" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "t": "#0d0d0b", + "fa": [ + 6 + ], + "w": 1.5 + }, + "\n\nTab", + { + "f": 3 + }, + "A", + { + "x": 14.5, + "f": 3 + }, + "S", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6 + ], + "w": 1.5 + }, + "+\n=" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#93c9b7", + "t": "#000000", + "h": 1.5 + }, + ";\n:", + { + "x": 4.5, + "h": 1.5 + }, + "_\n-" + ], + [ + { + "y": -0.75, + "x": 3.5, + "c": "#a7d0db", + "a": 4, + "f": 3 + }, + "\"\n'", + { + "x": 10.5, + "a": 6, + "f": 3 + }, + "V" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b", + "a": 6 + }, + "Q", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "a": 4 + }, + "<\n,", + { + "x": 8.5, + "a": 6 + }, + "K", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "J" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000", + "a": 4 + }, + ">\n.", + { + "x": 6.5, + "a": 6 + }, + "B" + ], + [ + { + "y": -0.875, + "c": "#ffb07b", + "f": 9, + "w": 1.5, + "g": true + }, + "", + { + "c": "#ffb2d2", + "t": "#0d0d0b", + "a": 6, + "f": 3, + "g": false + }, + "Z", + { + "x": 14.5, + "a": 4 + }, + "?\n/", + { + "c": "#ffb07b", + "t": "#000000", + "f": 9, + "g": true, + "w": 1.5, + "a": 4 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#d9dae0", + "g": true, + "a": 7, + "f": 3 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "", + { + "x": 1, + "c": "#d4872a", + "g": true, + "a": 5 + }, + "", + { + "x": 8.5 + }, + "", + { + "x": 1, + "c": "#d9dae0", + "g": true, + "a": 7 + }, + "" + ], + [ + { + "y": -0.75, + "x": 0.5 + }, + "", + {}, + "", + { + "x": 14.5 + }, + "", + {}, + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#f9cd31", + "g": false + }, + "Alt", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 9 + ] + }, + "\n\n\n" + ], + [ + { + "c": "#d4872a", + "a": 7, + "f": 9, + "h": 2 + }, + "", + { + "h": 2 + }, + "", + { + "c": "#f9cd31", + "f": 3 + }, + "Ctrl" + ], + [ + { + "x": 2, + "c": "#e26757" + }, + "ESC" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3, + "c": "#f9cd31", + "f": 2 + }, + "MEDIA", + {}, + "DEL" + ], + [ + { + "x": -3 + }, + "HUN", + { + "c": "#d4872a", + "f": 9, + "h": 2 + }, + "", + { + "f": 3, + "h": 2 + }, + "SPC" + ], + [ + { + "x": -3, + "c": "#f9cd31", + "f": 2 + }, + "LEAD" + ] +] diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json new file mode 100644 index 000000000..1248d36af --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json @@ -0,0 +1,542 @@ +[ + { + "backcolor": "#ffffff", + "name": "ErgoDox - algernon's layout: Heatmap", + "author": "Gergely Nagy ", + "notes": "See [here](https://github.com/algernon/ergodox-layout#readme) for the QMK keymap source.", + "switchMount": "cherry", + "switchBrand": "gateron", + "switchType": "KS-3-Tea", + "pcb": true, + "css": ".keyborder { -webkit-filter: blur(5px); filter: blur(5px); } .keytop { -webkit-filter: blur(10px); } .keylabels { border: 1px solid black; }" + }, + [ + { + "x": 3.5, + "c": "#a7d0db", + "fa": [ + 0, + 0, + 2 + ] + }, + "#\n3\nF3", + { + "x": 10.5, + "c": "#a7d0db", + "t": "#000000", + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + }, + "*\n8\nF8" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "@\n2\nF2", + { + "x": 1, + "c": "#7adabd", + "t": "#000000" + }, + "$\n4\nF4", + { + "x": 8.5 + }, + "&\n7\nF7", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "(\n9\nF9" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "%\n5\nF5", + { + "c": "#f9cd31", + "a": 7, + "f": 2 + }, + "STENO", + { + "x": 4.5, + "f": 3 + }, + "F12", + { + "c": "#7adabd", + "a": 4, + "f": 3, + "fa": [ + 0, + 0, + 2 + ] + }, + "^\n6\nF6" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "f": 6, + "a": 6, + "w": 1.5 + }, + "\n\n", + { + "f": 3, + "t": "#0d0d0b", + "a": 4, + "fa": [ + 0, + 0, + 2 + ] + + }, + "!\n1\nF1", + { + "x": 14.5 + }, + ")\n0\nF10", + { + "a": 7, + "w": 1.5 + }, + "F11" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 4 + }, + ">\n.", + { + "x": 10.5, + "a": 6 + }, + "C" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b", + "a": 4 + }, + "<\n,", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "a": 6 + }, + "P", + { + "x": 8.5 + }, + "G", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "R" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "Y", + { + "c": "#93c9b7", + "a": 4, + "h": 1.5 + }, + "{\n(\n[", + { + "x": 4.5, + "h": 1.5 + }, + "}\n)\n]", + { + "c": "#7adabd", + "a": 6 + }, + "F" + ], + [ + { + "y": -0.875, + "c": "#ffb07b", + "t": "#0d0d0b", + "f": 3, + "w": 1.5 + }, + "\n\n~\n`", + { + "c": "#ffb2d2", + "a": 4, + "f": 3 + }, + "\"\n'", + { + "x": 14.5, + "a": 6 + }, + "L", + { + "a": 4, + "w": 1.5 + }, + "|\n\\" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#a7d0db", + "t": "#000000", + "a": 6 + }, + "E", + { + "x": 10.5 + }, + "T" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "O", + { + "x": 1, + "c": "#7adabd", + "t": "#000000", + "n": true + }, + "U", + { + "x": 8.5, + "n": true + }, + "H", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "N" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "I", + { + "x": 6.5 + }, + "D" + ], + [ + { + "y": -0.875, + "c": "#ffb2d2", + "t": "#0d0d0b", + "fa": [ + 6 + ], + "w": 1.5 + }, + "\n\nTab", + { + "f": 3 + }, + "A", + { + "x": 14.5, + "f": 3 + }, + "S", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 0, + 0, + 0, + 0, + 6 + ], + "w": 1.5 + }, + "+\n=" + ], + [ + { + "y": -0.625, + "x": 6.5, + "c": "#93c9b7", + "t": "#000000", + "a": 7, + "h": 1.5 + }, + "(", + { + "x": 4.5, + "h": 1.5 + }, + ")" + ], + [ + { + "y": -0.75, + "x": 3.5, + "c": "#a7d0db", + "a": 6 + }, + "J", + { + "x": 10.5 + }, + "W" + ], + [ + { + "y": -0.875, + "x": 2.5, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "Q", + { + "x": 1, + "c": "#7adabd", + "t": "#000000" + }, + "K", + { + "x": 8.5 + }, + "M", + { + "x": 1, + "c": "#bfbad1", + "t": "#0d0d0b" + }, + "V" + ], + [ + { + "y": -0.875, + "x": 5.5, + "c": "#7adabd", + "t": "#000000" + }, + "X", + { + "x": 6.5 + }, + "B" + ], + [ + { + "y": -0.875, + "c": "#ffb07b", + "f": 9, + "w": 1.5 + }, + "\n\n", + { + "c": "#ffb2d2", + "t": "#0d0d0b", + "a": 4, + "f": 3 + }, + "?\n/", + { + "x": 14.5, + "a": 6 + }, + "Z", + { + "c": "#ffb07b", + "t": "#000000", + "f": 9, + "w": 1.5 + }, + "" + ], + [ + { + "y": -0.375, + "x": 3.5, + "c": "#d9dae0", + "g": true, + "a": 7, + "f": 3 + }, + "", + { + "x": 10.5 + }, + "" + ], + [ + { + "y": -0.875, + "x": 2.5 + }, + "", + { + "x": 1, + "c": "#d4872a", + "g": false, + "a": 5 + }, + ";\n:", + { + "x": 8.5 + }, + "_\n-", + { + "x": 1, + "c": "#d9dae0", + "g": true, + "a": 7 + }, + "" + ], + [ + { + "y": -0.75, + "x": 0.5 + }, + "", + {}, + "", + { + "x": 14.5 + }, + "", + {}, + "" + ], + [ + { + "r": 30, + "rx": 6.5, + "ry": 4.25, + "y": -1, + "x": 1, + "c": "#f9cd31", + "g": false + }, + "Alt", + { + "a": 4, + "fa": [ + 0, + 0, + 0, + 9 + ] + }, + "\n\n\n" + ], + [ + { + "c": "#d4872a", + "a": 7, + "f": 9, + "h": 2 + }, + "", + { + "h": 2 + }, + "", + { + "c": "#f9cd31", + "f": 3 + }, + "Ctrl" + ], + [ + { + "x": 2, + "c": "#e26757" + }, + "ESC" + ], + [ + { + "r": -30, + "rx": 13, + "y": -1, + "x": -3, + "c": "#f9cd31", + "f": 2 + }, + "MEDIA", + {}, + "DEL" + ], + [ + { + "x": -3 + }, + "LEAD", + { + "c": "#d4872a", + "f": 9, + "h": 2 + }, + "", + { + "f": 3, + "h": 2 + }, + "SPC" + ], + [ + { + "x": -3, + "c": "#f9cd31", + "f": 2 + }, + "HUN" + ] +] diff --git a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py index a13d12e81..68585843b 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py +++ b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py @@ -3,143 +3,247 @@ import json import os import sys import re +import argparse from math import floor +from os.path import dirname + +class Heatmap(object): + coords = [ + [ + # Row 0 + [ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2], + [ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6], + ], + [ + # Row 1 + [ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2], + [ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6], + ], + [ + # Row 2 + [12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ], + [ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6], + ], + [ + # Row 3 + [17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0], + [13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6], + ], + [ + # Row 4 + [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], + [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], + ], + [ + # Row 5 + [ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2], + [24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ], + ], + ] + + def set_attr_at(self, block, n, attr, fn, val): + blk = self.heatmap[block][n] + if attr in blk: + blk[attr] = fn(blk[attr], val) + else: + blk[attr] = fn(None, val) + + def coord(self, col, row): + return self.coords[row][col] + + @staticmethod + def set_attr(orig, new): + return new + + def set_bg(self, (block, n), color): + self.set_attr_at(block, n, "c", self.set_attr, color) + #self.set_attr_at(block, n, "g", self.set_attr, False) + + def set_tap_info(self, (block, n), count, cap): + def _set_tap_info(o, _count, _cap): + ns = 4 - o.count ("\n") + return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100) + + if not cap: + cap = 1 + self.heatmap[block][n + 1] = _set_tap_info (self.heatmap[block][n + 1], count, cap) + + @staticmethod + def heatmap_color (v): + colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]] + fb = 0 + if v <= 0: + idx1, idx2 = 0, 0 + elif v >= 1: + idx1, idx2 = len(colors) - 1, len(colors) - 1 + else: + val = v * (len(colors) - 1) + idx1 = int(floor(val)) + idx2 = idx1 + 1 + fb = val - float(idx1) + + r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0] + g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1] + b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2] + + r, g, b = [x * 255 for x in r, g, b] + return "#%02x%02x%02x" % (r, g, b) + + def __init__(self, layout): + self.log = {} + self.total = 0 + self.max_cnt = 0 + self.layout = layout + + def update_log(self, (c, r)): + if not (c, r) in self.log: + self.log[(c, r)] = 0 + self.log[(c, r)] = self.log[(c, r)] + 1 + self.total = self.total + 1 + if self.max_cnt < self.log[(c, r)]: + self.max_cnt = self.log[(c, r)] + + def get_heatmap(self): + with open("%s/heatmap-layout.%s.json" % (dirname(sys.argv[0]), self.layout), "r") as f: + self.heatmap = json.load (f) + + ## Reset colors + for row in self.coords: + for coord in row: + if coord != []: + self.set_bg (coord, "#d9dae0") + + for (c, r) in self.log: + coords = self.coord(c, r) + b, n = coords + cap = self.max_cnt + if cap == 0: + cap = 1 + v = float(self.log[(c, r)]) / cap + self.set_bg (coords, self.heatmap_color (v)) + self.set_tap_info (coords, self.log[(c, r)], self.total) + return self.heatmap + + def get_stats(self): + usage = [ + # left hand + [0, 0, 0, 0, 0], + # right hand + [0, 0, 0, 0, 0] + ] + finger_map = [0, 0, 1, 2, 3, 4, 4] + for (c, r) in self.log: + if r == 5: # thumb cluster + if c <= 6: # left side + usage[0][4] = usage[0][4] + self.log[(c, r)] + else: + usage[1][4] = usage[1][4] + self.log[(c, r)] + else: + fc = c + hand = 0 + if fc >= 7: + fc = fc - 7 + hand = 1 + fm = finger_map[fc] + usage[hand][fm] = usage[hand][fm] + self.log[(c, r)] + hand_usage = [0, 0] + for f in usage[0]: + hand_usage[0] = hand_usage[0] + f + for f in usage[1]: + hand_usage[1] = hand_usage[1] + f + + total = self.total + if total == 0: + total = 1 + stats = { + "hands": { + "left": { + "usage": float(hand_usage[0]) / total * 100, + "fingers": { + "0 - pinky": 0, + "1 - ring": 0, + "2 - middle": 0, + "3 - index": 0, + "4 - thumb": 0, + } + }, + "right": { + "usage": float(hand_usage[1]) / total * 100, + "fingers": { + "0 - thumb": 0, + "1 - index": 0, + "2 - middle": 0, + "3 - ring": 0, + "4 - pinky": 0, + } + }, + } + } + + hmap = ['left', 'right'] + fmap = ['0 - pinky', '1 - ring', '2 - middle', '3 - index', '4 - thumb', + '0 - thumb', '1 - index', '2 - middle', '3 - ring', '4 - pinky'] + for hand_idx in range(len(usage)): + hand = usage[hand_idx] + for finger_idx in range(len(hand)): + stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = float(hand[finger_idx]) / total * 100 + return stats + +def dump_all(out_dir, heatmaps): + for layer in heatmaps.keys(): + if len(heatmaps[layer].log) == 0: + continue -cr_coord_map = [ - [ - # Row 0 - [ 4, 0], [ 4, 2], [ 2, 0], [ 1, 0], [ 2, 2], [ 3, 0], [ 3, 2], - [ 3, 4], [ 3, 6], [ 2, 4], [ 1, 2], [ 2, 6], [ 4, 4], [ 4, 6], - ], - [ - # Row 1 - [ 8, 0], [ 8, 2], [ 6, 0], [ 5, 0], [ 6, 2], [ 7, 0], [ 7, 2], - [ 7, 4], [ 7, 6], [ 6, 4], [ 5, 2], [ 6, 6], [ 8, 4], [ 8, 6], - ], - [ - # Row 2 - [12, 0], [12, 2], [10, 0], [ 9, 0], [10, 2], [11, 0], [ ], - [ ], [11, 2], [10, 4], [ 9, 2], [10, 6], [12, 4], [12, 6], - ], - [ - # Row 3 - [17, 0], [17, 2], [15, 0], [14, 0], [15, 2], [16, 0], [13, 0], - [13, 2], [16, 2], [15, 4], [14, 2], [15, 6], [17, 4], [17, 6], - ], - [ - # Row 4 - [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], - [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], - ], - [ - # Row 5 - [ ], [23, 0], [22, 2], [22, 0], [22, 4], [21, 0], [21, 2], - [24, 0], [24, 2], [25, 0], [25, 4], [25, 2], [26, 0], [ ], - ], -] - -def set_attr_at(j, b, n, attr, fn, val): - blk = j[b][n] - if attr in blk: - blk[attr] = fn(blk[attr], val) - else: - blk[attr] = fn(None, val) - -def coord(col, row): - return cr_coord_map[row][col] - -def set_attr(orig, new): - return new - -def set_bg(j, (b, n), color): - set_attr_at(j, b, n, "c", set_attr, color) - #set_attr_at(j, b, n, "g", set_attr, False) - -def _set_tap_info(o, count, cap): - ns = 4 - o.count ("\n") - return o + "\n" * ns + "%.02f%%" % (float(count) / float(cap) * 100) - -def set_tap_info(j, (b, n), count, cap): - j[b][n + 1] = _set_tap_info (j[b][n + 1], count, cap) - -def heatmap_color (v): - colors = [ [0.3, 0.3, 1], [0.3, 1, 0.3], [1, 1, 0.3], [1, 0.3, 0.3]] - fb = 0 - if v <= 0: - idx1, idx2 = 0, 0 - elif v >= 1: - idx1, idx2 = len(colors) - 1, len(colors) - 1 - else: - val = v * (len(colors) - 1) - idx1 = int(floor(val)) - idx2 = idx1 + 1 - fb = val - float(idx1) - - r = (colors[idx2][0] - colors[idx1][0]) * fb + colors[idx1][0] - g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1] - b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2] - - r, g, b = [x * 255 for x in r, g, b] - return "#%02x%02x%02x" % (r, g, b) - -# Load the keylog -def load_keylog(fname, restrict_row): - keylog = {} - total = 0 - with open(fname, "r") as f: - lines = f.readlines() - for line in lines: - m = re.search ('KL: col=(\d+), row=(\d+)', line) + with open ("%s/%s.json" % (out_dir, layer), "w") as f: + json.dump(heatmaps[layer].get_heatmap(), f) + print >>sys.stderr, "%s stats:" % (layer) + json.dump (heatmaps[layer].get_stats(), sys.stderr, + indent = 4, sort_keys = True) + print >>sys.stderr, "" + print >>sys.stderr, "" + +def main(opts): + + heatmaps = {"Dvorak": Heatmap("Dvorak"), + "ADORE": Heatmap("ADORE") + } + cnt = 0 + restrict_row = opts.restrict_row + out_dir = opts.outdir + + while True: + line = sys.stdin.readline() + if not line: + break + m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) if not m: continue - (c, r) = (int(m.group (2)), int(m.group (1))) - if restrict_row != None and r != int(restrict_row): + + cnt = cnt + 1 + (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4)) + if restrict_row != -1 and r != restrict_row: + continue + if c in opts.ignore_columns: continue - if (c, r) in keylog: - keylog[(c, r)] = keylog[(c, r)] + 1 - else: - keylog[(c, r)] = 1 - total = total + 1 - return total / 2, keylog - -def l_flat(s): - f = s.split("\n") - return ", ".join (f) - -def main(base_fn, log_fn, restrict_row = None): - - with open(base_fn, "r") as f: - layout = json.load (f) - - ## Reset colors - for row in cr_coord_map: - for col in row: - if col != []: - set_bg (layout, col, "#d9dae0") - #set_attr_at (layout, col[0], col[1], "g", set_attr, True) - - total, log = load_keylog (log_fn, restrict_row) - max_cnt = 0 - for (c, r) in log: - max_cnt = max(max_cnt, log[(c, r)]) - - # Create the heatmap - for (c, r) in log: - coords = coord(c, r) - b, n = coords - cap = max_cnt - v = float(log[(c, r)]) / cap - print >> sys.stderr, "%s => %d/%d => %f = %s" % (l_flat(layout[b][n+1]), log[(c,r)], cap, v, heatmap_color(v)) - set_bg (layout, coord(c, r), heatmap_color (v)) - set_tap_info (layout, coord (c, r), log[(c, r)], total) - - print json.dumps(layout) -if __name__ == "__main__": - if len(sys.argv) < 3: - print """Log to Heatmap -- creates a heatmap out of keyboard logs + heatmaps[l].update_log ((c, r)) + + if opts.dump_interval != -1 and cnt >= opts.dump_interval: + cnt = 0 + dump_all(out_dir, heatmaps) -Usage: log-to-heatmap.py base-layout.json logfile [row] >layout.json""" - sys.exit (1) - main(*sys.argv[1:]) + dump_all (out_dir, heatmaps) + +if __name__ == "__main__": + parser = argparse.ArgumentParser (description = "keylog to heatmap processor") + parser.add_argument ('outdir', action = 'store', + help = 'Output directory') + parser.add_argument ('--row', dest = 'restrict_row', action = 'store', type = int, + default = -1, help = 'Restrict processing to this row only') + parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int, + default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only') + parser.add_argument ('--ignore-column', dest = 'ignore_columns', action = 'append', type = int, + default = [], help = 'Ignore the specified columns') + args = parser.parse_args() + main(args) -- cgit v1.2.3 From 9778349c4bfb6723ef056eb3473a7fc15c45c435 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Wed, 24 Aug 2016 17:47:01 -0400 Subject: More notes --- keyboards/planck/keymaps/cbbrowne/readme.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index fdb099700..5af688bb1 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -67,12 +67,13 @@ doing sundry experimentation: * I use tmux quite a lot; the mollat keymap seems to have some interesting helpers. It might be interesting to add a "tmux - layer" + layer," or to have a few keys in a layer oriented towards that * The mollat tmux layer also suggests some thoughts about Emacs helpers. * I do not presently have anything that handles X11 screen switching, as with Control-Alt-various * I ought to probably look into KC_LEAD, to have some key combos that do not need to be concurrent - - + * The jeebak keymap seems to have some neat ideas: + - Number layer which is aggressive about having numbers in several places + - Touch layer seems interesting -- cgit v1.2.3 From fb8365a378b9393164d31b1dea42c95a9543f761 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Thu, 25 Aug 2016 23:28:10 +0300 Subject: Split vision_division into Makefile/rules.mk --- keyboards/vision_division/Makefile | 77 +------------------------------------- keyboards/vision_division/rules.mk | 70 ++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 75 deletions(-) create mode 100644 keyboards/vision_division/rules.mk (limited to 'keyboards') diff --git a/keyboards/vision_division/Makefile b/keyboards/vision_division/Makefile index 4f3130c48..4e2a6f00f 100644 --- a/keyboards/vision_division/Makefile +++ b/keyboards/vision_division/Makefile @@ -1,76 +1,3 @@ - - -# MCU name -MCU = at90usb1286 -# MCU = at90usb1287 -# MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=1024 - - -# Build Options -# change yes to no to disable -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -NKRO_ENABLE ?= yes # USB Nkey Rollover -BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= no # Unicode -BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID -AUDIO_ENABLE ?= no # Audio output on port C6 - -ifndef QUANTUM_DIR +ifndef MAKEFILE_INCLUDED include ../../Makefile -endif - - +endif \ No newline at end of file diff --git a/keyboards/vision_division/rules.mk b/keyboards/vision_division/rules.mk new file mode 100644 index 000000000..063fba29b --- /dev/null +++ b/keyboards/vision_division/rules.mk @@ -0,0 +1,70 @@ + + +# MCU name +MCU = at90usb1286 +# MCU = at90usb1287 +# MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=1024 + + +# Build Options +# change yes to no to disable +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend +# if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +NKRO_ENABLE ?= yes # USB Nkey Rollover +BACKLIGHT_ENABLE ?= no # Enable keyboard backlight functionality on B7 by default +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID +AUDIO_ENABLE ?= no # Audio output on port C6 \ No newline at end of file -- cgit v1.2.3 From 6cfdd077b5bcdcfe8b390e4c07965eaf6c081c76 Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Fri, 26 Aug 2016 00:05:58 +0300 Subject: Fix bad merge Led should have been added to KC60, not GH60 --- keyboards/gh60/rules.mk | 3 --- keyboards/kc60/rules.mk | 3 ++- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/gh60/rules.mk b/keyboards/gh60/rules.mk index b3c5c7271..aba680e45 100644 --- a/keyboards/gh60/rules.mk +++ b/keyboards/gh60/rules.mk @@ -1,6 +1,3 @@ -# project specific files -SRC = led.c - # MCU name #MCU = at90usb1287 MCU = atmega32u4 diff --git a/keyboards/kc60/rules.mk b/keyboards/kc60/rules.mk index 4efd6f988..a935ed19e 100644 --- a/keyboards/kc60/rules.mk +++ b/keyboards/kc60/rules.mk @@ -1,4 +1,5 @@ - +# project specific files +SRC = led.c # MCU name #MCU = at90usb1287 -- cgit v1.2.3 From 3f0e1b3a8ea2e8013a77a8ce948d2f69bbdcd869 Mon Sep 17 00:00:00 2001 From: zs Date: Thu, 25 Aug 2016 20:56:15 +0200 Subject: Correct typo in kc60 workman-dead keymap and rename README.md to readme.md --- keyboards/kc60/keymaps/workman-dead/README.md | 17 ----------------- keyboards/kc60/keymaps/workman-dead/keymap.c | 8 ++++---- keyboards/kc60/keymaps/workman-dead/readme.md | 17 +++++++++++++++++ 3 files changed, 21 insertions(+), 21 deletions(-) delete mode 100644 keyboards/kc60/keymaps/workman-dead/README.md create mode 100644 keyboards/kc60/keymaps/workman-dead/readme.md (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/workman-dead/README.md b/keyboards/kc60/keymaps/workman-dead/README.md deleted file mode 100644 index f1fcdc960..000000000 --- a/keyboards/kc60/keymaps/workman-dead/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Workman dead with spacefn (kc60 @ QMK) - -## Layout reference -![workman dead with spacefn](./kc60-wm-dead.png) - -## Build - -To build this keymap, simply run `make KEYMAP=workman-dead`. - -## Notes - -* the default layout is `workman` (try it out, it's awesome!), but it can be changed to `qwerty` with the `rebel` key (the function layer won't change though) -* `comma` acts as a dead key, that means tapping/holding it will activate the **oneshot** `dead key` layer (marked red in the reference) -* hold `space` to access the `function` layer (marked blue in the reference) -* hold `tab` to activate the mouse layer -* the `function` layer contains mostly osx specific shortcuts -* on the right side of the bottom row `alt` and `super` are switched compared to a standard layout diff --git a/keyboards/kc60/keymaps/workman-dead/keymap.c b/keyboards/kc60/keymaps/workman-dead/keymap.c index 9786e37d8..9e3b9bb65 100644 --- a/keyboards/kc60/keymaps/workman-dead/keymap.c +++ b/keyboards/kc60/keymaps/workman-dead/keymap.c @@ -56,7 +56,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TABM, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_LBRC, KC_RBRC, KC_BSLS, \ KC_LCTL, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT, _______, KC_ENT, \ KC_LSFT, _______, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DK_ACT, KC_DOT, KC_SLSH, _______, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, KC_NO, KC_RALT, KC_RGUI, KC_RCTL, KC_DFQW), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, _______, KC_RALT, KC_RGUI, KC_RCTL, KC_DFQW), // QWERTY /* @@ -77,7 +77,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TABM, 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_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, DK_ACT, KC_DOT, KC_SLSH, _______, KC_RSFT, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, KC_NO, KC_RALT, KC_RGUI, KC_RCTL, KC_DOWN), + KC_LCTL, KC_LALT, KC_LGUI, KC_SPFN, _______, KC_RALT, KC_RGUI, KC_RCTL, KC_DFWM), // dead key layer /* @@ -98,7 +98,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, KC_TILD, KC_CIRC, _______, \ _______, KC_HASH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, KC_GRV, _______, KC_CENT, \ _______, _______, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, DK_REL, KC_4, KC_5, _______, _______, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_COMS, KC_NO, KC_RALT, KC_RGUI, KC_RCTL, _______), + KC_LCTL, KC_LALT, KC_LGUI, KC_COMS, _______, KC_RALT, KC_RGUI, KC_RCTL, _______), // function layer /* @@ -119,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_ESC, KC_CMDQ, KC_CMDD, KC_CSTB, KC_C_TB, _______, _______, KC_PGDN, KC_UP, KC_PGUP, _______, _______, _______, KC_INS, \ KC_LSFT, KC_CMDA, KC_CMDS, KC_C_LF, KC_C_RT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, KC_HOME, KC_END, _______, KC_BSPC, \ KC_LSFT, _______, KC_CMDZ, KC_CMDX, _______, KC_CMDC, KC_CMDV, KC_VOLD, KC_VOLU, KC_MUTE, _______, _______, _______, _______, \ - KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, KC_NO, KC_RALT, KC_RGUI, KC_RCTL, RESET), + KC_LCTL, KC_LALT, KC_LGUI, KC_TRNS, _______, KC_RALT, KC_RGUI, KC_RCTL, RESET), // mouse layer /* diff --git a/keyboards/kc60/keymaps/workman-dead/readme.md b/keyboards/kc60/keymaps/workman-dead/readme.md new file mode 100644 index 000000000..f1fcdc960 --- /dev/null +++ b/keyboards/kc60/keymaps/workman-dead/readme.md @@ -0,0 +1,17 @@ +# Workman dead with spacefn (kc60 @ QMK) + +## Layout reference +![workman dead with spacefn](./kc60-wm-dead.png) + +## Build + +To build this keymap, simply run `make KEYMAP=workman-dead`. + +## Notes + +* the default layout is `workman` (try it out, it's awesome!), but it can be changed to `qwerty` with the `rebel` key (the function layer won't change though) +* `comma` acts as a dead key, that means tapping/holding it will activate the **oneshot** `dead key` layer (marked red in the reference) +* hold `space` to access the `function` layer (marked blue in the reference) +* hold `tab` to activate the mouse layer +* the `function` layer contains mostly osx specific shortcuts +* on the right side of the bottom row `alt` and `super` are switched compared to a standard layout -- cgit v1.2.3 From ff0e0ee4595cb6d9cfa5a742c58b8f7705d9a3f3 Mon Sep 17 00:00:00 2001 From: JeeBak Kim Date: Fri, 26 Aug 2016 14:48:03 -0700 Subject: [tv44] Add "jeebak" keymap folder as a copy of the "default" folder --- keyboards/tv44/keymaps/jeebak/Makefile | 21 +++++++ keyboards/tv44/keymaps/jeebak/config.h | 8 +++ keyboards/tv44/keymaps/jeebak/keymap.c | 97 +++++++++++++++++++++++++++++++++ keyboards/tv44/keymaps/jeebak/readme.md | 1 + 4 files changed, 127 insertions(+) create mode 100644 keyboards/tv44/keymaps/jeebak/Makefile create mode 100644 keyboards/tv44/keymaps/jeebak/config.h create mode 100644 keyboards/tv44/keymaps/jeebak/keymap.c create mode 100644 keyboards/tv44/keymaps/jeebak/readme.md (limited to 'keyboards') diff --git a/keyboards/tv44/keymaps/jeebak/Makefile b/keyboards/tv44/keymaps/jeebak/Makefile new file mode 100644 index 000000000..f4671a9d1 --- /dev/null +++ b/keyboards/tv44/keymaps/jeebak/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/tv44/keymaps/jeebak/config.h b/keyboards/tv44/keymaps/jeebak/config.h new file mode 100644 index 000000000..df06a2620 --- /dev/null +++ b/keyboards/tv44/keymaps/jeebak/config.h @@ -0,0 +1,8 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +// place overrides here + +#endif \ No newline at end of file diff --git a/keyboards/tv44/keymaps/jeebak/keymap.c b/keyboards/tv44/keymaps/jeebak/keymap.c new file mode 100644 index 000000000..f3f989f2d --- /dev/null +++ b/keyboards/tv44/keymaps/jeebak/keymap.c @@ -0,0 +1,97 @@ +#include "tv44.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. + +#define _QW 0 +#define _DV 1 +#define _CM 2 +#define _L1 3 +#define _L2 4 +#define _L3 5 + +// Macro name shortcuts +#define QWERTY M(_QW) +#define DVORAK M(_DV) +#define COLEMAK M(_CM) + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + [_QW] = { /* Qwerty */ + {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, + {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1) }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_F, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, + {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } + }, + [_DV] = { /* Dvorak */ + {KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, + {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) }, + {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) }, + {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } + }, + [_CM] = { /* Colemak */ + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, + {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1) }, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, + {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } + }, + [_L1] = { /* LAYER 1 */ + {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, + {_______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, + {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } + }, + [_L2] = { /* LAYER 2 */ + {_______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______ }, + {KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_ENT }, + {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______ }, + {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } + }, + [_L3] = { /* LAYER 3 */ + {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______ }, + {KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______ }, + {KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______ }, + {_______, KC_LSFT, KC_B, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_C, _______, _______, XXXXXXX, _______ } + } +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case _DV: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_DV); + } + break; + case _QW: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_QW); + } + break; + case _CM: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_CM); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/tv44/keymaps/jeebak/readme.md b/keyboards/tv44/keymaps/jeebak/readme.md new file mode 100644 index 000000000..ac84c08cf --- /dev/null +++ b/keyboards/tv44/keymaps/jeebak/readme.md @@ -0,0 +1 @@ +# The default keymap for tv44 \ No newline at end of file -- cgit v1.2.3 From 5fe883e74b7f8a1265c2069d16e8dcbd25fab18b Mon Sep 17 00:00:00 2001 From: JeeBak Kim Date: Fri, 26 Aug 2016 15:05:51 -0700 Subject: [tv44] Port jeebak's planck keymap to tv44 --- keyboards/tv44/keymaps/jeebak/config.h | 17 +- keyboards/tv44/keymaps/jeebak/keymap.c | 460 +++++++++++++++++++++++++++----- keyboards/tv44/keymaps/jeebak/readme.md | 130 ++++++++- 3 files changed, 538 insertions(+), 69 deletions(-) (limited to 'keyboards') diff --git a/keyboards/tv44/keymaps/jeebak/config.h b/keyboards/tv44/keymaps/jeebak/config.h index df06a2620..a59ef2b70 100644 --- a/keyboards/tv44/keymaps/jeebak/config.h +++ b/keyboards/tv44/keymaps/jeebak/config.h @@ -3,6 +3,19 @@ #include "../../config.h" -// place overrides here +/** + *TV44 keymap definition macro + */ +#define KEYMAP_TV44( \ + K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, \ + K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, \ + K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, \ + K37, K38, K39, K40, K41, K42, K43, K44 \ +) { \ + { K01, K02, K03, K04, K05, K06, K07, K08, K09, K10, K11, K12, }, \ + { K13, K14, K15, K16, K17, K18, K19, K20, K21, K22, K23, K24, }, \ + { K25, K26, K27, K28, K29, K30, K31, K32, K33, K34, K35, K36, }, \ + { K37, K38, K39, K40, KC_NO, KC_NO, KC_NO, K41, K42, K43, KC_NO, K44 } \ +} -#endif \ No newline at end of file +#endif diff --git a/keyboards/tv44/keymaps/jeebak/keymap.c b/keyboards/tv44/keymaps/jeebak/keymap.c index f3f989f2d..1bb1015c3 100644 --- a/keyboards/tv44/keymaps/jeebak/keymap.c +++ b/keyboards/tv44/keymaps/jeebak/keymap.c @@ -8,65 +8,281 @@ extern keymap_config_t keymap_config; // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _PLOVER 5 +#define _TOUCHCURSOR 6 +#define _MOUSECURSOR 7 +#define _ADJUST 16 -#define _QW 0 -#define _DV 1 -#define _CM 2 -#define _L1 3 -#define _L2 4 -#define _L3 5 +// Keycodes +enum planck_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + PLOVER, + LOWER, + RAISE, + BACKLIT, + EXT_PLV +}; -// Macro name shortcuts -#define QWERTY M(_QW) -#define DVORAK M(_DV) -#define COLEMAK M(_CM) +enum macro_keycodes { + KC_ALT_TAB, + KC_CMD_TAB, + KC_CTL_TAB, + KC_CMD_SLSH, + KC_AG_FIND, + KC_AG_AGAIN, + KC_AG_UNDO, + KC_AG_CUT, + KC_AG_COPY, + KC_AG_PASTE, + KC_AG_DESK_L, + KC_AG_DESK_R, + KC_AG_TAB_C, + KC_AG_TAB_N, + KC_AG_TAB_R, +}; // Fillers to make layering more clear #define _______ KC_TRNS #define XXXXXXX KC_NO +// Custom macros +#define CTL_ESC CTL_T(KC_ESC) // Tap for Esc, hold for Ctrl +#define SFT_ENT SFT_T(KC_ENT) // Tap for Enter, hold for Shift +#define HPR_TAB ALL_T(KC_TAB) // Tap for Tab, hold for Hyper +#define GUI_SEM GUI_T(KC_SCLN) // Tap for Semicolon, hold for GUI +#define ALT_QUO ALT_T(KC_QUOT) // Tap for Quote, hold for Alt +// Requires KC_TRNS/_______ for the trigger key in the destination layer +#define LT_TC LT(_TOUCHCURSOR, KC_SPC) // L-ayer T-ap T-ouch C-ursor +#define LT_MC(kc) LT(_MOUSECURSOR, kc) // L-ayer T-ap M-ouse C-ursor +#define ALT_TAB M(KC_ALT_TAB) // Macro for Alt-Tab +#define CMD_TAB M(KC_CMD_TAB) // Macro for Cmd-Tab +#define CTL_TAB M(KC_CTL_TAB) // Macro for Ctl-Tab +#define CMD_SLSH M(KC_CMD_SLSH) // Macro for Cmd-Slash (personal shortcut to toggle iTerm2 visibility) +#define AG_FIND M(KC_AG_FIND) // Macros for Cmd-[x] vs Ctrl-[x] based on current AG_NORM or AG_SWAP settings +#define AG_AGAIN M(KC_AG_AGAIN) +#define AG_UNDO M(KC_AG_UNDO) +#define AG_CUT M(KC_AG_CUT) +#define AG_COPY M(KC_AG_COPY) +#define AG_PASTE M(KC_AG_PASTE) +#define AG_D_L M(KC_AG_DESK_L) // For Virtual Desktop Switching: Left, and +#define AG_D_R M(KC_AG_DESK_R) // Right +#define AG_T_C M(KC_AG_TAB_C) // For Chrome, etc. Tab Close, +#define AG_T_N M(KC_AG_TAB_N) // Tab New, and +#define AG_T_R M(KC_AG_TAB_R) // Tab Reopen Closed const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - [_QW] = { /* Qwerty */ - {KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC }, - {MO(_L1), KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MO(_L1) }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_F, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, - {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } - }, - [_DV] = { /* Dvorak */ - {KC_TAB, KC_SLSH, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, - {MO(_L1), KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, MO(_L1) }, - {KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, MO(_L2) }, - {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } - }, - [_CM] = { /* Colemak */ - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC }, - {MO(_L1), KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, MO(_L1) }, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MO(_L2) }, - {KC_LCTL, MO(_L2), KC_LGUI, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, KC_SPC, KC_RALT, KC_ESC, XXXXXXX, TG(_L3) } - }, - [_L1] = { /* LAYER 1 */ - {KC_GRV, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, - {_______, KC_BSLS, KC_QUOT, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_DOWN, KC_UP, KC_LEFT, KC_RGHT, _______ }, - {_______, KC_ESC, _______, KC_PSCR, _______, _______, _______, KC_MSTP, KC_MPLY, KC_MPRV, KC_MNXT, KC_RSFT }, - {_______, KC_LGUI, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } - }, - [_L2] = { /* LAYER 2 */ - {_______, QWERTY, DVORAK, COLEMAK, _______, _______, _______, KC_7, KC_8, KC_9, KC_0, _______ }, - {KC_ESC, KC_PIPE, KC_DQUO, KC_UNDS, KC_PLUS, LSFT(KC_LBRC), LSFT(KC_RBRC), KC_4, KC_5, KC_6, KC_VOLU, KC_ENT }, - {_______, _______, _______, _______, _______, _______, KC_0, KC_1, KC_2, KC_3, KC_VOLD, _______ }, - {_______, _______, _______, _______, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, _______, XXXXXXX, _______ } - }, - [_L3] = { /* LAYER 3 */ - {_______, _______, _______, _______, _______, _______, _______, KC_F1, KC_F2, KC_F3, KC_F4, _______ }, - {KC_ESC, _______, _______, _______, _______, _______, _______, KC_F5, KC_F6, KC_F7, KC_F8, _______ }, - {KC_LSFT, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_F9, KC_F10, KC_F11, KC_F12, _______ }, - {_______, KC_LSFT, KC_B, KC_SPC, XXXXXXX, XXXXXXX, XXXXXXX, KC_C, _______, _______, XXXXXXX, _______ } - } -}; -const uint16_t PROGMEM fn_actions[] = { +/* Qwerty + * + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L |GUI/; | Alt/" | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/Ent | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol+ | Play | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ +[_QWERTY] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + HPR_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSPC , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + CTL_ESC , KC_A, KC_S,LT_MC(KC_D), KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, GUI_SEM, ALT_QUO , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLU , KC_MPLY ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* Colemak + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * |Hyper/Tab| Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | Ctrl/Esc | A | R | MC/S | T | D | H | N | E | I | O | " | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | Shift | Z | X | C | V | B | K | M | , | . | / | Sft/Ent | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol+ | Play | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ +[_COLEMAK] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + HPR_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + CTL_ESC , KC_A, KC_R,LT_MC(KC_S), KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT , KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, SFT_ENT , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLU , KC_MPLY ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* Dvorak + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * |Hyper/Tab| " | , | . | P | Y | F | G | C | R | L | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | Ctrl/Esc | A | O | MC/E | U | I | D | H | T | N | S | / | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | Shift | ; | Q | J | K | X | B | M | W | V | Z | Sft/Ent | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol+ | Play | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ +[_DVORAK] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + HPR_TAB,KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + CTL_ESC , KC_A, KC_O,LT_MC(KC_E), KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_LSFT , KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, SFT_ENT , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + KC_LALT , KC_LGUI , LOWER , LT_TC , LT_TC , RAISE , KC_VOLU , KC_MPLY ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* Lower + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | [ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | "|" | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | ] | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | \ | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | Brite | | | | | | Vol- | Mute | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ +[_LOWER] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + 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_LBRC , KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_RBRC , KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + BACKLIT , _______ , _______ , _______ , _______ , _______ , KC_VOLD , KC_MUTE ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* Raise + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | $ | 4 | 5 | 6 | . | + | . | 4 | 5 | 6 | * | "|" | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | = | 7 | 8 | 9 | 0 | - | . | 1 | 2 | 3 | / | \ | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | Brite | | | | | | Vol- | Mute | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ +[_RAISE] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + KC_0 , KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + KC_DLR , KC_4, KC_5, KC_6, KC_DOT, KC_PLUS, KC_DOT, KC_4, KC_5, KC_6, KC_ASTR, KC_PIPE , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + KC_EQL , KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_DOT, KC_1, KC_2, KC_3, KC_SLSH, KC_BSLS , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + BACKLIT , _______ , _______ , _______ , _______ , _______ , KC_VOLD , KC_MUTE ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* TouchCursor layer (http://martin-stone.github.io/touchcursor/) plus personal customizations + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | | Alt |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L| Desk_R | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | | Undo | Cut | Copy |Paste | ` | PgDn | Del |Tab_N |Tab_R |iTerm2| | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | | | | | | | | | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + * + * The KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND, and KC_AGAIN keycodes don't + * seem to work on Mac. Presumably they'll work under Windows. + */ +[_TOUCHCURSOR] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + ALT_TAB,CMD_TAB, CTL_TAB, KC_LGUI, KC_LSFT, KC_TILD, KC_INS, KC_HOME, KC_UP, KC_END, KC_BSPC, _______ , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + _______ ,KC_LALT, KC_SPC, AG_T_C, AG_FIND,AG_AGAIN, KC_PGUP, KC_LEFT, KC_DOWN, KC_RGHT, AG_D_L, AG_D_R , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______ ,AG_UNDO, AG_CUT, AG_COPY,AG_PASTE, KC_GRV, KC_PGDN, KC_DEL, AG_T_N, AG_T_R,CMD_SLSH, _______ , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* Mouse Layer + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | |ACCL2 | BTN2 | | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | | | | | BTN3 | |WHL_Dn| BTN1 | | | BTN3 | | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | | | | | | | | | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ + +[_MOUSECURSOR] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + _______,_______, KC_ACL0, _______, _______, _______, _______, KC_WH_L, KC_MS_U, KC_WH_R, KC_BTN2, _______ , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + _______ ,KC_ACL2, KC_BTN2, _______, KC_BTN1, KC_ACL1, KC_WH_U, KC_MS_L, KC_MS_D, KC_MS_R, KC_BTN4, KC_BTN5 , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______ ,_______, _______, _______, KC_BTN3, _______, KC_WH_D, KC_BTN1, _______, _______, KC_BTN3, _______ , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , _______ ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* Plover layer (http://opensteno.org) + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | TogOut | S | K | W | R | * | * | R | B | G | S | Z | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | Exit | A | O | | | E | U | | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ + +[_PLOVER] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + KC_1 , KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + XXXXXXX , KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_LBRC , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + XXXXXXX , KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + EXT_PLV , KC_C , KC_V , XXXXXXX , XXXXXXX , KC_N , KC_M , XXXXXXX ), +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ + +/* Adjust (Lower + Raise) + * ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + * | | | | | | | | | | | | Del | + * |---------`------`------`------`------`------`------`------`------`------`------`-------------| + * | | | | | |AGnorm|AGswap|Qwerty|Colemk|Dvorak|Plover| | + * |----------`------`------`------`------`------`------`------`------`------`------`------------| + * | | | | | | | | | | | | | + * |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + * | | | | | | | | Reset | + * `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' + */ +[_ADJUST] = KEYMAP_TV44( +/*,--------+-------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------.*/ + _______,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL , +/*|--------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`-----------------|*/ + _______ ,_______, _______, _______, _______, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, PLOVER, _______ , +/*|---------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`----------------|*/ + _______ ,_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ , +/*|----------`-------`--------`--------`--------`--------`--------`--------`--------`--------`--------`---------------|*/ + _______ , _______ , _______ , _______ , _______ , _______ , _______ , RESET ) +/*`-----------+---------------+---------+-------^^^------+-------^^^-------+---------+-----------------+--------------'*/ }; void persistant_default_layer_set(uint16_t default_layer) { @@ -74,24 +290,136 @@ void persistant_default_layer_set(uint16_t default_layer) { default_layer_set(default_layer); } +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + layer_off(_PLOVER); + } + return false; + break; + } + return true; +} + +/* + * Macro definition + */ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - switch(id) { - case _DV: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_DV); - } - break; - case _QW: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_QW); - } - break; - case _CM: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_CM); - } - break; - } + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + + bool use_cmd = true; // Use, for example, Cmd-Tab, Cmd-C, Cmd-V, etc. + // Compare to MAGIC_SWAP_ALT_GUI and MAGIC_UNSWAP_ALT_GUI configs, set in: + // quantum/quantum.c + if(keymap_config.swap_lalt_lgui == 1 && keymap_config.swap_ralt_rgui == 1) { + use_cmd = false; // ... or, Alt-Tab, Ctrl-C, Ctrl-V, etc. + } + + switch (id) { + case KC_ALT_TAB: + if(use_cmd) { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } + else { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } + case KC_CMD_TAB: + if(use_cmd) { return (record->event.pressed ? MACRO( D(LGUI), D(TAB), END ) : MACRO( U(TAB), END )); } + else { return (record->event.pressed ? MACRO( D(LALT), D(TAB), END ) : MACRO( U(TAB), END )); } + + case KC_CTL_TAB: + return (record->event.pressed ? MACRO( D(LCTRL), D(TAB), END ) : MACRO( U(TAB), END )); + case KC_CMD_SLSH: + return (record->event.pressed ? MACRO( D(LGUI), D(SLSH),END ) : MACRO( U(SLSH),END )); + + case KC_AG_FIND: + return use_cmd ? MACRODOWN( D(LGUI), T(F), END ) : MACRODOWN( D(LCTRL), T(F), END ); + case KC_AG_AGAIN: + return use_cmd ? MACRODOWN( D(LGUI), T(G), END ) : MACRODOWN( D(LCTRL), T(G), END ); + case KC_AG_UNDO: + return use_cmd ? MACRODOWN( D(LGUI), T(Z), END ) : MACRODOWN( D(LCTRL), T(Z), END ); + case KC_AG_CUT: + return use_cmd ? MACRODOWN( D(LGUI), T(X), END ) : MACRODOWN( D(LCTRL), T(X), END ); + case KC_AG_COPY: + return use_cmd ? MACRODOWN( D(LGUI), T(C), END ) : MACRODOWN( D(LCTRL), T(C), END ); + case KC_AG_PASTE: + return use_cmd ? MACRODOWN( D(LGUI), T(V), END ) : MACRODOWN( D(LCTRL), T(V), END ); + + case KC_AG_DESK_L: + return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(SCLN), END ) : MACRODOWN( D(LALT), D(LCTRL), T(SCLN), END ); + case KC_AG_DESK_R: + return use_cmd ? MACRODOWN( D(LGUI), D(LCTRL), T(QUOT), END ) : MACRODOWN( D(LALT), D(LCTRL), T(QUOT), END ); + + case KC_AG_TAB_C: + return use_cmd ? MACRODOWN( D(LGUI), T(W), END ) : MACRODOWN( D(LCTRL), T(W), END ); + case KC_AG_TAB_N: + return use_cmd ? MACRODOWN( D(LGUI), T(T), END ) : MACRODOWN( D(LCTRL), T(T), END ); + case KC_AG_TAB_R: + return use_cmd ? MACRODOWN( D(LGUI), D(LSHIFT), T(T), END ) : MACRODOWN( D(LCTRL), D(LSHIFT), T(T), END ); + } + return MACRO_NONE; -}; +} diff --git a/keyboards/tv44/keymaps/jeebak/readme.md b/keyboards/tv44/keymaps/jeebak/readme.md index ac84c08cf..43d20958a 100644 --- a/keyboards/tv44/keymaps/jeebak/readme.md +++ b/keyboards/tv44/keymaps/jeebak/readme.md @@ -1 +1,129 @@ -# The default keymap for tv44 \ No newline at end of file +jeebak's TV44 layout +======================= +NOTE: This is a port of jeebak's planck layout, for tv44. + +This WIP keymap attempts to minimize fingers straying away from the home row. +To aid in this endeavor, when additional modifyer keys to switch layers are +needed, they will be mapped to home row keys. The `keymap.c` file will contain +the exact changes. The diagrams in this README shows the highlights of the +changes from the default mappings. + +I also decided to change all calls to `persistant_default_layer_set()` to +`default_layer_set()` since this is my personal perference. + +## Macros +``` +#define ALT_TAB M(KC_ALT_TAB) +``` + +## Base Layers (Qwerty/Colemak/Dvorak) +These base layers are mostly the same as the default mappings. The interesting +changes are shown below. + +- The `Ctrl/Esc`, will emit an `Escape` when tapped, and act as a `Control` key when held, +- `GUI/;` as `;` and `GUI`, +- `Alt/"` as `"` and `Alt`, +- `Sft/Ent` as `Enter` and `Shift`, and +- `Hyper/Tab` as `Tab` and `Hyper` + +A `TODO` item is to see if it can also act as a `CapsLock` when double-tapped. +The arrow keys, which have been moved to the +[TouchCursor](http://martin-stone.github.io/touchcursor/) layer, have been +replaced with the Media keys as shown. The `MC/kc` key activates the +`MouseCursor` layer when held, and emits the corresponding `kc` for its layer, +when tapped. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + |Hyper/Tab| Q | W | E | R | T | Y | U | I | O | P | Bksp | + |---------`------`------`------`------`------`------`------`------`------`------`-------------| + | Ctrl/Esc | A | S | MC/D | F | G | H | J | K | L |GUI/; | Alt/" | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | Shift | Z | X | C | V | B | N | M | , | . | / | Sft/Ent | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | Alt | GUI | Lower | TC/Space | TC/Space | Raise | Vol+ | Play | + `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' +``` + +## Lower Layer (Symbols and Function Keys) +The symbols and functions keys are essentially the same as the default mapping. +The most notable changes are that the symbol keys from the `RAISE` layer have +been moved here. The remaining Media keys replace those that are now on the +base layers. The `BACKLIT` key has also been moved here. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + |---------`------`------`------`------`------`------`------`------`------`------`-------------| + | [ | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | "|" | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | ] | F7 | F8 | F9 | F10 | F11 | F12 | - | = | [ | ] | \ | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | Brite | | | | | | Vol- | Mute | + `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' +``` + +## Raise Layer (Numbers and Arithmetic Operators) +All of the numbers and arithmetic operators are available on this layer. Some +keys are duplicated for the convenience of their positions. The `0` and `$` +keys at the far left are for quick access to beginning and end of line in vim. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + |---------`------`------`------`------`------`------`------`------`------`------`-------------| + | $ | 4 | 5 | 6 | . | + | . | 4 | 5 | 6 | * | "|" | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | = | 7 | 8 | 9 | 0 | - | . | 1 | 2 | 3 | / | \ | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | Brite | | | | | | Vol- | Mute | + `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' +``` + +## TouchCursor layer plus personal customizations +[TouchCursor](http://martin-stone.github.io/touchcursor/) uses the `Space` key +as the modifier, with the `IJKL` home row keys representing the inverted-T of +the arrow keys. All of the default TouchCursor keymappings for the right hand +are represented below. My personalizations include all of the keys shown for +the left hand. Having the `Alt` and `Shift` keys (as well as the `Control` key +from the base layers) readily accessible from the home row allows quick word +jumps and highlighting when used in conjunction with the arrow keys. The +`Alt-Tab` macro is not only useful under Windows, but also under Mac when used +with alternative switchers like [HyperSwitch](https://bahoom.com/hyperswitch). +The `Cmd-Tab` and `Ctrl-Tab` sequences are duplicated for easy access while in +this layer. The `KC_UNDO, KC_CUT, KC_COPY, KC_PASTE, KC_FIND,` and `KC_AGAIN` +keycodes do not seem to work. There are macros in place that'll "automatically" +choose the correct version (`Cmd-Tab` vs. `Alt-Tab`, `Cmd-C` vs. `Ctrl-C`, +etc.) depending on which layout you've currently selected (`AG_NORM` or +`AG_SWAP`) in the `_ADJUST` layer. The `Desk_L` and `Desk_R` macros are what I +use to switch between Virtual Desktops Left/Right. The `Tab_C`, `Tab_N` and +`Tab_R` are for "Close Tab," "New Tab" and "Reopen Closed Tab" for apps such as +Google Chrome. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + | AltTab |CmdTab|CtlTab| GUI |Shift | ~ |Insert| Home | Up | End | Bksp | | + |---------`------`------`------`------`------`------`------`------`------`------`-------------| + | | Alt |Space |Tab_C | Find |Again | PgUp | Left | Down |Right |Desk_L| Desk_R | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | | Undo | Cut | Copy |Paste | ` | PgDn | Del |Tab_N |Tab_R |iTerm2| | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | | | | | | | | | + `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' +``` + +## Mouse Layer +The Mouse layer, closely mimics the layout/behaviour of the TouchCursor layer. +The `D` key (on QWERTY) is used to activate this layer. All 16 keycodes for the +mouse from the `doc/keycode.txt` file are represented, and logically located, +IMHO. The left and right click buttons are duplicated; on the right hand side, +for a quick click here and there, and again on the left hand side for when the +buttons need to be held for dragging things or highlighting text, thus allowing +the right hand to be free to use the up/down/left/right actions. +``` + ,---------+------+------+------+------+------+------+------+------+------+------+-------------. + | | |ACCL0 | | | | |WHL_L | Up |WHL_R | BTN2 | | + |---------`------`------`------`------`------`------`------`------`------`------`-------------| + | |ACCL2 | BTN2 | | BTN1 |ACCL1 |WHL_Up| Left | Down |Right | BTN4 | BTN5 | + |----------`------`------`------`------`------`------`------`------`------`------`------------| + | | | | | BTN3 | |WHL_Dn| BTN1 | | | BTN3 | | + |-----------`------`------`------`------`-----'-------`------`------`------`------`-----------| + | | | | | | | | | + `--------+---------+---------+------^^^-------+-----^^^--------+---------+---------+---------' +``` -- cgit v1.2.3 From a5b1af4999345239df5086351b52a5b4d2daa97e Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 27 Aug 2016 18:40:50 +0300 Subject: Normalize line endings --- .../chibios_test/boards/GENERIC_STM32_F103/board.c | 98 +- .../chibios_test/boards/GENERIC_STM32_F103/board.h | 332 +++---- .../boards/GENERIC_STM32_F103/board.mk | 10 +- keyboards/chibios_test/ld/MKL26Z64.ld | 210 ++-- .../ld/STM32F103x8_stm32duino_bootloader.ld | 176 ++-- keyboards/chibios_test/stm32_f072_onekey/mcuconf.h | 342 +++---- keyboards/chibios_test/stm32_f103_onekey/mcuconf.h | 418 ++++---- keyboards/chibios_test/teensy_lc_onekey/chconf.h | 1048 ++++++++++---------- keyboards/chibios_test/teensy_lc_onekey/halconf.h | 374 +++---- keyboards/chibios_test/teensy_lc_onekey/mcuconf.h | 110 +- keyboards/gh60/Makefile | 148 +-- keyboards/gh60/config.h | 322 +++--- keyboards/gh60/gh60.c | 50 +- keyboards/gh60/gh60.h | 148 +-- keyboards/gh60/keymaps/robotmaxtron/Makefile | 224 ++--- keyboards/gh60/keymaps/robotmaxtron/config.h | 380 +++---- keyboards/gh60/pinout.txt | 34 +- keyboards/gh60/readme.md | 120 +-- keyboards/infinity_chibios/chconf.h | 1048 ++++++++++---------- keyboards/infinity_chibios/halconf.h | 706 ++++++------- keyboards/infinity_chibios/mcuconf.h | 110 +- 21 files changed, 3204 insertions(+), 3204 deletions(-) (limited to 'keyboards') diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c index 31319ef57..2809c9d18 100644 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c +++ b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.c @@ -1,49 +1,49 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#include "hal.h" - -/** - * @brief PAL setup. - * @details Digital I/O ports static configuration as defined in @p board.h. - * This variable is used by the HAL when initializing the PAL driver. - */ -#if HAL_USE_PAL || defined(__DOXYGEN__) -const PALConfig pal_default_config = -{ - {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, - {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, - {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, - {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, - {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, -}; -#endif - -/* - * Early initialization code. - * This initialization must be performed just after stack setup and before - * any other initialization. - */ -void __early_init(void) { - - stm32_clock_init(); -} - -/* - * Board-specific initialization code. - */ -void boardInit(void) { -} +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#include "hal.h" + +/** + * @brief PAL setup. + * @details Digital I/O ports static configuration as defined in @p board.h. + * This variable is used by the HAL when initializing the PAL driver. + */ +#if HAL_USE_PAL || defined(__DOXYGEN__) +const PALConfig pal_default_config = +{ + {VAL_GPIOAODR, VAL_GPIOACRL, VAL_GPIOACRH}, + {VAL_GPIOBODR, VAL_GPIOBCRL, VAL_GPIOBCRH}, + {VAL_GPIOCODR, VAL_GPIOCCRL, VAL_GPIOCCRH}, + {VAL_GPIODODR, VAL_GPIODCRL, VAL_GPIODCRH}, + {VAL_GPIOEODR, VAL_GPIOECRL, VAL_GPIOECRH}, +}; +#endif + +/* + * Early initialization code. + * This initialization must be performed just after stack setup and before + * any other initialization. + */ +void __early_init(void) { + + stm32_clock_init(); +} + +/* + * Board-specific initialization code. + */ +void boardInit(void) { +} diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h index 7253e7782..b31d74307 100644 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h +++ b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.h @@ -1,166 +1,166 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _BOARD_H_ -#define _BOARD_H_ - -/* - * Setup for a Generic STM32F103 board. - */ - -/* - * Board identifier. - */ -#define BOARD_GENERIC_STM32_F103 -#define BOARD_NAME "Generic STM32F103x board" - -/* - * Board frequencies. - */ -#define STM32_LSECLK 32768 -#define STM32_HSECLK 8000000 - -/* - * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. - */ -#define STM32F103xB - -/* - * IO pins assignments - */ - -/* on-board */ - -#define GPIOC_LED 13 -#define GPIOD_OSC_IN 0 -#define GPIOD_OSC_OUT 1 - -/* In case your board has a "USB enable" hardware - controlled by a pin, define it here. (It could be just - a 1.5k resistor connected to D+ line.) -*/ -/* -#define GPIOB_USB_DISC 10 -*/ - -/* - * I/O ports initial setup, this configuration is established soon after reset - * in the initialization code. - * - * The digits have the following meaning: - * 0 - Analog input. - * 1 - Push Pull output 10MHz. - * 2 - Push Pull output 2MHz. - * 3 - Push Pull output 50MHz. - * 4 - Digital input. - * 5 - Open Drain output 10MHz. - * 6 - Open Drain output 2MHz. - * 7 - Open Drain output 50MHz. - * 8 - Digital input with PullUp or PullDown resistor depending on ODR. - * 9 - Alternate Push Pull output 10MHz. - * A - Alternate Push Pull output 2MHz. - * B - Alternate Push Pull output 50MHz. - * C - Reserved. - * D - Alternate Open Drain output 10MHz. - * E - Alternate Open Drain output 2MHz. - * F - Alternate Open Drain output 50MHz. - * Please refer to the STM32 Reference Manual for details. - */ - -/* - * Port A setup. - * Everything input with pull-up except: - * PA2 - Alternate output (USART2 TX). - * PA3 - Normal input (USART2 RX). - * PA9 - Alternate output (USART1 TX). - * PA10 - Normal input (USART1 RX). - */ -#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ -#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ -#define VAL_GPIOAODR 0xFFFFFFFF - -/* - * Port B setup. - * Everything input with pull-up except: - * PB10 - Push Pull output (USB switch). - */ -#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ -#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ -#define VAL_GPIOBODR 0xFFFFFFFF - -/* - * Port C setup. - * Everything input with pull-up except: - * PC13 - Push Pull output (LED). - */ -#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ -#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ -#define VAL_GPIOCODR 0xFFFFFFFF - -/* - * Port D setup. - * Everything input with pull-up except: - * PD0 - Normal input (XTAL). - * PD1 - Normal input (XTAL). - */ -#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ -#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ -#define VAL_GPIODODR 0xFFFFFFFF - -/* - * Port E setup. - * Everything input with pull-up except: - */ -#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ -#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ -#define VAL_GPIOEODR 0xFFFFFFFF - -/* - * USB bus activation macro, required by the USB driver. - */ -/* The point is that most of the generic STM32F103* boards - have a 1.5k resistor connected on one end to the D+ line - and on the other end to some pin. Or even a slightly more - complicated "USB enable" circuit, controlled by a pin. - That should go here. - - However on some boards (e.g. one that I have), there's no - such hardware. In which case it's better to not do anything. -*/ -/* -#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); - -/* - * USB bus de-activation macro, required by the USB driver. - */ -/* -#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) -*/ -#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); - -#if !defined(_FROM_ASM_) -#ifdef __cplusplus -extern "C" { -#endif - void boardInit(void); -#ifdef __cplusplus -} -#endif -#endif /* _FROM_ASM_ */ - -#endif /* _BOARD_H_ */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _BOARD_H_ +#define _BOARD_H_ + +/* + * Setup for a Generic STM32F103 board. + */ + +/* + * Board identifier. + */ +#define BOARD_GENERIC_STM32_F103 +#define BOARD_NAME "Generic STM32F103x board" + +/* + * Board frequencies. + */ +#define STM32_LSECLK 32768 +#define STM32_HSECLK 8000000 + +/* + * MCU type, supported types are defined in ./os/hal/platforms/hal_lld.h. + */ +#define STM32F103xB + +/* + * IO pins assignments + */ + +/* on-board */ + +#define GPIOC_LED 13 +#define GPIOD_OSC_IN 0 +#define GPIOD_OSC_OUT 1 + +/* In case your board has a "USB enable" hardware + controlled by a pin, define it here. (It could be just + a 1.5k resistor connected to D+ line.) +*/ +/* +#define GPIOB_USB_DISC 10 +*/ + +/* + * I/O ports initial setup, this configuration is established soon after reset + * in the initialization code. + * + * The digits have the following meaning: + * 0 - Analog input. + * 1 - Push Pull output 10MHz. + * 2 - Push Pull output 2MHz. + * 3 - Push Pull output 50MHz. + * 4 - Digital input. + * 5 - Open Drain output 10MHz. + * 6 - Open Drain output 2MHz. + * 7 - Open Drain output 50MHz. + * 8 - Digital input with PullUp or PullDown resistor depending on ODR. + * 9 - Alternate Push Pull output 10MHz. + * A - Alternate Push Pull output 2MHz. + * B - Alternate Push Pull output 50MHz. + * C - Reserved. + * D - Alternate Open Drain output 10MHz. + * E - Alternate Open Drain output 2MHz. + * F - Alternate Open Drain output 50MHz. + * Please refer to the STM32 Reference Manual for details. + */ + +/* + * Port A setup. + * Everything input with pull-up except: + * PA2 - Alternate output (USART2 TX). + * PA3 - Normal input (USART2 RX). + * PA9 - Alternate output (USART1 TX). + * PA10 - Normal input (USART1 RX). + */ +#define VAL_GPIOACRL 0x88884B88 /* PA7...PA0 */ +#define VAL_GPIOACRH 0x888884B8 /* PA15...PA8 */ +#define VAL_GPIOAODR 0xFFFFFFFF + +/* + * Port B setup. + * Everything input with pull-up except: + * PB10 - Push Pull output (USB switch). + */ +#define VAL_GPIOBCRL 0x88888888 /* PB7...PB0 */ +#define VAL_GPIOBCRH 0x88888388 /* PB15...PB8 */ +#define VAL_GPIOBODR 0xFFFFFFFF + +/* + * Port C setup. + * Everything input with pull-up except: + * PC13 - Push Pull output (LED). + */ +#define VAL_GPIOCCRL 0x88888888 /* PC7...PC0 */ +#define VAL_GPIOCCRH 0x88388888 /* PC15...PC8 */ +#define VAL_GPIOCODR 0xFFFFFFFF + +/* + * Port D setup. + * Everything input with pull-up except: + * PD0 - Normal input (XTAL). + * PD1 - Normal input (XTAL). + */ +#define VAL_GPIODCRL 0x88888844 /* PD7...PD0 */ +#define VAL_GPIODCRH 0x88888888 /* PD15...PD8 */ +#define VAL_GPIODODR 0xFFFFFFFF + +/* + * Port E setup. + * Everything input with pull-up except: + */ +#define VAL_GPIOECRL 0x88888888 /* PE7...PE0 */ +#define VAL_GPIOECRH 0x88888888 /* PE15...PE8 */ +#define VAL_GPIOEODR 0xFFFFFFFF + +/* + * USB bus activation macro, required by the USB driver. + */ +/* The point is that most of the generic STM32F103* boards + have a 1.5k resistor connected on one end to the D+ line + and on the other end to some pin. Or even a slightly more + complicated "USB enable" circuit, controlled by a pin. + That should go here. + + However on some boards (e.g. one that I have), there's no + such hardware. In which case it's better to not do anything. +*/ +/* +#define usb_lld_connect_bus(usbp) palClearPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_connect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_INPUT); + +/* + * USB bus de-activation macro, required by the USB driver. + */ +/* +#define usb_lld_disconnect_bus(usbp) palSetPad(GPIOB, GPIOB_USB_DISC) +*/ +#define usb_lld_disconnect_bus(usbp) palSetPadMode(GPIOA, 12, PAL_MODE_OUTPUT_PUSHPULL); palClearPad(GPIOA, 12); + +#if !defined(_FROM_ASM_) +#ifdef __cplusplus +extern "C" { +#endif + void boardInit(void); +#ifdef __cplusplus +} +#endif +#endif /* _FROM_ASM_ */ + +#endif /* _BOARD_H_ */ diff --git a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk index d692c0ee4..48e0e51fe 100644 --- a/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk +++ b/keyboards/chibios_test/boards/GENERIC_STM32_F103/board.mk @@ -1,5 +1,5 @@ -# List of all the board related files. -BOARDSRC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103/board.c - -# Required include directories -BOARDINC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103 +# List of all the board related files. +BOARDSRC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103/board.c + +# Required include directories +BOARDINC = $(KEYBOARD_PATH)/boards/GENERIC_STM32_F103 diff --git a/keyboards/chibios_test/ld/MKL26Z64.ld b/keyboards/chibios_test/ld/MKL26Z64.ld index fb141f888..c4ca8b874 100644 --- a/keyboards/chibios_test/ld/MKL26Z64.ld +++ b/keyboards/chibios_test/ld/MKL26Z64.ld @@ -1,105 +1,105 @@ -/* - * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com - * (C) 2016 flabbergast - * - * Permission is hereby granted, free of charge, to any person obtaining - * a copy of this software and associated documentation files (the "Software"), - * to deal in the Software without restriction, including without limitation - * the rights to use, copy, modify, merge, publish, distribute, sublicense, - * and/or sell copies of the Software, and to permit persons to whom the - * Software is furnished to do so, subject to the following conditions: - * - * The above copyright notice and this permission notice shall be included in - * all copies or substantial portions of the Software. - * - * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - * SOFTWARE. - */ - -/* - * KL26Z64 memory setup. - */ -MEMORY -{ - flash0 : org = 0x00000000, len = 0x100 - flash1 : org = 0x00000400, len = 0x10 - flash2 : org = 0x00000410, len = 62k - 0x410 - flash3 : org = 0x0000F800, len = 2k - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x1FFFF800, len = 8k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* Flash region for the configuration bytes.*/ -SECTIONS -{ - .cfmprotect : ALIGN(4) SUBALIGN(4) - { - KEEP(*(.cfmconfig)) - } > flash1 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash2); -REGION_ALIAS("XTORS_FLASH_LMA", flash2); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash2); -REGION_ALIAS("TEXT_FLASH_LMA", flash2); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash2); -REGION_ALIAS("RODATA_FLASH_LMA", flash2); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash2); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash2); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -__eeprom_workarea_start__ = ORIGIN(flash3); -__eeprom_workarea_size__ = LENGTH(flash3); -__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; - -/* Generic rules inclusion.*/ -INCLUDE rules.ld +/* + * Copyright (C) 2013-2016 Fabio Utzig, http://fabioutzig.com + * (C) 2016 flabbergast + * + * Permission is hereby granted, free of charge, to any person obtaining + * a copy of this software and associated documentation files (the "Software"), + * to deal in the Software without restriction, including without limitation + * the rights to use, copy, modify, merge, publish, distribute, sublicense, + * and/or sell copies of the Software, and to permit persons to whom the + * Software is furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS + * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE + * SOFTWARE. + */ + +/* + * KL26Z64 memory setup. + */ +MEMORY +{ + flash0 : org = 0x00000000, len = 0x100 + flash1 : org = 0x00000400, len = 0x10 + flash2 : org = 0x00000410, len = 62k - 0x410 + flash3 : org = 0x0000F800, len = 2k + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x1FFFF800, len = 8k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* Flash region for the configuration bytes.*/ +SECTIONS +{ + .cfmprotect : ALIGN(4) SUBALIGN(4) + { + KEEP(*(.cfmconfig)) + } > flash1 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash2); +REGION_ALIAS("XTORS_FLASH_LMA", flash2); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash2); +REGION_ALIAS("TEXT_FLASH_LMA", flash2); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash2); +REGION_ALIAS("RODATA_FLASH_LMA", flash2); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash2); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash2); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash2); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash2); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +__eeprom_workarea_start__ = ORIGIN(flash3); +__eeprom_workarea_size__ = LENGTH(flash3); +__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld b/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld index 00613328e..f9bfe9c00 100644 --- a/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld +++ b/keyboards/chibios_test/ld/STM32F103x8_stm32duino_bootloader.ld @@ -1,88 +1,88 @@ -/* - ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/* - * ST32F103xB memory setup for use with the maplemini bootloader. - * You will have to - * #define CORTEX_VTOR_INIT 0x5000 - * in your projects chconf.h - */ -MEMORY -{ - flash0 : org = 0x08002000, len = 128k - 0x2000 - flash1 : org = 0x00000000, len = 0 - flash2 : org = 0x00000000, len = 0 - flash3 : org = 0x00000000, len = 0 - flash4 : org = 0x00000000, len = 0 - flash5 : org = 0x00000000, len = 0 - flash6 : org = 0x00000000, len = 0 - flash7 : org = 0x00000000, len = 0 - ram0 : org = 0x20000000, len = 20k - ram1 : org = 0x00000000, len = 0 - ram2 : org = 0x00000000, len = 0 - ram3 : org = 0x00000000, len = 0 - ram4 : org = 0x00000000, len = 0 - ram5 : org = 0x00000000, len = 0 - ram6 : org = 0x00000000, len = 0 - ram7 : org = 0x00000000, len = 0 -} - -/* For each data/text section two region are defined, a virtual region - and a load region (_LMA suffix).*/ - -/* Flash region to be used for exception vectors.*/ -REGION_ALIAS("VECTORS_FLASH", flash0); -REGION_ALIAS("VECTORS_FLASH_LMA", flash0); - -/* Flash region to be used for constructors and destructors.*/ -REGION_ALIAS("XTORS_FLASH", flash0); -REGION_ALIAS("XTORS_FLASH_LMA", flash0); - -/* Flash region to be used for code text.*/ -REGION_ALIAS("TEXT_FLASH", flash0); -REGION_ALIAS("TEXT_FLASH_LMA", flash0); - -/* Flash region to be used for read only data.*/ -REGION_ALIAS("RODATA_FLASH", flash0); -REGION_ALIAS("RODATA_FLASH_LMA", flash0); - -/* Flash region to be used for various.*/ -REGION_ALIAS("VARIOUS_FLASH", flash0); -REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); - -/* Flash region to be used for RAM(n) initialization data.*/ -REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); - -/* RAM region to be used for Main stack. This stack accommodates the processing - of all exceptions and interrupts.*/ -REGION_ALIAS("MAIN_STACK_RAM", ram0); - -/* RAM region to be used for the process stack. This is the stack used by - the main() function.*/ -REGION_ALIAS("PROCESS_STACK_RAM", ram0); - -/* RAM region to be used for data segment.*/ -REGION_ALIAS("DATA_RAM", ram0); -REGION_ALIAS("DATA_RAM_LMA", flash0); - -/* RAM region to be used for BSS segment.*/ -REGION_ALIAS("BSS_RAM", ram0); - -/* RAM region to be used for the default heap.*/ -REGION_ALIAS("HEAP_RAM", ram0); - -/* Generic rules inclusion.*/ -INCLUDE rules.ld +/* + ChibiOS - Copyright (C) 2006..2016 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/* + * ST32F103xB memory setup for use with the maplemini bootloader. + * You will have to + * #define CORTEX_VTOR_INIT 0x5000 + * in your projects chconf.h + */ +MEMORY +{ + flash0 : org = 0x08002000, len = 128k - 0x2000 + flash1 : org = 0x00000000, len = 0 + flash2 : org = 0x00000000, len = 0 + flash3 : org = 0x00000000, len = 0 + flash4 : org = 0x00000000, len = 0 + flash5 : org = 0x00000000, len = 0 + flash6 : org = 0x00000000, len = 0 + flash7 : org = 0x00000000, len = 0 + ram0 : org = 0x20000000, len = 20k + ram1 : org = 0x00000000, len = 0 + ram2 : org = 0x00000000, len = 0 + ram3 : org = 0x00000000, len = 0 + ram4 : org = 0x00000000, len = 0 + ram5 : org = 0x00000000, len = 0 + ram6 : org = 0x00000000, len = 0 + ram7 : org = 0x00000000, len = 0 +} + +/* For each data/text section two region are defined, a virtual region + and a load region (_LMA suffix).*/ + +/* Flash region to be used for exception vectors.*/ +REGION_ALIAS("VECTORS_FLASH", flash0); +REGION_ALIAS("VECTORS_FLASH_LMA", flash0); + +/* Flash region to be used for constructors and destructors.*/ +REGION_ALIAS("XTORS_FLASH", flash0); +REGION_ALIAS("XTORS_FLASH_LMA", flash0); + +/* Flash region to be used for code text.*/ +REGION_ALIAS("TEXT_FLASH", flash0); +REGION_ALIAS("TEXT_FLASH_LMA", flash0); + +/* Flash region to be used for read only data.*/ +REGION_ALIAS("RODATA_FLASH", flash0); +REGION_ALIAS("RODATA_FLASH_LMA", flash0); + +/* Flash region to be used for various.*/ +REGION_ALIAS("VARIOUS_FLASH", flash0); +REGION_ALIAS("VARIOUS_FLASH_LMA", flash0); + +/* Flash region to be used for RAM(n) initialization data.*/ +REGION_ALIAS("RAM_INIT_FLASH_LMA", flash0); + +/* RAM region to be used for Main stack. This stack accommodates the processing + of all exceptions and interrupts.*/ +REGION_ALIAS("MAIN_STACK_RAM", ram0); + +/* RAM region to be used for the process stack. This is the stack used by + the main() function.*/ +REGION_ALIAS("PROCESS_STACK_RAM", ram0); + +/* RAM region to be used for data segment.*/ +REGION_ALIAS("DATA_RAM", ram0); +REGION_ALIAS("DATA_RAM_LMA", flash0); + +/* RAM region to be used for BSS segment.*/ +REGION_ALIAS("BSS_RAM", ram0); + +/* RAM region to be used for the default heap.*/ +REGION_ALIAS("HEAP_RAM", ram0); + +/* Generic rules inclusion.*/ +INCLUDE rules.ld diff --git a/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h b/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h index 3d877aaa2..faca3defd 100644 --- a/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h +++ b/keyboards/chibios_test/stm32_f072_onekey/mcuconf.h @@ -1,171 +1,171 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MCUCONF_H_ -#define _MCUCONF_H_ - -/* - * STM32F0xx drivers configuration. - * The following settings override the default settings present in - * the various device driver implementation headers. - * Note that the settings for each driver only have effect if the whole - * driver is enabled in halconf.h. - * - * IRQ priorities: - * 3...0 Lowest...Highest. - * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -#define STM32F0xx_MCUCONF - -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 -#define STM32_HSI_ENABLED TRUE -#define STM32_HSI14_ENABLED TRUE -#define STM32_HSI48_ENABLED FALSE -#define STM32_LSI_ENABLED TRUE -#define STM32_HSE_ENABLED FALSE -#define STM32_LSE_ENABLED FALSE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 -#define STM32_PREDIV_VALUE 1 -#define STM32_PLLMUL_VALUE 12 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE STM32_PPRE_DIV1 -#define STM32_ADCSW STM32_ADCSW_HSI14 -#define STM32_ADCPRE STM32_ADCPRE_DIV4 -#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK -#define STM32_ADCPRE STM32_ADCPRE_DIV4 -#define STM32_ADCSW STM32_ADCSW_HSI14 -#define STM32_USBSW STM32_USBSW_HSI48 -#define STM32_CECSW STM32_CECSW_HSI -#define STM32_I2C1SW STM32_I2C1SW_HSI -#define STM32_USART1SW STM32_USART1SW_PCLK -#define STM32_RTCSEL STM32_RTCSEL_LSI - -/* - * ADC driver system settings. - */ -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_IRQ_PRIORITY 2 -#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 - -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 -#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 -#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 - -/* - * GPT driver system settings. - */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM14 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 2 -#define STM32_GPT_TIM2_IRQ_PRIORITY 2 -#define STM32_GPT_TIM3_IRQ_PRIORITY 2 -#define STM32_GPT_TIM14_IRQ_PRIORITY 2 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_IRQ_PRIORITY 3 -#define STM32_I2C_I2C2_IRQ_PRIORITY 3 -#define STM32_I2C_USE_DMA TRUE -#define STM32_I2C_I2C1_DMA_PRIORITY 1 -#define STM32_I2C_I2C2_DMA_PRIORITY 1 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * ICU driver system settings. - */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 3 -#define STM32_ICU_TIM2_IRQ_PRIORITY 3 -#define STM32_ICU_TIM3_IRQ_PRIORITY 3 - -/* - * PWM driver system settings. - */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 3 -#define STM32_PWM_TIM2_IRQ_PRIORITY 3 -#define STM32_PWM_TIM3_IRQ_PRIORITY 3 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USART1_PRIORITY 3 -#define STM32_SERIAL_USART2_PRIORITY 3 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 2 -#define STM32_SPI_SPI2_IRQ_PRIORITY 2 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 2 -#define STM32_ST_USE_TIMER 2 - -/* - * UART driver system settings. - */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USART1_IRQ_PRIORITY 3 -#define STM32_UART_USART2_IRQ_PRIORITY 3 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. - */ -#define STM32_USB_USE_USB1 TRUE -#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE -#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 - -#endif /* _MCUCONF_H_ */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +/* + * STM32F0xx drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 3...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +#define STM32F0xx_MCUCONF + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 +#define STM32_HSI_ENABLED TRUE +#define STM32_HSI14_ENABLED TRUE +#define STM32_HSI48_ENABLED FALSE +#define STM32_LSI_ENABLED TRUE +#define STM32_HSE_ENABLED FALSE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSI_DIV2 +#define STM32_PREDIV_VALUE 1 +#define STM32_PLLMUL_VALUE 12 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE STM32_PPRE_DIV1 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_ADCSW STM32_ADCSW_HSI14 +#define STM32_USBSW STM32_USBSW_HSI48 +#define STM32_CECSW STM32_CECSW_HSI +#define STM32_I2C1SW STM32_I2C1SW_HSI +#define STM32_USART1SW STM32_USART1SW_PCLK +#define STM32_RTCSEL STM32_RTCSEL_LSI + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_IRQ_PRIORITY 2 +#define STM32_ADC_ADC1_DMA_IRQ_PRIORITY 2 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_1_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI2_3_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI4_15_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 3 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 3 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM14 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 2 +#define STM32_GPT_TIM2_IRQ_PRIORITY 2 +#define STM32_GPT_TIM3_IRQ_PRIORITY 2 +#define STM32_GPT_TIM14_IRQ_PRIORITY 2 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 3 +#define STM32_I2C_I2C2_IRQ_PRIORITY 3 +#define STM32_I2C_USE_DMA TRUE +#define STM32_I2C_I2C1_DMA_PRIORITY 1 +#define STM32_I2C_I2C2_DMA_PRIORITY 1 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 3 +#define STM32_ICU_TIM2_IRQ_PRIORITY 3 +#define STM32_ICU_TIM3_IRQ_PRIORITY 3 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 3 +#define STM32_PWM_TIM2_IRQ_PRIORITY 3 +#define STM32_PWM_TIM3_IRQ_PRIORITY 3 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USART1_PRIORITY 3 +#define STM32_SERIAL_USART2_PRIORITY 3 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 2 +#define STM32_SPI_SPI2_IRQ_PRIORITY 2 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 2 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 3 +#define STM32_UART_USART2_IRQ_PRIORITY 3 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_LP_IRQ_PRIORITY 3 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h b/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h index 626332a6a..276829216 100644 --- a/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h +++ b/keyboards/chibios_test/stm32_f103_onekey/mcuconf.h @@ -1,209 +1,209 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MCUCONF_H_ -#define _MCUCONF_H_ - -#define STM32F103_MCUCONF - -/* - * STM32F103 drivers configuration. - * The following settings override the default settings present in - * the various device driver implementation headers. - * Note that the settings for each driver only have effect if the whole - * driver is enabled in halconf.h. - * - * IRQ priorities: - * 15...0 Lowest...Highest. - * - * DMA priorities: - * 0...3 Lowest...Highest. - */ - -/* - * HAL driver system settings. - */ -#define STM32_NO_INIT FALSE -#define STM32_HSI_ENABLED TRUE -#define STM32_LSI_ENABLED FALSE -#define STM32_HSE_ENABLED TRUE -#define STM32_LSE_ENABLED FALSE -#define STM32_SW STM32_SW_PLL -#define STM32_PLLSRC STM32_PLLSRC_HSE -#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 -#define STM32_PLLMUL_VALUE 9 -#define STM32_HPRE STM32_HPRE_DIV1 -#define STM32_PPRE1 STM32_PPRE1_DIV2 -#define STM32_PPRE2 STM32_PPRE2_DIV2 -#define STM32_ADCPRE STM32_ADCPRE_DIV4 -#define STM32_USB_CLOCK_REQUIRED TRUE -#define STM32_USBPRE STM32_USBPRE_DIV1P5 -#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK -#define STM32_RTCSEL STM32_RTCSEL_HSEDIV -#define STM32_PVD_ENABLE FALSE -#define STM32_PLS STM32_PLS_LEV0 - -/* - * ADC driver system settings. - */ -#define STM32_ADC_USE_ADC1 FALSE -#define STM32_ADC_ADC1_DMA_PRIORITY 2 -#define STM32_ADC_ADC1_IRQ_PRIORITY 6 - -/* - * CAN driver system settings. - */ -#define STM32_CAN_USE_CAN1 FALSE -#define STM32_CAN_CAN1_IRQ_PRIORITY 11 - -/* - * EXT driver system settings. - */ -#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 -#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 - -/* - * GPT driver system settings. - */ -#define STM32_GPT_USE_TIM1 FALSE -#define STM32_GPT_USE_TIM2 FALSE -#define STM32_GPT_USE_TIM3 FALSE -#define STM32_GPT_USE_TIM4 FALSE -#define STM32_GPT_USE_TIM5 FALSE -#define STM32_GPT_USE_TIM8 FALSE -#define STM32_GPT_TIM1_IRQ_PRIORITY 7 -#define STM32_GPT_TIM2_IRQ_PRIORITY 7 -#define STM32_GPT_TIM3_IRQ_PRIORITY 7 -#define STM32_GPT_TIM4_IRQ_PRIORITY 7 -#define STM32_GPT_TIM5_IRQ_PRIORITY 7 -#define STM32_GPT_TIM8_IRQ_PRIORITY 7 - -/* - * I2C driver system settings. - */ -#define STM32_I2C_USE_I2C1 FALSE -#define STM32_I2C_USE_I2C2 FALSE -#define STM32_I2C_BUSY_TIMEOUT 50 -#define STM32_I2C_I2C1_IRQ_PRIORITY 5 -#define STM32_I2C_I2C2_IRQ_PRIORITY 5 -#define STM32_I2C_I2C1_DMA_PRIORITY 3 -#define STM32_I2C_I2C2_DMA_PRIORITY 3 -#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") - -/* - * ICU driver system settings. - */ -#define STM32_ICU_USE_TIM1 FALSE -#define STM32_ICU_USE_TIM2 FALSE -#define STM32_ICU_USE_TIM3 FALSE -#define STM32_ICU_USE_TIM4 FALSE -#define STM32_ICU_USE_TIM5 FALSE -#define STM32_ICU_USE_TIM8 FALSE -#define STM32_ICU_TIM1_IRQ_PRIORITY 7 -#define STM32_ICU_TIM2_IRQ_PRIORITY 7 -#define STM32_ICU_TIM3_IRQ_PRIORITY 7 -#define STM32_ICU_TIM4_IRQ_PRIORITY 7 -#define STM32_ICU_TIM5_IRQ_PRIORITY 7 -#define STM32_ICU_TIM8_IRQ_PRIORITY 7 - -/* - * PWM driver system settings. - */ -#define STM32_PWM_USE_ADVANCED FALSE -#define STM32_PWM_USE_TIM1 FALSE -#define STM32_PWM_USE_TIM2 FALSE -#define STM32_PWM_USE_TIM3 FALSE -#define STM32_PWM_USE_TIM4 FALSE -#define STM32_PWM_USE_TIM5 FALSE -#define STM32_PWM_USE_TIM8 FALSE -#define STM32_PWM_TIM1_IRQ_PRIORITY 7 -#define STM32_PWM_TIM2_IRQ_PRIORITY 7 -#define STM32_PWM_TIM3_IRQ_PRIORITY 7 -#define STM32_PWM_TIM4_IRQ_PRIORITY 7 -#define STM32_PWM_TIM5_IRQ_PRIORITY 7 -#define STM32_PWM_TIM8_IRQ_PRIORITY 7 - -/* - * RTC driver system settings. - */ -#define STM32_RTC_IRQ_PRIORITY 15 - -/* - * SERIAL driver system settings. - */ -#define STM32_SERIAL_USE_USART1 FALSE -#define STM32_SERIAL_USE_USART2 FALSE -#define STM32_SERIAL_USE_USART3 FALSE -#define STM32_SERIAL_USE_UART4 FALSE -#define STM32_SERIAL_USE_UART5 FALSE -#define STM32_SERIAL_USART1_PRIORITY 12 -#define STM32_SERIAL_USART2_PRIORITY 12 -#define STM32_SERIAL_USART3_PRIORITY 12 -#define STM32_SERIAL_UART4_PRIORITY 12 -#define STM32_SERIAL_UART5_PRIORITY 12 - -/* - * SPI driver system settings. - */ -#define STM32_SPI_USE_SPI1 FALSE -#define STM32_SPI_USE_SPI2 FALSE -#define STM32_SPI_USE_SPI3 FALSE -#define STM32_SPI_SPI1_DMA_PRIORITY 1 -#define STM32_SPI_SPI2_DMA_PRIORITY 1 -#define STM32_SPI_SPI3_DMA_PRIORITY 1 -#define STM32_SPI_SPI1_IRQ_PRIORITY 10 -#define STM32_SPI_SPI2_IRQ_PRIORITY 10 -#define STM32_SPI_SPI3_IRQ_PRIORITY 10 -#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") - -/* - * ST driver system settings. - */ -#define STM32_ST_IRQ_PRIORITY 8 -#define STM32_ST_USE_TIMER 2 - -/* - * UART driver system settings. - */ -#define STM32_UART_USE_USART1 FALSE -#define STM32_UART_USE_USART2 FALSE -#define STM32_UART_USE_USART3 FALSE -#define STM32_UART_USART1_IRQ_PRIORITY 12 -#define STM32_UART_USART2_IRQ_PRIORITY 12 -#define STM32_UART_USART3_IRQ_PRIORITY 12 -#define STM32_UART_USART1_DMA_PRIORITY 0 -#define STM32_UART_USART2_DMA_PRIORITY 0 -#define STM32_UART_USART3_DMA_PRIORITY 0 -#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") - -/* - * USB driver system settings. - */ -#define STM32_USB_USE_USB1 TRUE -#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE -#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 -#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 - -#endif /* _MCUCONF_H_ */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define STM32F103_MCUCONF + +/* + * STM32F103 drivers configuration. + * The following settings override the default settings present in + * the various device driver implementation headers. + * Note that the settings for each driver only have effect if the whole + * driver is enabled in halconf.h. + * + * IRQ priorities: + * 15...0 Lowest...Highest. + * + * DMA priorities: + * 0...3 Lowest...Highest. + */ + +/* + * HAL driver system settings. + */ +#define STM32_NO_INIT FALSE +#define STM32_HSI_ENABLED TRUE +#define STM32_LSI_ENABLED FALSE +#define STM32_HSE_ENABLED TRUE +#define STM32_LSE_ENABLED FALSE +#define STM32_SW STM32_SW_PLL +#define STM32_PLLSRC STM32_PLLSRC_HSE +#define STM32_PLLXTPRE STM32_PLLXTPRE_DIV1 +#define STM32_PLLMUL_VALUE 9 +#define STM32_HPRE STM32_HPRE_DIV1 +#define STM32_PPRE1 STM32_PPRE1_DIV2 +#define STM32_PPRE2 STM32_PPRE2_DIV2 +#define STM32_ADCPRE STM32_ADCPRE_DIV4 +#define STM32_USB_CLOCK_REQUIRED TRUE +#define STM32_USBPRE STM32_USBPRE_DIV1P5 +#define STM32_MCOSEL STM32_MCOSEL_NOCLOCK +#define STM32_RTCSEL STM32_RTCSEL_HSEDIV +#define STM32_PVD_ENABLE FALSE +#define STM32_PLS STM32_PLS_LEV0 + +/* + * ADC driver system settings. + */ +#define STM32_ADC_USE_ADC1 FALSE +#define STM32_ADC_ADC1_DMA_PRIORITY 2 +#define STM32_ADC_ADC1_IRQ_PRIORITY 6 + +/* + * CAN driver system settings. + */ +#define STM32_CAN_USE_CAN1 FALSE +#define STM32_CAN_CAN1_IRQ_PRIORITY 11 + +/* + * EXT driver system settings. + */ +#define STM32_EXT_EXTI0_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI1_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI2_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI3_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI4_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI5_9_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI10_15_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI16_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI17_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI18_IRQ_PRIORITY 6 +#define STM32_EXT_EXTI19_IRQ_PRIORITY 6 + +/* + * GPT driver system settings. + */ +#define STM32_GPT_USE_TIM1 FALSE +#define STM32_GPT_USE_TIM2 FALSE +#define STM32_GPT_USE_TIM3 FALSE +#define STM32_GPT_USE_TIM4 FALSE +#define STM32_GPT_USE_TIM5 FALSE +#define STM32_GPT_USE_TIM8 FALSE +#define STM32_GPT_TIM1_IRQ_PRIORITY 7 +#define STM32_GPT_TIM2_IRQ_PRIORITY 7 +#define STM32_GPT_TIM3_IRQ_PRIORITY 7 +#define STM32_GPT_TIM4_IRQ_PRIORITY 7 +#define STM32_GPT_TIM5_IRQ_PRIORITY 7 +#define STM32_GPT_TIM8_IRQ_PRIORITY 7 + +/* + * I2C driver system settings. + */ +#define STM32_I2C_USE_I2C1 FALSE +#define STM32_I2C_USE_I2C2 FALSE +#define STM32_I2C_BUSY_TIMEOUT 50 +#define STM32_I2C_I2C1_IRQ_PRIORITY 5 +#define STM32_I2C_I2C2_IRQ_PRIORITY 5 +#define STM32_I2C_I2C1_DMA_PRIORITY 3 +#define STM32_I2C_I2C2_DMA_PRIORITY 3 +#define STM32_I2C_DMA_ERROR_HOOK(i2cp) osalSysHalt("DMA failure") + +/* + * ICU driver system settings. + */ +#define STM32_ICU_USE_TIM1 FALSE +#define STM32_ICU_USE_TIM2 FALSE +#define STM32_ICU_USE_TIM3 FALSE +#define STM32_ICU_USE_TIM4 FALSE +#define STM32_ICU_USE_TIM5 FALSE +#define STM32_ICU_USE_TIM8 FALSE +#define STM32_ICU_TIM1_IRQ_PRIORITY 7 +#define STM32_ICU_TIM2_IRQ_PRIORITY 7 +#define STM32_ICU_TIM3_IRQ_PRIORITY 7 +#define STM32_ICU_TIM4_IRQ_PRIORITY 7 +#define STM32_ICU_TIM5_IRQ_PRIORITY 7 +#define STM32_ICU_TIM8_IRQ_PRIORITY 7 + +/* + * PWM driver system settings. + */ +#define STM32_PWM_USE_ADVANCED FALSE +#define STM32_PWM_USE_TIM1 FALSE +#define STM32_PWM_USE_TIM2 FALSE +#define STM32_PWM_USE_TIM3 FALSE +#define STM32_PWM_USE_TIM4 FALSE +#define STM32_PWM_USE_TIM5 FALSE +#define STM32_PWM_USE_TIM8 FALSE +#define STM32_PWM_TIM1_IRQ_PRIORITY 7 +#define STM32_PWM_TIM2_IRQ_PRIORITY 7 +#define STM32_PWM_TIM3_IRQ_PRIORITY 7 +#define STM32_PWM_TIM4_IRQ_PRIORITY 7 +#define STM32_PWM_TIM5_IRQ_PRIORITY 7 +#define STM32_PWM_TIM8_IRQ_PRIORITY 7 + +/* + * RTC driver system settings. + */ +#define STM32_RTC_IRQ_PRIORITY 15 + +/* + * SERIAL driver system settings. + */ +#define STM32_SERIAL_USE_USART1 FALSE +#define STM32_SERIAL_USE_USART2 FALSE +#define STM32_SERIAL_USE_USART3 FALSE +#define STM32_SERIAL_USE_UART4 FALSE +#define STM32_SERIAL_USE_UART5 FALSE +#define STM32_SERIAL_USART1_PRIORITY 12 +#define STM32_SERIAL_USART2_PRIORITY 12 +#define STM32_SERIAL_USART3_PRIORITY 12 +#define STM32_SERIAL_UART4_PRIORITY 12 +#define STM32_SERIAL_UART5_PRIORITY 12 + +/* + * SPI driver system settings. + */ +#define STM32_SPI_USE_SPI1 FALSE +#define STM32_SPI_USE_SPI2 FALSE +#define STM32_SPI_USE_SPI3 FALSE +#define STM32_SPI_SPI1_DMA_PRIORITY 1 +#define STM32_SPI_SPI2_DMA_PRIORITY 1 +#define STM32_SPI_SPI3_DMA_PRIORITY 1 +#define STM32_SPI_SPI1_IRQ_PRIORITY 10 +#define STM32_SPI_SPI2_IRQ_PRIORITY 10 +#define STM32_SPI_SPI3_IRQ_PRIORITY 10 +#define STM32_SPI_DMA_ERROR_HOOK(spip) osalSysHalt("DMA failure") + +/* + * ST driver system settings. + */ +#define STM32_ST_IRQ_PRIORITY 8 +#define STM32_ST_USE_TIMER 2 + +/* + * UART driver system settings. + */ +#define STM32_UART_USE_USART1 FALSE +#define STM32_UART_USE_USART2 FALSE +#define STM32_UART_USE_USART3 FALSE +#define STM32_UART_USART1_IRQ_PRIORITY 12 +#define STM32_UART_USART2_IRQ_PRIORITY 12 +#define STM32_UART_USART3_IRQ_PRIORITY 12 +#define STM32_UART_USART1_DMA_PRIORITY 0 +#define STM32_UART_USART2_DMA_PRIORITY 0 +#define STM32_UART_USART3_DMA_PRIORITY 0 +#define STM32_UART_DMA_ERROR_HOOK(uartp) osalSysHalt("DMA failure") + +/* + * USB driver system settings. + */ +#define STM32_USB_USE_USB1 TRUE +#define STM32_USB_LOW_POWER_ON_SUSPEND FALSE +#define STM32_USB_USB1_HP_IRQ_PRIORITY 13 +#define STM32_USB_USB1_LP_IRQ_PRIORITY 14 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/chibios_test/teensy_lc_onekey/chconf.h b/keyboards/chibios_test/teensy_lc_onekey/chconf.h index cb36996c3..3294ac7ee 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/chconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/chconf.h @@ -1,524 +1,524 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/chconf.h - * @brief Configuration file template. - * @details A copy of this file must be placed in each project directory, it - * contains the application specific kernel settings. - * - * @addtogroup config - * @details Kernel related settings and hooks. - * @{ - */ - -#ifndef CHCONF_H -#define CHCONF_H - -#define _CHIBIOS_RT_CONF_ - -/*===========================================================================*/ -/** - * @name System timers settings - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. - */ -#define CH_CFG_ST_RESOLUTION 32 - -/** - * @brief System tick frequency. - * @details Frequency of the system timer that drives the system ticks. This - * setting also defines the system tick time unit. - */ -#define CH_CFG_ST_FREQUENCY 1000 - -/** - * @brief Time delta constant for the tick-less mode. - * @note If this value is zero then the system uses the classic - * periodic tick. This value represents the minimum number - * of ticks that is safe to specify in a timeout directive. - * The value one is not valid, timeouts are rounded up to - * this value. - */ -#define CH_CFG_ST_TIMEDELTA 0 - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel parameters and options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Round robin interval. - * @details This constant is the number of system ticks allowed for the - * threads before preemption occurs. Setting this value to zero - * disables the preemption for threads with equal priority and the - * round robin becomes cooperative. Note that higher priority - * threads can still preempt, the kernel is always preemptive. - * @note Disabling the round robin preemption makes the kernel more compact - * and generally faster. - * @note The round robin preemption is not supported in tickless mode and - * must be set to zero in that case. - */ -#define CH_CFG_TIME_QUANTUM 20 - -/** - * @brief Managed RAM size. - * @details Size of the RAM area to be managed by the OS. If set to zero - * then the whole available RAM is used. The core memory is made - * available to the heap allocator and/or can be used directly through - * the simplified core memory allocator. - * - * @note In order to let the OS manage the whole RAM the linker script must - * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_CFG_USE_MEMCORE. - */ -#define CH_CFG_MEMCORE_SIZE 0 - -/** - * @brief Idle thread automatic spawn suppression. - * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread. The application @p main() - * function becomes the idle thread and must implement an - * infinite loop. - */ -#define CH_CFG_NO_IDLE_THREAD FALSE - -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Performance options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief OS optimization. - * @details If enabled then time efficient rather than space efficient code - * is used when two possible implementations exist. - * - * @note This is not related to the compiler optimization options. - * @note The default is @p TRUE. - */ -#define CH_CFG_OPTIMIZE_SPEED TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Subsystem options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Time Measurement APIs. - * @details If enabled then the time measurement APIs are included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_TM FALSE - -/** - * @brief Threads registry APIs. - * @details If enabled then the registry APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_REGISTRY TRUE - -/** - * @brief Threads synchronization APIs. - * @details If enabled then the @p chThdWait() function is included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_WAITEXIT TRUE - -/** - * @brief Semaphores APIs. - * @details If enabled then the Semaphores APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_SEMAPHORES TRUE - -/** - * @brief Semaphores queuing mode. - * @details If enabled then the threads are enqueued on semaphores by - * priority rather than in FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE - -/** - * @brief Mutexes APIs. - * @details If enabled then the mutexes APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MUTEXES TRUE - -/** - * @brief Enables recursive behavior on mutexes. - * @note Recursive mutexes are heavier and have an increased - * memory footprint. - * - * @note The default is @p FALSE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE - -/** - * @brief Conditional Variables APIs. - * @details If enabled then the conditional variables APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_CONDVARS TRUE - -/** - * @brief Conditional Variables APIs with timeout. - * @details If enabled then the conditional variables APIs with timeout - * specification are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_CONDVARS. - */ -#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE - -/** - * @brief Events Flags APIs. - * @details If enabled then the event flags APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_EVENTS TRUE - -/** - * @brief Events Flags APIs with timeout. - * @details If enabled then the events APIs with timeout specification - * are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_EVENTS. - */ -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE - -/** - * @brief Synchronous Messages APIs. - * @details If enabled then the synchronous messages APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MESSAGES TRUE - -/** - * @brief Synchronous Messages queuing mode. - * @details If enabled then messages are served by priority rather than in - * FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_MESSAGES. - */ -#define CH_CFG_USE_MESSAGES_PRIORITY FALSE - -/** - * @brief Mailboxes APIs. - * @details If enabled then the asynchronous messages (mailboxes) APIs are - * included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_MAILBOXES TRUE - -/** - * @brief Core Memory Manager APIs. - * @details If enabled then the core memory manager APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMCORE TRUE - -/** - * @brief Heap Allocator APIs. - * @details If enabled then the memory heap allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or - * @p CH_CFG_USE_SEMAPHORES. - * @note Mutexes are recommended. - */ -#define CH_CFG_USE_HEAP TRUE - -/** - * @brief Memory Pools Allocator APIs. - * @details If enabled then the memory pools allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMPOOLS TRUE - -/** - * @brief Dynamic Threads APIs. - * @details If enabled then the dynamic threads creation APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_WAITEXIT. - * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. - */ -#define CH_CFG_USE_DYNAMIC TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Debug options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Debug option, kernel statistics. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_STATISTICS FALSE - -/** - * @brief Debug option, system state check. - * @details If enabled the correct call protocol for system APIs is checked - * at runtime. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_SYSTEM_STATE_CHECK TRUE - -/** - * @brief Debug option, parameters checks. - * @details If enabled then the checks on the API functions input - * parameters are activated. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_CHECKS TRUE - -/** - * @brief Debug option, consistency checks. - * @details If enabled then all the assertions in the kernel code are - * activated. This includes consistency checks inside the kernel, - * runtime anomalies and port-defined checks. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_ASSERTS TRUE - -/** - * @brief Debug option, trace buffer. - * @details If enabled then the trace buffer is activated. - * - * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED - -/** - * @brief Trace buffer entries. - * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is - * different from @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_BUFFER_SIZE 128 - -/** - * @brief Debug option, stack checks. - * @details If enabled then a runtime stack check is performed. - * - * @note The default is @p FALSE. - * @note The stack check is performed in a architecture/port dependent way. - * It may not be implemented or some ports. - * @note The default failure mode is to halt the system with the global - * @p panic_msg variable set to @p NULL. - */ -#define CH_DBG_ENABLE_STACK_CHECK TRUE - -/** - * @brief Debug option, stacks initialization. - * @details If enabled then the threads working area is filled with a byte - * value when a thread is created. This can be useful for the - * runtime measurement of the used stack. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_FILL_THREADS TRUE - -/** - * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p thread_t structure that - * counts the system ticks occurred while executing the thread. - * - * @note The default is @p FALSE. - * @note This debug option is not currently compatible with the - * tickless mode. - */ -#define CH_DBG_THREADS_PROFILING FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel hooks - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p thread_t structure. - */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ - -/** - * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. - * - * @note It is invoked from within @p chThdInit() and implicitly from all - * the threads creation APIs. - */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads finalization hook. - * @details User finalization code added to the @p chThdExit() API. - */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ - /* Add threads finalization code here.*/ \ -} - -/** - * @brief Context switch hook. - * @details This hook is invoked just before switching between threads. - */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} - -/** - * @brief ISR enter hook. - */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} - -/** - * @brief ISR exit hook. - */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} - -/** - * @brief Idle thread enter hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to activate a power saving mode. - */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} - -/** - * @brief Idle thread leave hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to deactivate a power saving mode. - */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} - -/** - * @brief Idle Loop hook. - * @details This hook is continuously invoked by the idle thread loop. - */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} - -/** - * @brief System tick event hook. - * @details This hook is invoked in the system tick handler immediately - * after processing the virtual timers queue. - */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} - -/** - * @brief System halt hook. - * @details This hook is invoked in case to a system halting error before - * the system is halted. - */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} - -/** - * @brief Trace hook. - * @details This hook is invoked each time a new record is written in the - * trace buffer. - */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} - -/** @} */ - -/*===========================================================================*/ -/* Port-specific settings (override port settings defaulted in chcore.h). */ -/*===========================================================================*/ - -#endif /* CHCONF_H */ - -/** @} */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 1000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK TRUE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS TRUE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS TRUE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK TRUE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS TRUE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/chibios_test/teensy_lc_onekey/halconf.h b/keyboards/chibios_test/teensy_lc_onekey/halconf.h index b1d2cd550..0436408b0 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/halconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/halconf.h @@ -1,187 +1,187 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. - * - * @addtogroup HAL_CONF - * @{ - */ - -#ifndef _HALCONF_H_ -#define _HALCONF_H_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the EXT subsystem. - */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB FALSE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -#endif /* _HALCONF_H_ */ - -/** @} */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB FALSE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h b/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h index c63659019..2764e8898 100644 --- a/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h +++ b/keyboards/chibios_test/teensy_lc_onekey/mcuconf.h @@ -1,55 +1,55 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MCUCONF_H_ -#define _MCUCONF_H_ - -#define KL2x_MCUCONF - -/* - * HAL driver system settings. - */ -#if 1 -/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ -#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE -#define KINETIS_PLLCLK_FREQUENCY 96000000UL -#define KINETIS_SYSCLK_FREQUENCY 48000000UL -#endif - -#if 0 -/* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */ -#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI -#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ -#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ -#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ -#define KINETIS_CLKDIV1_OUTDIV1 1 /* do not divide system clock */ -#endif - -/* - * SERIAL driver system settings. - */ -#define KINETIS_SERIAL_USE_UART0 TRUE - -/* - * USB driver settings - */ -#define KINETIS_USB_USE_USB0 TRUE -/* Need to redefine this, since the default is for K20x */ -/* This is for Teensy LC; you should comment it out (or change to 5) - * for Teensy 3.x */ -#define KINETIS_USB_USB0_IRQ_PRIORITY 2 - -#endif /* _MCUCONF_H_ */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define KL2x_MCUCONF + +/* + * HAL driver system settings. + */ +#if 1 +/* PEE mode - 48MHz system clock driven by (16 MHz) external crystal. */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_PEE +#define KINETIS_PLLCLK_FREQUENCY 96000000UL +#define KINETIS_SYSCLK_FREQUENCY 48000000UL +#endif + +#if 0 +/* crystal-less FEI mode - 48 MHz with internal 32.768 kHz crystal */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI +#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ +#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ +#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ +#define KINETIS_CLKDIV1_OUTDIV1 1 /* do not divide system clock */ +#endif + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE +/* Need to redefine this, since the default is for K20x */ +/* This is for Teensy LC; you should comment it out (or change to 5) + * for Teensy 3.x */ +#define KINETIS_USB_USB0_IRQ_PRIORITY 2 + +#endif /* _MCUCONF_H_ */ diff --git a/keyboards/gh60/Makefile b/keyboards/gh60/Makefile index 39a9cc0ae..075b77256 100644 --- a/keyboards/gh60/Makefile +++ b/keyboards/gh60/Makefile @@ -1,74 +1,74 @@ - - -# MCU name -#MCU = at90usb1287 -MCU = atmega32u4 - -# Processor frequency. -# This will define a symbol, F_CPU, in all source code files equal to the -# processor frequency in Hz. You can then use this symbol in your source code to -# calculate timings. Do NOT tack on a 'UL' at the end, this will be done -# automatically to create a 32-bit value in your source code. -# -# This will be an integer division of F_USB below, as it is sourced by -# F_USB after it has run through any CPU prescalers. Note that this value -# does not *change* the processor frequency - it should merely be updated to -# reflect the processor speed set externally so that the code can use accurate -# software delays. -F_CPU = 16000000 - - -# -# LUFA specific -# -# Target architecture (see library "Board Types" documentation). -ARCH = AVR8 - -# Input clock frequency. -# This will define a symbol, F_USB, in all source code files equal to the -# input clock frequency (before any prescaling is performed) in Hz. This value may -# differ from F_CPU if prescaling is used on the latter, and is required as the -# raw input clock is fed directly to the PLL sections of the AVR for high speed -# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' -# at the end, this will be done automatically to create a 32-bit value in your -# source code. -# -# If no clock division is performed on the input clock inside the AVR (via the -# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. -F_USB = $(F_CPU) - -# Interrupt driven control endpoint task(+60) -OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT - - -# Boot Section Size in *bytes* -# Teensy halfKay 512 -# Teensy++ halfKay 1024 -# Atmel DFU loader 4096 -# LUFA bootloader 4096 -# USBaspLoader 2048 -OPT_DEFS += -DBOOTLOADER_SIZE=4096 - - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -# CONSOLE_ENABLE ?= yes # Console for debug(+400) -# COMMAND_ENABLE ?= yes # Commands for debug and configuration -KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key -# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE -# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -# MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID - - -ifndef QUANTUM_DIR - include ../../Makefile -endif - + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID + + +ifndef QUANTUM_DIR + include ../../Makefile +endif + diff --git a/keyboards/gh60/config.h b/keyboards/gh60/config.h index 4813c4e78..97753bc06 100644 --- a/keyboards/gh60/config.h +++ b/keyboards/gh60/config.h @@ -1,161 +1,161 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER geekhack -#define PRODUCT GH60 -#define DESCRIPTION t.m.k. keyboard firmware for GH60 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ - #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -// Rev A -// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } -// Rev B/C - #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER geekhack +#define PRODUCT GH60 +#define DESCRIPTION t.m.k. keyboard firmware for GH60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +// Rev A +// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } +// Rev B/C + #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/gh60/gh60.c b/keyboards/gh60/gh60.c index 255d87de9..f5a158e12 100644 --- a/keyboards/gh60/gh60.c +++ b/keyboards/gh60/gh60.c @@ -1,25 +1,25 @@ -#include "gh60.h" - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (usb_led & (1< - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER geekhack -#define PRODUCT GH60 -#define DESCRIPTION t.m.k. keyboard firmware for GH60 - -/* key matrix size */ -#define MATRIX_ROWS 5 -#define MATRIX_COLS 14 - -/* - * Keyboard Matrix Assignments - * - * Change this to how you wired your keyboard - * COLS: AVR pins used for columns, left to right - * ROWS: AVR pins used for rows, top to bottom - * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) - * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) - * -*/ - #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } -// Rev A -// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } -// Rev B/C - #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ -#define DEBOUNCING_DELAY 5 - -/* define if matrix has ghost (lacks anti-ghosting diodes) */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* - * Force NKRO - * - * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved - * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the - * makefile for this to work.) - * - * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) - * until the next keyboard reset. - * - * NKRO may prevent your keystrokes from being detected in the BIOS, but it is - * fully operational during normal computer usage. - * - * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) - * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by - * bootmagic, NKRO mode will always be enabled until it is toggled again during a - * power-up. - * - */ -//#define FORCE_NKRO - -/* - * Magic Key Options - * - * Magic keys are hotkey commands that allow control over firmware functions of - * the keyboard. They are best used in combination with the HID Listen program, - * found here: https://www.pjrc.com/teensy/hid_listen.html - * - * The options below allow the magic key functionality to be changed. This is - * useful if your keyboard/keypad is missing keys and you want magic key support. - * - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* override magic key keymap */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -//#define MAGIC_KEY_LOCK CAPS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -/* - * RGB Underglow - * These settings are for the F4 by default: - * - * - * #define ws2812_PORTREG PORTF - * #define ws2812_DDRREG DDRF - * #define ws2812_pin PF4 - * #define RGBLED_NUM 14 // Number of LEDs - * #define RGBLIGHT_HUE_STEP 10 - * #define RGBLIGHT_SAT_STEP 17 - * #define RGBLIGHT_VAL_STEP 17 - * - * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. - * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. - * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c -*/ - -/* Deprecated code below -#define ws2812_PORTREG PORTF -#define ws2812_DDRREG DDRF -#define ws2812_pin PF4 -*/ -#define RGB_DI_PIN F4 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 8 // Number of LEDs -#define RGBLIGHT_HUE_STEP 8 -#define RGBLIGHT_SAT_STEP 8 -#define RGBLIGHT_VAL_STEP 8 -#endif +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER geekhack +#define PRODUCT GH60 +#define DESCRIPTION t.m.k. keyboard firmware for GH60 + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 14 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ + #define MATRIX_ROW_PINS { D0, D1, D2, D3, D5 } +// Rev A +// #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B0, B5, B4, D7, D6, B3 } +// Rev B/C + #define MATRIX_COL_PINS { F0, F1, E6, C7, C6, B6, D4, B1, B7, B5, B4, D7, D6, B3 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* + * Force NKRO + * + * Force NKRO (nKey Rollover) to be enabled by default, regardless of the saved + * state in the bootmagic EEPROM settings. (Note that NKRO must be enabled in the + * makefile for this to work.) + * + * If forced on, NKRO can be disabled via magic key (default = LShift+RShift+N) + * until the next keyboard reset. + * + * NKRO may prevent your keystrokes from being detected in the BIOS, but it is + * fully operational during normal computer usage. + * + * For a less heavy-handed approach, enable NKRO via magic key (LShift+RShift+N) + * or via bootmagic (hold SPACE+N while plugging in the keyboard). Once set by + * bootmagic, NKRO mode will always be enabled until it is toggled again during a + * power-up. + * + */ +//#define FORCE_NKRO + +/* + * Magic Key Options + * + * Magic keys are hotkey commands that allow control over firmware functions of + * the keyboard. They are best used in combination with the HID Listen program, + * found here: https://www.pjrc.com/teensy/hid_listen.html + * + * The options below allow the magic key functionality to be changed. This is + * useful if your keyboard/keypad is missing keys and you want magic key support. + * + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* override magic key keymap */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +//#define MAGIC_KEY_LOCK CAPS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +/* + * RGB Underglow + * These settings are for the F4 by default: + * + * + * #define ws2812_PORTREG PORTF + * #define ws2812_DDRREG DDRF + * #define ws2812_pin PF4 + * #define RGBLED_NUM 14 // Number of LEDs + * #define RGBLIGHT_HUE_STEP 10 + * #define RGBLIGHT_SAT_STEP 17 + * #define RGBLIGHT_VAL_STEP 17 + * + * The firmware supports 5 different light effects, and the color (hue, saturation, brightness) can be customized in most effects. + * To control the underglow, you need to modify your keymap file to assign those functions to some keys/key combinations. + * For details, please check this keymap. keyboard/planck/keymaps/yang/keymap.c +*/ + +/* Deprecated code below +#define ws2812_PORTREG PORTF +#define ws2812_DDRREG DDRF +#define ws2812_pin PF4 +*/ +#define RGB_DI_PIN F4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 +#endif diff --git a/keyboards/gh60/pinout.txt b/keyboards/gh60/pinout.txt index 3787f938e..e9bf1983a 100644 --- a/keyboards/gh60/pinout.txt +++ b/keyboards/gh60/pinout.txt @@ -1,18 +1,18 @@ - /* Column pin configuration - * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) - */ - - /* Row pin configuration - * row: 0 1 2 3 4 - * pin: D0 D1 D2 D3 D5 - */ - - GPIO pads - 0 F7 WASD LEDs - 1 F6 ESC LED - 2 F5 FN LED - 3 F4 POKER Arrow LEDs - - B2 Capslock LED + /* Column pin configuration + * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) + */ + + /* Row pin configuration + * row: 0 1 2 3 4 + * pin: D0 D1 D2 D3 D5 + */ + + GPIO pads + 0 F7 WASD LEDs + 1 F6 ESC LED + 2 F5 FN LED + 3 F4 POKER Arrow LEDs + + B2 Capslock LED B0 not connected \ No newline at end of file diff --git a/keyboards/gh60/readme.md b/keyboards/gh60/readme.md index 92302d507..ad042483d 100644 --- a/keyboards/gh60/readme.md +++ b/keyboards/gh60/readme.md @@ -1,60 +1,60 @@ -## gh60 Rev C keyboard firmware - -![gh60 Rev C PCB](gh60revc.jpg) - - /* Column pin configuration - * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 - * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) - */ - - /* Row pin configuration - * row: 0 1 2 3 4 - * pin: D0 D1 D2 D3 D5 - */ - - GPIO pads - 0 F7 WASD LEDs - 1 F6 ESC LED - 2 F5 FN LED - 3 F4 POKER Arrow LEDs - - B2 Capslock LED - B0 not connected - -Functions to controls LED clusters - - gh60_caps_led_on() - gh60_poker_leds_on() - gh60_fn_led_on() - gh60_esc_led_on() - gh60_wasd_leds_on() - - gh60_caps_led_off() - gh60_poker_leds_off() - gh60_fn_led_off() - gh60_esc_led_off() - gh60_wasd_leds_off() - -====================== - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: -``` -$ make KEYMAP=[default|jack|] -``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. +## gh60 Rev C keyboard firmware + +![gh60 Rev C PCB](gh60revc.jpg) + + /* Column pin configuration + * col: 0 1 2 3 4 5 6 7 8 9 10 11 12 13 + * pin: F0 F1 E6 C7 C6 B6 D4 B1 B7 B5 B4 D7 D6 B3 (Rev.C) + */ + + /* Row pin configuration + * row: 0 1 2 3 4 + * pin: D0 D1 D2 D3 D5 + */ + + GPIO pads + 0 F7 WASD LEDs + 1 F6 ESC LED + 2 F5 FN LED + 3 F4 POKER Arrow LEDs + + B2 Capslock LED + B0 not connected + +Functions to controls LED clusters + + gh60_caps_led_on() + gh60_poker_leds_on() + gh60_fn_led_on() + gh60_esc_led_on() + gh60_wasd_leds_on() + + gh60_caps_led_off() + gh60_poker_leds_off() + gh60_fn_led_off() + gh60_esc_led_off() + gh60_wasd_leds_off() + +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/gh60_rev_c folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` in the keymaps folder, and see keymap document (you can find in top readme.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with `KEYMAP` option like: +``` +$ make KEYMAP=[default|jack|] +``` +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/infinity_chibios/chconf.h b/keyboards/infinity_chibios/chconf.h index b886c383b..43c845739 100644 --- a/keyboards/infinity_chibios/chconf.h +++ b/keyboards/infinity_chibios/chconf.h @@ -1,524 +1,524 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/chconf.h - * @brief Configuration file template. - * @details A copy of this file must be placed in each project directory, it - * contains the application specific kernel settings. - * - * @addtogroup config - * @details Kernel related settings and hooks. - * @{ - */ - -#ifndef CHCONF_H -#define CHCONF_H - -#define _CHIBIOS_RT_CONF_ - -/*===========================================================================*/ -/** - * @name System timers settings - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. - */ -#define CH_CFG_ST_RESOLUTION 32 - -/** - * @brief System tick frequency. - * @details Frequency of the system timer that drives the system ticks. This - * setting also defines the system tick time unit. - */ -#define CH_CFG_ST_FREQUENCY 1000 - -/** - * @brief Time delta constant for the tick-less mode. - * @note If this value is zero then the system uses the classic - * periodic tick. This value represents the minimum number - * of ticks that is safe to specify in a timeout directive. - * The value one is not valid, timeouts are rounded up to - * this value. - */ -#define CH_CFG_ST_TIMEDELTA 0 - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel parameters and options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Round robin interval. - * @details This constant is the number of system ticks allowed for the - * threads before preemption occurs. Setting this value to zero - * disables the preemption for threads with equal priority and the - * round robin becomes cooperative. Note that higher priority - * threads can still preempt, the kernel is always preemptive. - * @note Disabling the round robin preemption makes the kernel more compact - * and generally faster. - * @note The round robin preemption is not supported in tickless mode and - * must be set to zero in that case. - */ -#define CH_CFG_TIME_QUANTUM 20 - -/** - * @brief Managed RAM size. - * @details Size of the RAM area to be managed by the OS. If set to zero - * then the whole available RAM is used. The core memory is made - * available to the heap allocator and/or can be used directly through - * the simplified core memory allocator. - * - * @note In order to let the OS manage the whole RAM the linker script must - * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_CFG_USE_MEMCORE. - */ -#define CH_CFG_MEMCORE_SIZE 0 - -/** - * @brief Idle thread automatic spawn suppression. - * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread. The application @p main() - * function becomes the idle thread and must implement an - * infinite loop. - */ -#define CH_CFG_NO_IDLE_THREAD FALSE - -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Performance options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief OS optimization. - * @details If enabled then time efficient rather than space efficient code - * is used when two possible implementations exist. - * - * @note This is not related to the compiler optimization options. - * @note The default is @p TRUE. - */ -#define CH_CFG_OPTIMIZE_SPEED TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Subsystem options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Time Measurement APIs. - * @details If enabled then the time measurement APIs are included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_TM FALSE - -/** - * @brief Threads registry APIs. - * @details If enabled then the registry APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_REGISTRY TRUE - -/** - * @brief Threads synchronization APIs. - * @details If enabled then the @p chThdWait() function is included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_WAITEXIT TRUE - -/** - * @brief Semaphores APIs. - * @details If enabled then the Semaphores APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_SEMAPHORES TRUE - -/** - * @brief Semaphores queuing mode. - * @details If enabled then the threads are enqueued on semaphores by - * priority rather than in FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE - -/** - * @brief Mutexes APIs. - * @details If enabled then the mutexes APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MUTEXES TRUE - -/** - * @brief Enables recursive behavior on mutexes. - * @note Recursive mutexes are heavier and have an increased - * memory footprint. - * - * @note The default is @p FALSE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE - -/** - * @brief Conditional Variables APIs. - * @details If enabled then the conditional variables APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_CONDVARS TRUE - -/** - * @brief Conditional Variables APIs with timeout. - * @details If enabled then the conditional variables APIs with timeout - * specification are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_CONDVARS. - */ -#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE - -/** - * @brief Events Flags APIs. - * @details If enabled then the event flags APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_EVENTS TRUE - -/** - * @brief Events Flags APIs with timeout. - * @details If enabled then the events APIs with timeout specification - * are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_EVENTS. - */ -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE - -/** - * @brief Synchronous Messages APIs. - * @details If enabled then the synchronous messages APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MESSAGES TRUE - -/** - * @brief Synchronous Messages queuing mode. - * @details If enabled then messages are served by priority rather than in - * FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_MESSAGES. - */ -#define CH_CFG_USE_MESSAGES_PRIORITY FALSE - -/** - * @brief Mailboxes APIs. - * @details If enabled then the asynchronous messages (mailboxes) APIs are - * included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_MAILBOXES TRUE - -/** - * @brief Core Memory Manager APIs. - * @details If enabled then the core memory manager APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMCORE TRUE - -/** - * @brief Heap Allocator APIs. - * @details If enabled then the memory heap allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or - * @p CH_CFG_USE_SEMAPHORES. - * @note Mutexes are recommended. - */ -#define CH_CFG_USE_HEAP TRUE - -/** - * @brief Memory Pools Allocator APIs. - * @details If enabled then the memory pools allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMPOOLS TRUE - -/** - * @brief Dynamic Threads APIs. - * @details If enabled then the dynamic threads creation APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_WAITEXIT. - * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. - */ -#define CH_CFG_USE_DYNAMIC TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Debug options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Debug option, kernel statistics. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_STATISTICS FALSE - -/** - * @brief Debug option, system state check. - * @details If enabled the correct call protocol for system APIs is checked - * at runtime. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_SYSTEM_STATE_CHECK FALSE - -/** - * @brief Debug option, parameters checks. - * @details If enabled then the checks on the API functions input - * parameters are activated. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_CHECKS FALSE - -/** - * @brief Debug option, consistency checks. - * @details If enabled then all the assertions in the kernel code are - * activated. This includes consistency checks inside the kernel, - * runtime anomalies and port-defined checks. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_ASSERTS FALSE - -/** - * @brief Debug option, trace buffer. - * @details If enabled then the trace buffer is activated. - * - * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED - -/** - * @brief Trace buffer entries. - * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is - * different from @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_BUFFER_SIZE 128 - -/** - * @brief Debug option, stack checks. - * @details If enabled then a runtime stack check is performed. - * - * @note The default is @p FALSE. - * @note The stack check is performed in a architecture/port dependent way. - * It may not be implemented or some ports. - * @note The default failure mode is to halt the system with the global - * @p panic_msg variable set to @p NULL. - */ -#define CH_DBG_ENABLE_STACK_CHECK FALSE - -/** - * @brief Debug option, stacks initialization. - * @details If enabled then the threads working area is filled with a byte - * value when a thread is created. This can be useful for the - * runtime measurement of the used stack. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_FILL_THREADS FALSE - -/** - * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p thread_t structure that - * counts the system ticks occurred while executing the thread. - * - * @note The default is @p FALSE. - * @note This debug option is not currently compatible with the - * tickless mode. - */ -#define CH_DBG_THREADS_PROFILING FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel hooks - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p thread_t structure. - */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ - -/** - * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. - * - * @note It is invoked from within @p chThdInit() and implicitly from all - * the threads creation APIs. - */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads finalization hook. - * @details User finalization code added to the @p chThdExit() API. - */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ - /* Add threads finalization code here.*/ \ -} - -/** - * @brief Context switch hook. - * @details This hook is invoked just before switching between threads. - */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} - -/** - * @brief ISR enter hook. - */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} - -/** - * @brief ISR exit hook. - */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} - -/** - * @brief Idle thread enter hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to activate a power saving mode. - */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} - -/** - * @brief Idle thread leave hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to deactivate a power saving mode. - */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} - -/** - * @brief Idle Loop hook. - * @details This hook is continuously invoked by the idle thread loop. - */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} - -/** - * @brief System tick event hook. - * @details This hook is invoked in the system tick handler immediately - * after processing the virtual timers queue. - */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} - -/** - * @brief System halt hook. - * @details This hook is invoked in case to a system halting error before - * the system is halted. - */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} - -/** - * @brief Trace hook. - * @details This hook is invoked each time a new record is written in the - * trace buffer. - */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} - -/** @} */ - -/*===========================================================================*/ -/* Port-specific settings (override port settings defaulted in chcore.h). */ -/*===========================================================================*/ - -#endif /* CHCONF_H */ - -/** @} */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 1000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/infinity_chibios/halconf.h b/keyboards/infinity_chibios/halconf.h index 53538de14..46b37a4f4 100644 --- a/keyboards/infinity_chibios/halconf.h +++ b/keyboards/infinity_chibios/halconf.h @@ -1,353 +1,353 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. - * - * @addtogroup HAL_CONF - * @{ - */ - -#ifndef _HALCONF_H_ -#define _HALCONF_H_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the EXT subsystem. - */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB TRUE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -#endif /* _HALCONF_H_ */ - -/** @} */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/infinity_chibios/mcuconf.h b/keyboards/infinity_chibios/mcuconf.h index 66b6ce25d..f453304b7 100644 --- a/keyboards/infinity_chibios/mcuconf.h +++ b/keyboards/infinity_chibios/mcuconf.h @@ -1,55 +1,55 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -#ifndef _MCUCONF_H_ -#define _MCUCONF_H_ - -#define K20x_MCUCONF - -/* - * HAL driver system settings. - */ - -/* Select the MCU clocking mode below by enabling the appropriate block. */ - -#define KINETIS_NO_INIT FALSE - -/* FEI mode - 48 MHz with internal 32.768 kHz crystal */ -#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI -#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ -#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ -#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ -#define KINETIS_CLKDIV1_OUTDIV1 1 -#define KINETIS_CLKDIV1_OUTDIV2 1 -#define KINETIS_CLKDIV1_OUTDIV4 2 -#define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY -#define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2 - -/* - * SERIAL driver system settings. - */ -#define KINETIS_SERIAL_USE_UART0 TRUE - -/* - * USB driver settings - */ -#define KINETIS_USB_USE_USB0 TRUE -/* Need to redefine this, since the default is for K20x */ -/* This is for Teensy LC; you should comment it out (or change to 5) - * for Teensy 3.x */ -#define KINETIS_USB_USB0_IRQ_PRIORITY 2 - -#endif /* _MCUCONF_H_ */ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +#ifndef _MCUCONF_H_ +#define _MCUCONF_H_ + +#define K20x_MCUCONF + +/* + * HAL driver system settings. + */ + +/* Select the MCU clocking mode below by enabling the appropriate block. */ + +#define KINETIS_NO_INIT FALSE + +/* FEI mode - 48 MHz with internal 32.768 kHz crystal */ +#define KINETIS_MCG_MODE KINETIS_MCG_MODE_FEI +#define KINETIS_MCG_FLL_DMX32 1 /* Fine-tune for 32.768 kHz */ +#define KINETIS_MCG_FLL_DRS 1 /* 1464x FLL factor */ +#define KINETIS_SYSCLK_FREQUENCY 47972352UL /* 32.768 kHz * 1464 (~48 MHz) */ +#define KINETIS_CLKDIV1_OUTDIV1 1 +#define KINETIS_CLKDIV1_OUTDIV2 1 +#define KINETIS_CLKDIV1_OUTDIV4 2 +#define KINETIS_BUSCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY +#define KINETIS_FLASHCLK_FREQUENCY KINETIS_SYSCLK_FREQUENCY/2 + +/* + * SERIAL driver system settings. + */ +#define KINETIS_SERIAL_USE_UART0 TRUE + +/* + * USB driver settings + */ +#define KINETIS_USB_USE_USB0 TRUE +/* Need to redefine this, since the default is for K20x */ +/* This is for Teensy LC; you should comment it out (or change to 5) + * for Teensy 3.x */ +#define KINETIS_USB_USB0_IRQ_PRIORITY 2 + +#endif /* _MCUCONF_H_ */ -- cgit v1.2.3 From 8ab9c5c55a0f90266b1c70e40fc034065ad027de Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sat, 27 Aug 2016 23:14:27 +0300 Subject: Rename infinity_chibios to infinity60, and add readme --- keyboards/infinity60/MEMO.txt | 385 +++++++++++++++ keyboards/infinity60/Makefile | 3 + keyboards/infinity60/bootloader_defs.h | 1 + keyboards/infinity60/chconf.h | 524 +++++++++++++++++++++ keyboards/infinity60/config.h | 77 +++ keyboards/infinity60/halconf.h | 353 ++++++++++++++ keyboards/infinity60/infinity60.c | 17 + keyboards/infinity60/infinity60.h | 66 +++ keyboards/infinity60/keymaps/default/keymap.c | 48 ++ keyboards/infinity60/keymaps/depariel/keymap.c | 82 ++++ keyboards/infinity60/keymaps/hasu/keymap.c | 113 +++++ keyboards/infinity60/led.c | 24 + keyboards/infinity60/matrix.c | 171 +++++++ keyboards/infinity60/mcuconf.h | 55 +++ keyboards/infinity60/readme.md | 29 ++ keyboards/infinity60/rules.mk | 66 +++ keyboards/infinity_chibios/MEMO.txt | 385 --------------- keyboards/infinity_chibios/Makefile | 3 - keyboards/infinity_chibios/bootloader_defs.h | 1 - keyboards/infinity_chibios/chconf.h | 524 --------------------- keyboards/infinity_chibios/config.h | 78 --- keyboards/infinity_chibios/halconf.h | 353 -------------- keyboards/infinity_chibios/infinity_chibios.c | 17 - keyboards/infinity_chibios/infinity_chibios.h | 66 --- .../infinity_chibios/keymaps/default/keymap.c | 48 -- .../infinity_chibios/keymaps/depariel/keymap.c | 82 ---- keyboards/infinity_chibios/keymaps/hasu/keymap.c | 113 ----- keyboards/infinity_chibios/led.c | 24 - keyboards/infinity_chibios/matrix.c | 171 ------- keyboards/infinity_chibios/mcuconf.h | 55 --- keyboards/infinity_chibios/rules.mk | 66 --- 31 files changed, 2014 insertions(+), 1986 deletions(-) create mode 100644 keyboards/infinity60/MEMO.txt create mode 100644 keyboards/infinity60/Makefile create mode 100644 keyboards/infinity60/bootloader_defs.h create mode 100644 keyboards/infinity60/chconf.h create mode 100644 keyboards/infinity60/config.h create mode 100644 keyboards/infinity60/halconf.h create mode 100644 keyboards/infinity60/infinity60.c create mode 100644 keyboards/infinity60/infinity60.h create mode 100644 keyboards/infinity60/keymaps/default/keymap.c create mode 100755 keyboards/infinity60/keymaps/depariel/keymap.c create mode 100644 keyboards/infinity60/keymaps/hasu/keymap.c create mode 100644 keyboards/infinity60/led.c create mode 100644 keyboards/infinity60/matrix.c create mode 100644 keyboards/infinity60/mcuconf.h create mode 100644 keyboards/infinity60/readme.md create mode 100644 keyboards/infinity60/rules.mk delete mode 100644 keyboards/infinity_chibios/MEMO.txt delete mode 100644 keyboards/infinity_chibios/Makefile delete mode 100644 keyboards/infinity_chibios/bootloader_defs.h delete mode 100644 keyboards/infinity_chibios/chconf.h delete mode 100644 keyboards/infinity_chibios/config.h delete mode 100644 keyboards/infinity_chibios/halconf.h delete mode 100644 keyboards/infinity_chibios/infinity_chibios.c delete mode 100644 keyboards/infinity_chibios/infinity_chibios.h delete mode 100644 keyboards/infinity_chibios/keymaps/default/keymap.c delete mode 100755 keyboards/infinity_chibios/keymaps/depariel/keymap.c delete mode 100644 keyboards/infinity_chibios/keymaps/hasu/keymap.c delete mode 100644 keyboards/infinity_chibios/led.c delete mode 100644 keyboards/infinity_chibios/matrix.c delete mode 100644 keyboards/infinity_chibios/mcuconf.h delete mode 100644 keyboards/infinity_chibios/rules.mk (limited to 'keyboards') diff --git a/keyboards/infinity60/MEMO.txt b/keyboards/infinity60/MEMO.txt new file mode 100644 index 000000000..e2886aa00 --- /dev/null +++ b/keyboards/infinity60/MEMO.txt @@ -0,0 +1,385 @@ +flabbergast's TMK/ChibiOS port +============================== +2015/10/16 + + +Build +----- +$ git clone -b chibios https://github.com/flabbergast/tmk_keyboard.git + +$ cd tmk_keyboard +$ git submodule add -f -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios +or +$ cd tmk_keyboard/tmk_core/tool/chibios +$ git clone -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios + +$ cd tmk_keyboard/keyboard/infinity_chibios +$ make + + + + +Chibios Configuration +--------------------- +halconf.h: for HAL configuration + placed in project directory + read in chibios/os/hal/hal.mk + included in chibios/os/hal/include/hal.h +mcuconf.h: for MCU configuration + placed in project directory + included in halconf.h + + +Chibios Term +------------ +PAL = Port Abstraction Layer + palWritePad + palReadPad + palSetPad + chibios/os/hal/include/pal.h + +LLD = Low Level Driver + + +Makefile +-------- + # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) + MCU_FAMILY = KINETIS + MCU_SERIES = KL2x + + # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ + # or /ld/ + MCU_LDSCRIPT = MKL26Z64 + + # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ + MCU_STARTUP = kl2x + + # Board: it should exist either in /os/hal/boards/ + # or /boards + BOARD = PJRC_TEENSY_LC + + MCU = cortex-m0 + + # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 + ARMV = 6 + + +halconf.h +--------- + + +mcuconf.h +--------- + + +chconf.h +-------- + + +ld script +--------- +--- ../../tmk_core/tool/chibios/chibios/os/common/ports/ARMCMx/compilers/GCC/ld/MKL26Z64.ld 2015-10-15 09:08:58.732904304 +0900 ++++ ld/MKL26Z64.ld 2015-10-15 08:48:06.430215496 +0900 +@@ -27,7 +27,8 @@ + { + flash0 : org = 0x00000000, len = 0xc0 + flashcfg : org = 0x00000400, len = 0x10 +- flash : org = 0x00000410, len = 64k - 0x410 ++ flash : org = 0x00000410, len = 62k - 0x410 ++ eeprom_emu : org = 0x0000F800, len = 2k + ram : org = 0x1FFFF800, len = 8k + } + +@@ -35,6 +36,10 @@ + __ram_size__ = LENGTH(ram); + __ram_end__ = __ram_start__ + __ram_size__; + ++__eeprom_workarea_start__ = ORIGIN(eeprom_emu); ++__eeprom_workarea_size__ = LENGTH(eeprom_emu); ++__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; ++ + SECTIONS + { + . = 0; + + + +Configuration/Startup for Infinity 60% +-------------------------------------- +Configuration: + + +Clock: +Inifinity + FEI(FLL Engaged Internal) mode with core clock:48MHz, bus clock:48MHz, flash clock:24MHz + Clock dividor: + SIM_CLKDIV1[OUTDIV1] = 0 divide-by-1 for core clock + SIM_CLKDIV1[OUTDIV2] = 0 divide-by-1 for bus clock + SIM_CLKDIV1[OUTDIV4] = 1 divide-by-2 for flash clock + Internal reference clock: + MCG_C1[IREFS] = 1 Internal Reference Select for clock source for FLL + MCG_C1[IRCLKEN] = 1 Internal Reference Clock Enable + FLL multipilication: + MCG_C4[DMX32] = 1 + MCG_C4[DRST_DRS] = 01 FLL factor 1464 * 32.768kHz = 48MHz + +chibios/os/hal/ports/KINETIS/K20x/hal_lld.c + k20x_clock_init(): called in __early_init() defined in board.c + disable watchdog and configure clock + + configurable macros: + KINETIS_NO_INIT: whether init or not + KINETIS_MCG_MODE: clock mode + KINETIS_MCG_MODE_FEI + KINETIS_MCG_MODE_PEE + hal/ports/KINETIS/K20x/hal_lld.h + + +chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h + PALConfig pal_default_config + boardInit() + __early_init() + macro definitions for board infos, freq and mcu type + +chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.c + +USB + + +Startup +------- + common/ports/ARMCMx/GCC/crt0_v[67]m.s + Reset_Handler: startup code + common/ports/ARMCMx/GCC/crt1.c + __core_init(): weak + __early_init(): weak + __late_init(): weak + __default_exit(): weak + called from Reset_Handler of crt0 + common/ports/ARMCMx/GCC/vector.c + common/ports/ARMCMx/GCC/ld/*.ld + +chibios/os/common/ports/ARMCMx/compilers/GCC/ +├── crt0_v6m.s +├── crt0_v7m.s +├── crt1.c +├── ld +│   ├── MK20DX128BLDR3.ld +│   ├── MK20DX128BLDR4.ld +│   ├── MK20DX128.ld +│   ├── MK20DX256.ld +│   ├── MKL25Z128.ld +│   ├── MKL26Z128.ld +│   ├── MKL26Z64.ld +│   └── STM32L476xG.ld +├── mk +│   ├── startup_k20x5.mk +│   ├── startup_k20x7.mk +│   ├── startup_k20x.mk +│   ├── startup_kl2x.mk +│   └── startup_stm32l4xx.mk +├── rules.ld +├── rules.mk +└── vectors.c + +chibios/os/hal/ +├── boards +│   ├── FREESCALE_FREEDOM_K20D50M +│   │   ├── board.c +│   │   ├── board.h +│   │   └── board.mk +│   ├── MCHCK_K20 +│   │   ├── board.c +│   │   ├── board.h +│   │   └── board.mk +│   ├── PJRC_TEENSY_3 +│   │   ├── board.c +│   │   ├── board.h +│   │   └── board.mk +│   ├── PJRC_TEENSY_3_1 +│   │   ├── board.c +│   │   ├── board.h +│   │   └── board.mk +│   ├── PJRC_TEENSY_LC +│   │   ├── board.c +│   │   ├── board.h +│   │   └── board.mk +│   ├── readme.txt +│   ├── simulator +│   │   ├── board.c +│   │   ├── board.h +│   │   └── board.mk +│   ├── ST_NUCLEO_F030R8 +│   │   ├── board.c +│   │   ├── board.h +│   │   ├── board.mk +│   │   └── cfg +│   │   └── board.chcfg +├── hal.mk +├── include +│   ├── adc.h +│   ├── can.h +│   ├── dac.h +│   ├── ext.h +│   ├── gpt.h +│   ├── hal_channels.h +│   ├── hal_files.h +│   ├── hal.h +│   ├── hal_ioblock.h +│   ├── hal_mmcsd.h +│   ├── hal_queues.h +│   ├── hal_streams.h +│   ├── i2c.h +│   ├── i2s.h +│   ├── icu.h +│   ├── mac.h +│   ├── mii.h +│   ├── mmc_spi.h +│   ├── pal.h +│   ├── pwm.h +│   ├── rtc.h +│   ├── sdc.h +│   ├── serial.h +│   ├── serial_usb.h +│   ├── spi.h +│   ├── st.h +│   ├── uart.h +│   └── usb.h +├── lib +│   └── streams +│   ├── chprintf.c +│   ├── chprintf.h +│   ├── memstreams.c +│   ├── memstreams.h +│   ├── nullstreams.c +│   └── nullstreams.h +├── osal +│   ├── nil +│   │   ├── osal.c +│   │   ├── osal.h +│   │   └── osal.mk +│   ├── os-less +│   │   └── ARMCMx +│   │   ├── osal.c +│   │   ├── osal.h +│   │   └── osal.mk +│   └── rt +│   ├── osal.c +│   ├── osal.h +│   └── osal.mk +├── ports +│   ├── AVR +│   ├── common +│   │   └── ARMCMx +│   │   ├── mpu.h +│   │   ├── nvic.c +│   │   └── nvic.h +│   ├── KINETIS +│   │   ├── K20x +│   │   │   ├── hal_lld.c +│   │   │   ├── hal_lld.h +│   │   │   ├── kinetis_registry.h +│   │   │   ├── platform.dox +│   │   │   ├── platform.mk +│   │   │   ├── pwm_lld.c +│   │   │   ├── pwm_lld.h +│   │   │   ├── spi_lld.c +│   │   │   └── spi_lld.h +│   │   ├── KL2x +│   │   │   ├── hal_lld.c +│   │   │   ├── hal_lld.h +│   │   │   ├── kinetis_registry.h +│   │   │   ├── platform.mk +│   │   │   ├── pwm_lld.c +│   │   │   └── pwm_lld.h +│   │   ├── LLD +│   │   │   ├── adc_lld.c +│   │   │   ├── adc_lld.h +│   │   │   ├── ext_lld.c +│   │   │   ├── ext_lld.h +│   │   │   ├── gpt_lld.c +│   │   │   ├── gpt_lld.h +│   │   │   ├── i2c_lld.c +│   │   │   ├── i2c_lld.h +│   │   │   ├── pal_lld.c +│   │   │   ├── pal_lld.h +│   │   │   ├── serial_lld.c +│   │   │   ├── serial_lld.h +│   │   │   ├── st_lld.c +│   │   │   ├── st_lld.h +│   │   │   ├── usb_lld.c +│   │   │   └── usb_lld.h +│   │   └── README.md +│   ├── LPC +│   ├── simulator +│   └── STM32 +├── src +│   ├── adc.c +│   ├── can.c +│   ├── dac.c +│   ├── ext.c +│   ├── gpt.c +│   ├── hal.c +│   ├── hal_mmcsd.c +│   ├── hal_queues.c +│   ├── i2c.c +│   ├── i2s.c +│   ├── icu.c +│   ├── mac.c +│   ├── mmc_spi.c +│   ├── pal.c +│   ├── pwm.c +│   ├── rtc.c +│   ├── sdc.c +│   ├── serial.c +│   ├── serial_usb.c +│   ├── spi.c +│   ├── st.c +│   ├── uart.c +│   └── usb.c +└── templates + ├── adc_lld.c + ├── adc_lld.h + ├── can_lld.c + ├── can_lld.h + ├── dac_lld.c + ├── dac_lld.h + ├── ext_lld.c + ├── ext_lld.h + ├── gpt_lld.c + ├── gpt_lld.h + ├── halconf.h + ├── hal_lld.c + ├── hal_lld.h + ├── i2c_lld.c + ├── i2c_lld.h + ├── i2s_lld.c + ├── i2s_lld.h + ├── icu_lld.c + ├── icu_lld.h + ├── mac_lld.c + ├── mac_lld.h + ├── mcuconf.h + ├── osal + │   ├── osal.c + │   ├── osal.h + │   └── osal.mk + ├── pal_lld.c + ├── pal_lld.h + ├── platform.mk + ├── pwm_lld.c + ├── pwm_lld.h + ├── rtc_lld.c + ├── rtc_lld.h + ├── sdc_lld.c + ├── sdc_lld.h + ├── serial_lld.c + ├── serial_lld.h + ├── spi_lld.c + ├── spi_lld.h + ├── st_lld.c + ├── st_lld.h + ├── uart_lld.c + ├── uart_lld.h + ├── usb_lld.c + └── usb_lld.h diff --git a/keyboards/infinity60/Makefile b/keyboards/infinity60/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/infinity60/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/infinity60/bootloader_defs.h b/keyboards/infinity60/bootloader_defs.h new file mode 100644 index 000000000..c67153be6 --- /dev/null +++ b/keyboards/infinity60/bootloader_defs.h @@ -0,0 +1 @@ +#define KIIBOHD_BOOTLOADER diff --git a/keyboards/infinity60/chconf.h b/keyboards/infinity60/chconf.h new file mode 100644 index 000000000..43c845739 --- /dev/null +++ b/keyboards/infinity60/chconf.h @@ -0,0 +1,524 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/chconf.h + * @brief Configuration file template. + * @details A copy of this file must be placed in each project directory, it + * contains the application specific kernel settings. + * + * @addtogroup config + * @details Kernel related settings and hooks. + * @{ + */ + +#ifndef CHCONF_H +#define CHCONF_H + +#define _CHIBIOS_RT_CONF_ + +/*===========================================================================*/ +/** + * @name System timers settings + * @{ + */ +/*===========================================================================*/ + +/** + * @brief System time counter resolution. + * @note Allowed values are 16 or 32 bits. + */ +#define CH_CFG_ST_RESOLUTION 32 + +/** + * @brief System tick frequency. + * @details Frequency of the system timer that drives the system ticks. This + * setting also defines the system tick time unit. + */ +#define CH_CFG_ST_FREQUENCY 1000 + +/** + * @brief Time delta constant for the tick-less mode. + * @note If this value is zero then the system uses the classic + * periodic tick. This value represents the minimum number + * of ticks that is safe to specify in a timeout directive. + * The value one is not valid, timeouts are rounded up to + * this value. + */ +#define CH_CFG_ST_TIMEDELTA 0 + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel parameters and options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Round robin interval. + * @details This constant is the number of system ticks allowed for the + * threads before preemption occurs. Setting this value to zero + * disables the preemption for threads with equal priority and the + * round robin becomes cooperative. Note that higher priority + * threads can still preempt, the kernel is always preemptive. + * @note Disabling the round robin preemption makes the kernel more compact + * and generally faster. + * @note The round robin preemption is not supported in tickless mode and + * must be set to zero in that case. + */ +#define CH_CFG_TIME_QUANTUM 20 + +/** + * @brief Managed RAM size. + * @details Size of the RAM area to be managed by the OS. If set to zero + * then the whole available RAM is used. The core memory is made + * available to the heap allocator and/or can be used directly through + * the simplified core memory allocator. + * + * @note In order to let the OS manage the whole RAM the linker script must + * provide the @p __heap_base__ and @p __heap_end__ symbols. + * @note Requires @p CH_CFG_USE_MEMCORE. + */ +#define CH_CFG_MEMCORE_SIZE 0 + +/** + * @brief Idle thread automatic spawn suppression. + * @details When this option is activated the function @p chSysInit() + * does not spawn the idle thread. The application @p main() + * function becomes the idle thread and must implement an + * infinite loop. + */ +#define CH_CFG_NO_IDLE_THREAD FALSE + +/* Use __WFI in the idle thread for waiting. Does lower the power + * consumption. */ +#define CORTEX_ENABLE_WFI_IDLE TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Performance options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief OS optimization. + * @details If enabled then time efficient rather than space efficient code + * is used when two possible implementations exist. + * + * @note This is not related to the compiler optimization options. + * @note The default is @p TRUE. + */ +#define CH_CFG_OPTIMIZE_SPEED TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Subsystem options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Time Measurement APIs. + * @details If enabled then the time measurement APIs are included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_TM FALSE + +/** + * @brief Threads registry APIs. + * @details If enabled then the registry APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_REGISTRY TRUE + +/** + * @brief Threads synchronization APIs. + * @details If enabled then the @p chThdWait() function is included in + * the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_WAITEXIT TRUE + +/** + * @brief Semaphores APIs. + * @details If enabled then the Semaphores APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_SEMAPHORES TRUE + +/** + * @brief Semaphores queuing mode. + * @details If enabled then the threads are enqueued on semaphores by + * priority rather than in FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE + +/** + * @brief Mutexes APIs. + * @details If enabled then the mutexes APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MUTEXES TRUE + +/** + * @brief Enables recursive behavior on mutexes. + * @note Recursive mutexes are heavier and have an increased + * memory footprint. + * + * @note The default is @p FALSE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE + +/** + * @brief Conditional Variables APIs. + * @details If enabled then the conditional variables APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MUTEXES. + */ +#define CH_CFG_USE_CONDVARS TRUE + +/** + * @brief Conditional Variables APIs with timeout. + * @details If enabled then the conditional variables APIs with timeout + * specification are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_CONDVARS. + */ +#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE + +/** + * @brief Events Flags APIs. + * @details If enabled then the event flags APIs are included in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_EVENTS TRUE + +/** + * @brief Events Flags APIs with timeout. + * @details If enabled then the events APIs with timeout specification + * are included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_EVENTS. + */ +#define CH_CFG_USE_EVENTS_TIMEOUT TRUE + +/** + * @brief Synchronous Messages APIs. + * @details If enabled then the synchronous messages APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MESSAGES TRUE + +/** + * @brief Synchronous Messages queuing mode. + * @details If enabled then messages are served by priority rather than in + * FIFO order. + * + * @note The default is @p FALSE. Enable this if you have special + * requirements. + * @note Requires @p CH_CFG_USE_MESSAGES. + */ +#define CH_CFG_USE_MESSAGES_PRIORITY FALSE + +/** + * @brief Mailboxes APIs. + * @details If enabled then the asynchronous messages (mailboxes) APIs are + * included in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_SEMAPHORES. + */ +#define CH_CFG_USE_MAILBOXES TRUE + +/** + * @brief Core Memory Manager APIs. + * @details If enabled then the core memory manager APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMCORE TRUE + +/** + * @brief Heap Allocator APIs. + * @details If enabled then the memory heap allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or + * @p CH_CFG_USE_SEMAPHORES. + * @note Mutexes are recommended. + */ +#define CH_CFG_USE_HEAP TRUE + +/** + * @brief Memory Pools Allocator APIs. + * @details If enabled then the memory pools allocator APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + */ +#define CH_CFG_USE_MEMPOOLS TRUE + +/** + * @brief Dynamic Threads APIs. + * @details If enabled then the dynamic threads creation APIs are included + * in the kernel. + * + * @note The default is @p TRUE. + * @note Requires @p CH_CFG_USE_WAITEXIT. + * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. + */ +#define CH_CFG_USE_DYNAMIC TRUE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Debug options + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Debug option, kernel statistics. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_STATISTICS FALSE + +/** + * @brief Debug option, system state check. + * @details If enabled the correct call protocol for system APIs is checked + * at runtime. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_SYSTEM_STATE_CHECK FALSE + +/** + * @brief Debug option, parameters checks. + * @details If enabled then the checks on the API functions input + * parameters are activated. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_CHECKS FALSE + +/** + * @brief Debug option, consistency checks. + * @details If enabled then all the assertions in the kernel code are + * activated. This includes consistency checks inside the kernel, + * runtime anomalies and port-defined checks. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_ENABLE_ASSERTS FALSE + +/** + * @brief Debug option, trace buffer. + * @details If enabled then the trace buffer is activated. + * + * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED + +/** + * @brief Trace buffer entries. + * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is + * different from @p CH_DBG_TRACE_MASK_DISABLED. + */ +#define CH_DBG_TRACE_BUFFER_SIZE 128 + +/** + * @brief Debug option, stack checks. + * @details If enabled then a runtime stack check is performed. + * + * @note The default is @p FALSE. + * @note The stack check is performed in a architecture/port dependent way. + * It may not be implemented or some ports. + * @note The default failure mode is to halt the system with the global + * @p panic_msg variable set to @p NULL. + */ +#define CH_DBG_ENABLE_STACK_CHECK FALSE + +/** + * @brief Debug option, stacks initialization. + * @details If enabled then the threads working area is filled with a byte + * value when a thread is created. This can be useful for the + * runtime measurement of the used stack. + * + * @note The default is @p FALSE. + */ +#define CH_DBG_FILL_THREADS FALSE + +/** + * @brief Debug option, threads profiling. + * @details If enabled then a field is added to the @p thread_t structure that + * counts the system ticks occurred while executing the thread. + * + * @note The default is @p FALSE. + * @note This debug option is not currently compatible with the + * tickless mode. + */ +#define CH_DBG_THREADS_PROFILING FALSE + +/** @} */ + +/*===========================================================================*/ +/** + * @name Kernel hooks + * @{ + */ +/*===========================================================================*/ + +/** + * @brief Threads descriptor structure extension. + * @details User fields added to the end of the @p thread_t structure. + */ +#define CH_CFG_THREAD_EXTRA_FIELDS \ + /* Add threads custom fields here.*/ + +/** + * @brief Threads initialization hook. + * @details User initialization code added to the @p chThdInit() API. + * + * @note It is invoked from within @p chThdInit() and implicitly from all + * the threads creation APIs. + */ +#define CH_CFG_THREAD_INIT_HOOK(tp) { \ + /* Add threads initialization code here.*/ \ +} + +/** + * @brief Threads finalization hook. + * @details User finalization code added to the @p chThdExit() API. + */ +#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ + /* Add threads finalization code here.*/ \ +} + +/** + * @brief Context switch hook. + * @details This hook is invoked just before switching between threads. + */ +#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ + /* Context switch code here.*/ \ +} + +/** + * @brief ISR enter hook. + */ +#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ + /* IRQ prologue code here.*/ \ +} + +/** + * @brief ISR exit hook. + */ +#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ + /* IRQ epilogue code here.*/ \ +} + +/** + * @brief Idle thread enter hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to activate a power saving mode. + */ +#define CH_CFG_IDLE_ENTER_HOOK() { \ + /* Idle-enter code here.*/ \ +} + +/** + * @brief Idle thread leave hook. + * @note This hook is invoked within a critical zone, no OS functions + * should be invoked from here. + * @note This macro can be used to deactivate a power saving mode. + */ +#define CH_CFG_IDLE_LEAVE_HOOK() { \ + /* Idle-leave code here.*/ \ +} + +/** + * @brief Idle Loop hook. + * @details This hook is continuously invoked by the idle thread loop. + */ +#define CH_CFG_IDLE_LOOP_HOOK() { \ + /* Idle loop code here.*/ \ +} + +/** + * @brief System tick event hook. + * @details This hook is invoked in the system tick handler immediately + * after processing the virtual timers queue. + */ +#define CH_CFG_SYSTEM_TICK_HOOK() { \ + /* System tick event code here.*/ \ +} + +/** + * @brief System halt hook. + * @details This hook is invoked in case to a system halting error before + * the system is halted. + */ +#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ + /* System halt code here.*/ \ +} + +/** + * @brief Trace hook. + * @details This hook is invoked each time a new record is written in the + * trace buffer. + */ +#define CH_CFG_TRACE_HOOK(tep) { \ + /* Trace code here.*/ \ +} + +/** @} */ + +/*===========================================================================*/ +/* Port-specific settings (override port settings defaulted in chcore.h). */ +/*===========================================================================*/ + +#endif /* CHCONF_H */ + +/** @} */ diff --git a/keyboards/infinity60/config.h b/keyboards/infinity60/config.h new file mode 100644 index 000000000..f8346fe16 --- /dev/null +++ b/keyboards/infinity60/config.h @@ -0,0 +1,77 @@ +/* +Copyright 2015 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#define PREVENT_STUCK_MODIFIERS + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6464 +#define DEVICE_VER 0x0001 +/* in python2: list(u"whatever".encode('utf-16-le')) */ +/* at most 32 characters or the ugly hack in usb_main.c borks */ +#define MANUFACTURER "Input Club" +#define USBSTR_MANUFACTURER 'I', '\x00', 'n', '\x00', 'p', '\x00', 'u', '\x00', 't', '\x00', ' ', '\x00', 'C', '\x00', 'l', '\x00', 'u', '\x00', 'b', '\x00' +#define PRODUCT "Infinity keyboard/QMK" +#define USBSTR_PRODUCT 'I', '\x00', 'n', '\x00', 'f', '\x00', 'i', '\x00', 'n', '\x00', 'i', '\x00', 't', '\x00', 'y', '\x00', ' ', '\x00', 'k', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '/', '\x00', 'Q', '\x00', 'M', '\x00', 'K', '\x00' +/* key matrix size */ +#define MATRIX_ROWS 9 +#define MATRIX_COLS 7 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +//#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +//#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Keymap for Infinity prototype */ +//#define INFINITY_PROTOTYPE + +/* Keymap for Infinity 1.1a (first revision with LED support) */ +//#define INFINITY_LED + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/infinity60/halconf.h b/keyboards/infinity60/halconf.h new file mode 100644 index 000000000..46b37a4f4 --- /dev/null +++ b/keyboards/infinity60/halconf.h @@ -0,0 +1,353 @@ +/* + ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +*/ + +/** + * @file templates/halconf.h + * @brief HAL configuration header. + * @details HAL configuration file, this file allows to enable or disable the + * various device drivers from your application. You may also use + * this file in order to override the device drivers default settings. + * + * @addtogroup HAL_CONF + * @{ + */ + +#ifndef _HALCONF_H_ +#define _HALCONF_H_ + +#include "mcuconf.h" + +/** + * @brief Enables the PAL subsystem. + */ +#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) +#define HAL_USE_PAL TRUE +#endif + +/** + * @brief Enables the ADC subsystem. + */ +#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) +#define HAL_USE_ADC FALSE +#endif + +/** + * @brief Enables the CAN subsystem. + */ +#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) +#define HAL_USE_CAN FALSE +#endif + +/** + * @brief Enables the DAC subsystem. + */ +#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) +#define HAL_USE_DAC FALSE +#endif + +/** + * @brief Enables the EXT subsystem. + */ +#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) +#define HAL_USE_EXT FALSE +#endif + +/** + * @brief Enables the GPT subsystem. + */ +#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) +#define HAL_USE_GPT FALSE +#endif + +/** + * @brief Enables the I2C subsystem. + */ +#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) +#define HAL_USE_I2C FALSE +#endif + +/** + * @brief Enables the I2S subsystem. + */ +#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) +#define HAL_USE_I2S FALSE +#endif + +/** + * @brief Enables the ICU subsystem. + */ +#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) +#define HAL_USE_ICU FALSE +#endif + +/** + * @brief Enables the MAC subsystem. + */ +#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) +#define HAL_USE_MAC FALSE +#endif + +/** + * @brief Enables the MMC_SPI subsystem. + */ +#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) +#define HAL_USE_MMC_SPI FALSE +#endif + +/** + * @brief Enables the PWM subsystem. + */ +#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) +#define HAL_USE_PWM FALSE +#endif + +/** + * @brief Enables the RTC subsystem. + */ +#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) +#define HAL_USE_RTC FALSE +#endif + +/** + * @brief Enables the SDC subsystem. + */ +#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) +#define HAL_USE_SDC FALSE +#endif + +/** + * @brief Enables the SERIAL subsystem. + */ +#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL FALSE +#endif + +/** + * @brief Enables the SERIAL over USB subsystem. + */ +#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) +#define HAL_USE_SERIAL_USB TRUE +#endif + +/** + * @brief Enables the SPI subsystem. + */ +#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) +#define HAL_USE_SPI FALSE +#endif + +/** + * @brief Enables the UART subsystem. + */ +#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) +#define HAL_USE_UART FALSE +#endif + +/** + * @brief Enables the USB subsystem. + */ +#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) +#define HAL_USE_USB TRUE +#endif + +/** + * @brief Enables the WDG subsystem. + */ +#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) +#define HAL_USE_WDG FALSE +#endif + +/*===========================================================================*/ +/* ADC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) +#define ADC_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define ADC_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* CAN driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Sleep mode related APIs inclusion switch. + */ +#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) +#define CAN_USE_SLEEP_MODE TRUE +#endif + +/*===========================================================================*/ +/* I2C driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables the mutual exclusion APIs on the I2C bus. + */ +#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define I2C_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* MAC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) +#define MAC_USE_ZERO_COPY FALSE +#endif + +/** + * @brief Enables an event sources for incoming packets. + */ +#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) +#define MAC_USE_EVENTS TRUE +#endif + +/*===========================================================================*/ +/* MMC_SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + * This option is recommended also if the SPI driver does not + * use a DMA channel and heavily loads the CPU. + */ +#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) +#define MMC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SDC driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Number of initialization attempts before rejecting the card. + * @note Attempts are performed at 10mS intervals. + */ +#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) +#define SDC_INIT_RETRY 100 +#endif + +/** + * @brief Include support for MMC cards. + * @note MMC support is not yet implemented so this option must be kept + * at @p FALSE. + */ +#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) +#define SDC_MMC_SUPPORT FALSE +#endif + +/** + * @brief Delays insertions. + * @details If enabled this options inserts delays into the MMC waiting + * routines releasing some extra CPU time for the threads with + * lower priority, this may slow down the driver a bit however. + */ +#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) +#define SDC_NICE_WAITING TRUE +#endif + +/*===========================================================================*/ +/* SERIAL driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Default bit rate. + * @details Configuration parameter, this is the baud rate selected for the + * default configuration. + */ +#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) +#define SERIAL_DEFAULT_BITRATE 38400 +#endif + +/** + * @brief Serial buffers size. + * @details Configuration parameter, you can change the depth of the queue + * buffers depending on the requirements of your application. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_BUFFERS_SIZE 16 +#endif + +/*===========================================================================*/ +/* SERIAL_USB driver related setting. */ +/*===========================================================================*/ + +/** + * @brief Serial over USB buffers size. + * @details Configuration parameter, the buffer size must be a multiple of + * the USB data endpoint maximum packet size. + * @note The default is 64 bytes for both the transmission and receive + * buffers. + */ +#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) +#define SERIAL_USB_BUFFERS_SIZE 256 +#endif + +/*===========================================================================*/ +/* SPI driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) +#define SPI_USE_WAIT TRUE +#endif + +/** + * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) +#define SPI_USE_MUTUAL_EXCLUSION TRUE +#endif + +/*===========================================================================*/ +/* USB driver related settings. */ +/*===========================================================================*/ + +/** + * @brief Enables synchronous APIs. + * @note Disabling this option saves both code and data space. + */ +#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) +#define USB_USE_WAIT TRUE +#endif + +#endif /* _HALCONF_H_ */ + +/** @} */ diff --git a/keyboards/infinity60/infinity60.c b/keyboards/infinity60/infinity60.c new file mode 100644 index 000000000..e471250fe --- /dev/null +++ b/keyboards/infinity60/infinity60.c @@ -0,0 +1,17 @@ +/* +Copyright 2012,2013 Jun Wako + +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 . +*/ +#include "infinity60.h" diff --git a/keyboards/infinity60/infinity60.h b/keyboards/infinity60/infinity60.h new file mode 100644 index 000000000..f1ba15e48 --- /dev/null +++ b/keyboards/infinity60/infinity60.h @@ -0,0 +1,66 @@ +/* +Copyright 2014 Jun Wako + +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 . +*/ +#ifndef KEYMAP_COMMON_H +#define KEYMAP_COMMON_H + +#include "quantum.h" + +#ifdef INFINITY_PROTOTYPE + +/* Infinity prototype */ +#define KEYMAP( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K86, \ + K51, K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, \ + K13, K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, \ + K54, K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, \ + K06, K16, K26, K36, K46, K56, K66, K76 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46 }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86 } \ +} + +#else + +/* Infinity production */ +#define KEYMAP( \ + K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, \ + K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, \ + K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, \ + K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, K06, \ + K16, K26, K36, K46, K56, K66, K76, K86 \ +) { \ + { K00, K01, K02, K03, K04, K05, K06 }, \ + { K10, K11, K12, K13, K14, K15, K16 }, \ + { K20, K21, K22, K23, K24, K25, K26 }, \ + { K30, K31, K32, K33, K34, K35, K36 }, \ + { K40, K41, K42, K43, K44, K45, K46 }, \ + { K50, K51, K52, K53, K54, K55, K56 }, \ + { K60, K61, K62, K63, K64, K65, K66 }, \ + { K70, K71, K72, K73, K74, K75, K76 }, \ + { K80, K81, K82, K83, K84, K85, K86 } \ +} + +#endif + +#endif diff --git a/keyboards/infinity60/keymaps/default/keymap.c b/keyboards/infinity60/keymaps/default/keymap.c new file mode 100644 index 000000000..443412857 --- /dev/null +++ b/keyboards/infinity60/keymaps/default/keymap.c @@ -0,0 +1,48 @@ +#include "infinity60.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| + * |-----------------------------------------------------------| + * |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, 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_NO, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,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( + KC_PWR, 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, KC_DEL, \ + KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \ + KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_PENT, \ + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS, \ + KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), +}; + +const uint16_t fn_actions[] = { + +}; + diff --git a/keyboards/infinity60/keymaps/depariel/keymap.c b/keyboards/infinity60/keymaps/depariel/keymap.c new file mode 100755 index 000000000..7412b9b9d --- /dev/null +++ b/keyboards/infinity60/keymaps/depariel/keymap.c @@ -0,0 +1,82 @@ +#include "infinity60.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| + * |-----------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Bksp| + * |-----------------------------------------------------------| + * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | + * |-----------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| + * |-----------------------------------------------------------' + * |Fn2 |Gui |Alt | Space |RAlt|Prv|PlPs|Next| + * `-----------------------------------------------------------' + */ + [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, KC_SCLN, KC_QUOT, LT(5, KC_ENT), \ + KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(4), \ + MO(4), KC_LGUI, KC_LALT, LT(3, KC_SPC), KC_RALT, KC_MPRV, KC_MPLY, KC_MNXT), + + /* Layer 1: "Toggle" off SpaceFn for League of Legends + */ + [1] = 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, 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(4), \ + MO(4), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_MPRV, KC_MPLY, KC_MNXT), + + /* Layer 2: "Toggle" off SpaceFn for MapleRoyals + */ + [2] = 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, 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_UP, KC_LSFT, \ + MO(4), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), + + /* Layer 3: FN layer 1 + */ + [3] = KEYMAP( + KC_NO, 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, KC_BTN1, KC_MS_U, KC_BTN2, LALT(KC_F4), KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_UP, KC_NO, KC_LPRN, KC_RPRN, KC_DEL, \ + MO(6), KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_END, KC_PGDN, KC_TILD, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, \ + LGUI(KC_SPC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_CALC, KC_MENU, KC_TRNS, TG(4), \ + KC_TRNS, KC_TRNS, KC_TRNS, LT(3, KC_SPC), KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU), + + /* Layer 4: FN layer 2 + */ + [4] = KEYMAP( + KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_PSLS, TG(2), \ + KC_CAPS, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_NO, KC_P7, KC_P8, KC_P9, KC_PAST, KC_BSPC, \ + KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_PENT, \ + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_RSFT, MO(4), \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_PDOT, KC_NO, TG(1)), + + /* Layer 5: FN layer 3 + */ + [5] = KEYMAP( + 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_TAB , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F13, KC_F14, KC_F15, KC_F16, KC_NO, KC_TRNS, \ + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F17, KC_F18, KC_F19, KC_F20, LT(5, KC_ENT), \ + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F21, KC_F22, KC_F23, KC_F24, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_NO, KC_NO, KC_NO), + + /* Layer 6: FN layer 4 + */ + [6] = KEYMAP( + 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, \ + LCTL(LSFT(KC_TAB)), KC_NO, LGUI(KC_UP), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + MO(6), LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + diff --git a/keyboards/infinity60/keymaps/hasu/keymap.c b/keyboards/infinity60/keymaps/hasu/keymap.c new file mode 100644 index 000000000..d3728869a --- /dev/null +++ b/keyboards/infinity60/keymaps/hasu/keymap.c @@ -0,0 +1,113 @@ +#include "infinity60.h" + +const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Layer 0: Default Layer + * ,-----------------------------------------------------------. + * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| + * |-----------------------------------------------------------| + * |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( + KC_PWR, 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, KC_DEL, \ + KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS,KC_BSPC, \ + KC_LCTL,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_ENT, \ + KC_LSFT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS, \ + KC_TRNS,KC_LGUI,KC_LALT, KC_TRNS, KC_RALT,KC_RGUI,KC_TRNS,KC_TRNS), + + /* Layer 2: Vi mode[Slash] + * ,-----------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Tab |Hom|PgD|Up |PgU|End|Hom|PgD|PgUlEnd| | | |Backs| + * |-----------------------------------------------------------| + * |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | |Return | + * |-----------------------------------------------------------| + * |Shift | | | | | |Hom|PgD|PgUlEnd|Fn0|Shift | | + * `-----------------------------------------------------------' + * |Gui|Alt | Space |Alt |Gui| + * `-------------------------------------------' + */ + [2] = 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_INS, KC_DEL, \ + KC_TAB, KC_HOME,KC_PGDN,KC_UP, KC_PGUP,KC_END, KC_HOME,KC_PGDN,KC_PGUP,KC_END, KC_NO, KC_NO, KC_NO, KC_BSPC, \ + KC_LCTL,KC_NO, KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_NO, KC_NO, KC_ENT, \ + KC_LSFT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME,KC_PGDN,KC_PGUP,KC_END, LT(2, KC_SLSH), KC_RSFT,KC_TRNS, \ + KC_TRNS,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_TRNS, KC_TRNS), + + /* Layer 3: Mouse mode(IJKL)[Semicolon] + * ,-----------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| + * |-----------------------------------------------------------| + * |Contro| | | | | |Mb2|McL|McD|McR|Fn | |Return | + * |-----------------------------------------------------------| + * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | + * `-----------------------------------------------------------' + * |Gui |Alt | Mb1 |Fn |Fn | + * `--------------------------------------------' + * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel + */ + [3] = 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_INS, KC_DEL, \ + LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R, ALT_T(KC_LEFT), ALT_T(KC_RGHT),LALT(KC_TAB), \ + KC_LCTL, KC_ACL0,KC_ACL1,KC_ACL2,KC_ACL2,KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, LT(3, KC_SCLN), KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3,KC_BTN2,KC_BTN1,ALT_T(KC_LEFT), ALT_T(KC_RGHT), KC_NO, KC_RSFT, KC_TRNS, \ + KC_TRNS, KC_LGUI,KC_LALT, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), + + /* Layer 4: Mouse mode(IJKL)[Space] + * ,-----------------------------------------------------------. + * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| + * |-----------------------------------------------------------| + * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| + * |-----------------------------------------------------------| + * |Contro| | | | | |Mb2|McL|McD|McR|Mb1| |Return | + * |-----------------------------------------------------------| + * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | + * `-----------------------------------------------------------' + * |Gui |Alt | Mb1 |Fn |Fn | + * `--------------------------------------------' + * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel + */ + [4] = 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_INS, KC_DEL, \ + LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R,KC_BTN4,KC_BTN5,LALT(KC_TAB), \ + KC_LCTL, KC_VOLD,KC_VOLU,KC_MUTE,KC_NO, KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, KC_BTN1,KC_NO, KC_ENT, \ + KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3,KC_BTN2,KC_BTN1,ALT_T(KC_LEFT),ALT_T(KC_RGHT),KC_NO, KC_RSFT,KC_TRNS, \ + KC_TRNS, KC_LGUI,KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS), + +}; + +/* + * Fn action definition + */ +const uint16_t fn_actions[] = { + +}; diff --git a/keyboards/infinity60/led.c b/keyboards/infinity60/led.c new file mode 100644 index 000000000..aed66c7c0 --- /dev/null +++ b/keyboards/infinity60/led.c @@ -0,0 +1,24 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#include "hal.h" + +#include "led.h" + + +void led_set(uint8_t usb_led) { +} diff --git a/keyboards/infinity60/matrix.c b/keyboards/infinity60/matrix.c new file mode 100644 index 000000000..62c165aa5 --- /dev/null +++ b/keyboards/infinity60/matrix.c @@ -0,0 +1,171 @@ +#include +#include +#include +#include "hal.h" +#include "timer.h" +#include "wait.h" +#include "print.h" +#include "matrix.h" + + +/* + * Infinity Pinusage: + * Column pins are input with internal pull-down. Row pins are output and strobe with high. + * Key is high or 1 when it turns on. + * INFINITY PRODUCTION (NO LED) + * col: { PTD1, PTD2, PTD3, PTD4, PTD5, PTD6, PTD7 } + * row: { PTB0, PTB1, PTB2, PTB3, PTB16, PTB17, PTC4, PTC5, PTD0 } + * INFINITY PRODUCTION (WITH LED) + * col: { PTD1, PTD2, PTD3, PTD4, PTD5, PTD6, PTD7 } + * row: { PTC0, PTC1, PTC2, PTC3, PTC4, PTC5, PTC6, PTC7, PTD0 } + */ +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; +static bool debouncing = false; +static uint16_t debouncing_time = 0; + + +void matrix_init(void) +{ + /* Column(sense) */ + palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 2, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 3, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); + palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); + +#ifdef INFINITY_LED + /* Row(strobe) */ + palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 1, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 2, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 6, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 7, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); +#else + /* Row(strobe) */ + palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOB, 17, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); + palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); +#endif + memset(matrix, 0, MATRIX_ROWS); + memset(matrix_debouncing, 0, MATRIX_ROWS); +} + +uint8_t matrix_scan(void) +{ + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix_row_t data = 0; + #ifdef INFINITY_LED + // strobe row + switch (row) { + case 0: palSetPad(GPIOC, 0); break; + case 1: palSetPad(GPIOC, 1); break; + case 2: palSetPad(GPIOC, 2); break; + case 3: palSetPad(GPIOC, 3); break; + case 4: palSetPad(GPIOC, 4); break; + case 5: palSetPad(GPIOC, 5); break; + case 6: palSetPad(GPIOC, 6); break; + case 7: palSetPad(GPIOC, 7); break; + case 8: palSetPad(GPIOD, 0); break; + } + #else + // strobe row + switch (row) { + case 0: palSetPad(GPIOB, 0); break; + case 1: palSetPad(GPIOB, 1); break; + case 2: palSetPad(GPIOB, 2); break; + case 3: palSetPad(GPIOB, 3); break; + case 4: palSetPad(GPIOB, 16); break; + case 5: palSetPad(GPIOB, 17); break; + case 6: palSetPad(GPIOC, 4); break; + case 7: palSetPad(GPIOC, 5); break; + case 8: palSetPad(GPIOD, 0); break; + } + #endif + + wait_us(1); // need wait to settle pin state + + // read col data + data = (palReadPort(GPIOD)>>1); + #ifdef INFINITY_LED + // un-strobe row + switch (row) { + case 0: palClearPad(GPIOC, 0); break; + case 1: palClearPad(GPIOC, 1); break; + case 2: palClearPad(GPIOC, 2); break; + case 3: palClearPad(GPIOC, 3); break; + case 4: palClearPad(GPIOC, 4); break; + case 5: palClearPad(GPIOC, 5); break; + case 6: palClearPad(GPIOC, 6); break; + case 7: palClearPad(GPIOC, 7); break; + case 8: palClearPad(GPIOD, 0); break; + } + #else + // un-strobe row + switch (row) { + case 0: palClearPad(GPIOB, 0); break; + case 1: palClearPad(GPIOB, 1); break; + case 2: palClearPad(GPIOB, 2); break; + case 3: palClearPad(GPIOB, 3); break; + case 4: palClearPad(GPIOB, 16); break; + case 5: palClearPad(GPIOB, 17); break; + case 6: palClearPad(GPIOC, 4); break; + case 7: palClearPad(GPIOC, 5); break; + case 8: palClearPad(GPIOD, 0); break; + } + #endif + + if (matrix_debouncing[row] != data) { + matrix_debouncing[row] = data; + debouncing = true; + debouncing_time = timer_read(); + } + } + + if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { + for (int row = 0; row < MATRIX_ROWS; row++) { + matrix[row] = matrix_debouncing[row]; + } + debouncing = false; + } + return 1; +} + +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) +# - For Teensies, FAMILY = KINETIS and SERIES is either +# KL2x (LC) or K20x (3.0,3.1,3.2). +# - For Infinity KB, SERIES = K20x +MCU_FAMILY = KINETIS +MCU_SERIES = K20x + +# Linker script to use +# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ +# or /ld/ +# - NOTE: a custom ld script is needed for EEPROM on Teensy LC +# - LDSCRIPT = +# - MKL26Z64 for Teensy LC +# - MK20DX128 for Teensy 3.0 +# - MK20DX256 for Teensy 3.1 and 3.2 +# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader +MCU_LDSCRIPT = MK20DX128BLDR4 + +# Startup code to use +# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ +# - STARTUP = +# - kl2x for Teensy LC +# - k20x5 for Teensy 3.0 and Infinity KB +# - k20x7 for Teensy 3.1 and 3.2 +MCU_STARTUP = k20x5 + +# Board: it should exist either in /os/hal/boards/ +# or /boards +# - BOARD = +# - PJRC_TEENSY_LC for Teensy LC +# - PJRC_TEENSY_3 for Teensy 3.0 +# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 +# - MCHCK_K20 for Infinity KB +BOARD = MCHCK_K20 + +# Cortex version +# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 +MCU = cortex-m4 + +# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 +# I.e. 6 for Teensy LC; 7 for Teensy 3.x +ARMV = 7 + +# Vector table for application +# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ +# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB +OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration +## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) +MOUSEKEY_ENABLE ?= yes # Mouse keys +EXTRAKEY_ENABLE ?= yes # Audio control and System control +CONSOLE_ENABLE ?= yes # Console for debug +COMMAND_ENABLE ?= yes # Commands for debug and configuration +SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover +CUSTOM_MATRIX ?= yes # Custom matrix file \ No newline at end of file diff --git a/keyboards/infinity_chibios/MEMO.txt b/keyboards/infinity_chibios/MEMO.txt deleted file mode 100644 index e2886aa00..000000000 --- a/keyboards/infinity_chibios/MEMO.txt +++ /dev/null @@ -1,385 +0,0 @@ -flabbergast's TMK/ChibiOS port -============================== -2015/10/16 - - -Build ------ -$ git clone -b chibios https://github.com/flabbergast/tmk_keyboard.git - -$ cd tmk_keyboard -$ git submodule add -f -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios -or -$ cd tmk_keyboard/tmk_core/tool/chibios -$ git clone -b kinetis https://github.com/flabbergast/ChibiOS.git tmk_core/tool/chibios/chibios - -$ cd tmk_keyboard/keyboard/infinity_chibios -$ make - - - - -Chibios Configuration ---------------------- -halconf.h: for HAL configuration - placed in project directory - read in chibios/os/hal/hal.mk - included in chibios/os/hal/include/hal.h -mcuconf.h: for MCU configuration - placed in project directory - included in halconf.h - - -Chibios Term ------------- -PAL = Port Abstraction Layer - palWritePad - palReadPad - palSetPad - chibios/os/hal/include/pal.h - -LLD = Low Level Driver - - -Makefile --------- - # /os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) - MCU_FAMILY = KINETIS - MCU_SERIES = KL2x - - # - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ - # or /ld/ - MCU_LDSCRIPT = MKL26Z64 - - # - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ - MCU_STARTUP = kl2x - - # Board: it should exist either in /os/hal/boards/ - # or /boards - BOARD = PJRC_TEENSY_LC - - MCU = cortex-m0 - - # ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 - ARMV = 6 - - -halconf.h ---------- - - -mcuconf.h ---------- - - -chconf.h --------- - - -ld script ---------- ---- ../../tmk_core/tool/chibios/chibios/os/common/ports/ARMCMx/compilers/GCC/ld/MKL26Z64.ld 2015-10-15 09:08:58.732904304 +0900 -+++ ld/MKL26Z64.ld 2015-10-15 08:48:06.430215496 +0900 -@@ -27,7 +27,8 @@ - { - flash0 : org = 0x00000000, len = 0xc0 - flashcfg : org = 0x00000400, len = 0x10 -- flash : org = 0x00000410, len = 64k - 0x410 -+ flash : org = 0x00000410, len = 62k - 0x410 -+ eeprom_emu : org = 0x0000F800, len = 2k - ram : org = 0x1FFFF800, len = 8k - } - -@@ -35,6 +36,10 @@ - __ram_size__ = LENGTH(ram); - __ram_end__ = __ram_start__ + __ram_size__; - -+__eeprom_workarea_start__ = ORIGIN(eeprom_emu); -+__eeprom_workarea_size__ = LENGTH(eeprom_emu); -+__eeprom_workarea_end__ = __eeprom_workarea_start__ + __eeprom_workarea_size__; -+ - SECTIONS - { - . = 0; - - - -Configuration/Startup for Infinity 60% --------------------------------------- -Configuration: - - -Clock: -Inifinity - FEI(FLL Engaged Internal) mode with core clock:48MHz, bus clock:48MHz, flash clock:24MHz - Clock dividor: - SIM_CLKDIV1[OUTDIV1] = 0 divide-by-1 for core clock - SIM_CLKDIV1[OUTDIV2] = 0 divide-by-1 for bus clock - SIM_CLKDIV1[OUTDIV4] = 1 divide-by-2 for flash clock - Internal reference clock: - MCG_C1[IREFS] = 1 Internal Reference Select for clock source for FLL - MCG_C1[IRCLKEN] = 1 Internal Reference Clock Enable - FLL multipilication: - MCG_C4[DMX32] = 1 - MCG_C4[DRST_DRS] = 01 FLL factor 1464 * 32.768kHz = 48MHz - -chibios/os/hal/ports/KINETIS/K20x/hal_lld.c - k20x_clock_init(): called in __early_init() defined in board.c - disable watchdog and configure clock - - configurable macros: - KINETIS_NO_INIT: whether init or not - KINETIS_MCG_MODE: clock mode - KINETIS_MCG_MODE_FEI - KINETIS_MCG_MODE_PEE - hal/ports/KINETIS/K20x/hal_lld.h - - -chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.h - PALConfig pal_default_config - boardInit() - __early_init() - macro definitions for board infos, freq and mcu type - -chibios/os/hal/boards/FREESCALE_FREEDOM_K20D50M/board.c - -USB - - -Startup -------- - common/ports/ARMCMx/GCC/crt0_v[67]m.s - Reset_Handler: startup code - common/ports/ARMCMx/GCC/crt1.c - __core_init(): weak - __early_init(): weak - __late_init(): weak - __default_exit(): weak - called from Reset_Handler of crt0 - common/ports/ARMCMx/GCC/vector.c - common/ports/ARMCMx/GCC/ld/*.ld - -chibios/os/common/ports/ARMCMx/compilers/GCC/ -├── crt0_v6m.s -├── crt0_v7m.s -├── crt1.c -├── ld -│   ├── MK20DX128BLDR3.ld -│   ├── MK20DX128BLDR4.ld -│   ├── MK20DX128.ld -│   ├── MK20DX256.ld -│   ├── MKL25Z128.ld -│   ├── MKL26Z128.ld -│   ├── MKL26Z64.ld -│   └── STM32L476xG.ld -├── mk -│   ├── startup_k20x5.mk -│   ├── startup_k20x7.mk -│   ├── startup_k20x.mk -│   ├── startup_kl2x.mk -│   └── startup_stm32l4xx.mk -├── rules.ld -├── rules.mk -└── vectors.c - -chibios/os/hal/ -├── boards -│   ├── FREESCALE_FREEDOM_K20D50M -│   │   ├── board.c -│   │   ├── board.h -│   │   └── board.mk -│   ├── MCHCK_K20 -│   │   ├── board.c -│   │   ├── board.h -│   │   └── board.mk -│   ├── PJRC_TEENSY_3 -│   │   ├── board.c -│   │   ├── board.h -│   │   └── board.mk -│   ├── PJRC_TEENSY_3_1 -│   │   ├── board.c -│   │   ├── board.h -│   │   └── board.mk -│   ├── PJRC_TEENSY_LC -│   │   ├── board.c -│   │   ├── board.h -│   │   └── board.mk -│   ├── readme.txt -│   ├── simulator -│   │   ├── board.c -│   │   ├── board.h -│   │   └── board.mk -│   ├── ST_NUCLEO_F030R8 -│   │   ├── board.c -│   │   ├── board.h -│   │   ├── board.mk -│   │   └── cfg -│   │   └── board.chcfg -├── hal.mk -├── include -│   ├── adc.h -│   ├── can.h -│   ├── dac.h -│   ├── ext.h -│   ├── gpt.h -│   ├── hal_channels.h -│   ├── hal_files.h -│   ├── hal.h -│   ├── hal_ioblock.h -│   ├── hal_mmcsd.h -│   ├── hal_queues.h -│   ├── hal_streams.h -│   ├── i2c.h -│   ├── i2s.h -│   ├── icu.h -│   ├── mac.h -│   ├── mii.h -│   ├── mmc_spi.h -│   ├── pal.h -│   ├── pwm.h -│   ├── rtc.h -│   ├── sdc.h -│   ├── serial.h -│   ├── serial_usb.h -│   ├── spi.h -│   ├── st.h -│   ├── uart.h -│   └── usb.h -├── lib -│   └── streams -│   ├── chprintf.c -│   ├── chprintf.h -│   ├── memstreams.c -│   ├── memstreams.h -│   ├── nullstreams.c -│   └── nullstreams.h -├── osal -│   ├── nil -│   │   ├── osal.c -│   │   ├── osal.h -│   │   └── osal.mk -│   ├── os-less -│   │   └── ARMCMx -│   │   ├── osal.c -│   │   ├── osal.h -│   │   └── osal.mk -│   └── rt -│   ├── osal.c -│   ├── osal.h -│   └── osal.mk -├── ports -│   ├── AVR -│   ├── common -│   │   └── ARMCMx -│   │   ├── mpu.h -│   │   ├── nvic.c -│   │   └── nvic.h -│   ├── KINETIS -│   │   ├── K20x -│   │   │   ├── hal_lld.c -│   │   │   ├── hal_lld.h -│   │   │   ├── kinetis_registry.h -│   │   │   ├── platform.dox -│   │   │   ├── platform.mk -│   │   │   ├── pwm_lld.c -│   │   │   ├── pwm_lld.h -│   │   │   ├── spi_lld.c -│   │   │   └── spi_lld.h -│   │   ├── KL2x -│   │   │   ├── hal_lld.c -│   │   │   ├── hal_lld.h -│   │   │   ├── kinetis_registry.h -│   │   │   ├── platform.mk -│   │   │   ├── pwm_lld.c -│   │   │   └── pwm_lld.h -│   │   ├── LLD -│   │   │   ├── adc_lld.c -│   │   │   ├── adc_lld.h -│   │   │   ├── ext_lld.c -│   │   │   ├── ext_lld.h -│   │   │   ├── gpt_lld.c -│   │   │   ├── gpt_lld.h -│   │   │   ├── i2c_lld.c -│   │   │   ├── i2c_lld.h -│   │   │   ├── pal_lld.c -│   │   │   ├── pal_lld.h -│   │   │   ├── serial_lld.c -│   │   │   ├── serial_lld.h -│   │   │   ├── st_lld.c -│   │   │   ├── st_lld.h -│   │   │   ├── usb_lld.c -│   │   │   └── usb_lld.h -│   │   └── README.md -│   ├── LPC -│   ├── simulator -│   └── STM32 -├── src -│   ├── adc.c -│   ├── can.c -│   ├── dac.c -│   ├── ext.c -│   ├── gpt.c -│   ├── hal.c -│   ├── hal_mmcsd.c -│   ├── hal_queues.c -│   ├── i2c.c -│   ├── i2s.c -│   ├── icu.c -│   ├── mac.c -│   ├── mmc_spi.c -│   ├── pal.c -│   ├── pwm.c -│   ├── rtc.c -│   ├── sdc.c -│   ├── serial.c -│   ├── serial_usb.c -│   ├── spi.c -│   ├── st.c -│   ├── uart.c -│   └── usb.c -└── templates - ├── adc_lld.c - ├── adc_lld.h - ├── can_lld.c - ├── can_lld.h - ├── dac_lld.c - ├── dac_lld.h - ├── ext_lld.c - ├── ext_lld.h - ├── gpt_lld.c - ├── gpt_lld.h - ├── halconf.h - ├── hal_lld.c - ├── hal_lld.h - ├── i2c_lld.c - ├── i2c_lld.h - ├── i2s_lld.c - ├── i2s_lld.h - ├── icu_lld.c - ├── icu_lld.h - ├── mac_lld.c - ├── mac_lld.h - ├── mcuconf.h - ├── osal - │   ├── osal.c - │   ├── osal.h - │   └── osal.mk - ├── pal_lld.c - ├── pal_lld.h - ├── platform.mk - ├── pwm_lld.c - ├── pwm_lld.h - ├── rtc_lld.c - ├── rtc_lld.h - ├── sdc_lld.c - ├── sdc_lld.h - ├── serial_lld.c - ├── serial_lld.h - ├── spi_lld.c - ├── spi_lld.h - ├── st_lld.c - ├── st_lld.h - ├── uart_lld.c - ├── uart_lld.h - ├── usb_lld.c - └── usb_lld.h diff --git a/keyboards/infinity_chibios/Makefile b/keyboards/infinity_chibios/Makefile deleted file mode 100644 index 4e2a6f00f..000000000 --- a/keyboards/infinity_chibios/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifndef MAKEFILE_INCLUDED - include ../../Makefile -endif \ No newline at end of file diff --git a/keyboards/infinity_chibios/bootloader_defs.h b/keyboards/infinity_chibios/bootloader_defs.h deleted file mode 100644 index c67153be6..000000000 --- a/keyboards/infinity_chibios/bootloader_defs.h +++ /dev/null @@ -1 +0,0 @@ -#define KIIBOHD_BOOTLOADER diff --git a/keyboards/infinity_chibios/chconf.h b/keyboards/infinity_chibios/chconf.h deleted file mode 100644 index 43c845739..000000000 --- a/keyboards/infinity_chibios/chconf.h +++ /dev/null @@ -1,524 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/chconf.h - * @brief Configuration file template. - * @details A copy of this file must be placed in each project directory, it - * contains the application specific kernel settings. - * - * @addtogroup config - * @details Kernel related settings and hooks. - * @{ - */ - -#ifndef CHCONF_H -#define CHCONF_H - -#define _CHIBIOS_RT_CONF_ - -/*===========================================================================*/ -/** - * @name System timers settings - * @{ - */ -/*===========================================================================*/ - -/** - * @brief System time counter resolution. - * @note Allowed values are 16 or 32 bits. - */ -#define CH_CFG_ST_RESOLUTION 32 - -/** - * @brief System tick frequency. - * @details Frequency of the system timer that drives the system ticks. This - * setting also defines the system tick time unit. - */ -#define CH_CFG_ST_FREQUENCY 1000 - -/** - * @brief Time delta constant for the tick-less mode. - * @note If this value is zero then the system uses the classic - * periodic tick. This value represents the minimum number - * of ticks that is safe to specify in a timeout directive. - * The value one is not valid, timeouts are rounded up to - * this value. - */ -#define CH_CFG_ST_TIMEDELTA 0 - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel parameters and options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Round robin interval. - * @details This constant is the number of system ticks allowed for the - * threads before preemption occurs. Setting this value to zero - * disables the preemption for threads with equal priority and the - * round robin becomes cooperative. Note that higher priority - * threads can still preempt, the kernel is always preemptive. - * @note Disabling the round robin preemption makes the kernel more compact - * and generally faster. - * @note The round robin preemption is not supported in tickless mode and - * must be set to zero in that case. - */ -#define CH_CFG_TIME_QUANTUM 20 - -/** - * @brief Managed RAM size. - * @details Size of the RAM area to be managed by the OS. If set to zero - * then the whole available RAM is used. The core memory is made - * available to the heap allocator and/or can be used directly through - * the simplified core memory allocator. - * - * @note In order to let the OS manage the whole RAM the linker script must - * provide the @p __heap_base__ and @p __heap_end__ symbols. - * @note Requires @p CH_CFG_USE_MEMCORE. - */ -#define CH_CFG_MEMCORE_SIZE 0 - -/** - * @brief Idle thread automatic spawn suppression. - * @details When this option is activated the function @p chSysInit() - * does not spawn the idle thread. The application @p main() - * function becomes the idle thread and must implement an - * infinite loop. - */ -#define CH_CFG_NO_IDLE_THREAD FALSE - -/* Use __WFI in the idle thread for waiting. Does lower the power - * consumption. */ -#define CORTEX_ENABLE_WFI_IDLE TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Performance options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief OS optimization. - * @details If enabled then time efficient rather than space efficient code - * is used when two possible implementations exist. - * - * @note This is not related to the compiler optimization options. - * @note The default is @p TRUE. - */ -#define CH_CFG_OPTIMIZE_SPEED TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Subsystem options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Time Measurement APIs. - * @details If enabled then the time measurement APIs are included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_TM FALSE - -/** - * @brief Threads registry APIs. - * @details If enabled then the registry APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_REGISTRY TRUE - -/** - * @brief Threads synchronization APIs. - * @details If enabled then the @p chThdWait() function is included in - * the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_WAITEXIT TRUE - -/** - * @brief Semaphores APIs. - * @details If enabled then the Semaphores APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_SEMAPHORES TRUE - -/** - * @brief Semaphores queuing mode. - * @details If enabled then the threads are enqueued on semaphores by - * priority rather than in FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_SEMAPHORES_PRIORITY FALSE - -/** - * @brief Mutexes APIs. - * @details If enabled then the mutexes APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MUTEXES TRUE - -/** - * @brief Enables recursive behavior on mutexes. - * @note Recursive mutexes are heavier and have an increased - * memory footprint. - * - * @note The default is @p FALSE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_MUTEXES_RECURSIVE FALSE - -/** - * @brief Conditional Variables APIs. - * @details If enabled then the conditional variables APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MUTEXES. - */ -#define CH_CFG_USE_CONDVARS TRUE - -/** - * @brief Conditional Variables APIs with timeout. - * @details If enabled then the conditional variables APIs with timeout - * specification are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_CONDVARS. - */ -#define CH_CFG_USE_CONDVARS_TIMEOUT TRUE - -/** - * @brief Events Flags APIs. - * @details If enabled then the event flags APIs are included in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_EVENTS TRUE - -/** - * @brief Events Flags APIs with timeout. - * @details If enabled then the events APIs with timeout specification - * are included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_EVENTS. - */ -#define CH_CFG_USE_EVENTS_TIMEOUT TRUE - -/** - * @brief Synchronous Messages APIs. - * @details If enabled then the synchronous messages APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MESSAGES TRUE - -/** - * @brief Synchronous Messages queuing mode. - * @details If enabled then messages are served by priority rather than in - * FIFO order. - * - * @note The default is @p FALSE. Enable this if you have special - * requirements. - * @note Requires @p CH_CFG_USE_MESSAGES. - */ -#define CH_CFG_USE_MESSAGES_PRIORITY FALSE - -/** - * @brief Mailboxes APIs. - * @details If enabled then the asynchronous messages (mailboxes) APIs are - * included in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_SEMAPHORES. - */ -#define CH_CFG_USE_MAILBOXES TRUE - -/** - * @brief Core Memory Manager APIs. - * @details If enabled then the core memory manager APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMCORE TRUE - -/** - * @brief Heap Allocator APIs. - * @details If enabled then the memory heap allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_MEMCORE and either @p CH_CFG_USE_MUTEXES or - * @p CH_CFG_USE_SEMAPHORES. - * @note Mutexes are recommended. - */ -#define CH_CFG_USE_HEAP TRUE - -/** - * @brief Memory Pools Allocator APIs. - * @details If enabled then the memory pools allocator APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - */ -#define CH_CFG_USE_MEMPOOLS TRUE - -/** - * @brief Dynamic Threads APIs. - * @details If enabled then the dynamic threads creation APIs are included - * in the kernel. - * - * @note The default is @p TRUE. - * @note Requires @p CH_CFG_USE_WAITEXIT. - * @note Requires @p CH_CFG_USE_HEAP and/or @p CH_CFG_USE_MEMPOOLS. - */ -#define CH_CFG_USE_DYNAMIC TRUE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Debug options - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Debug option, kernel statistics. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_STATISTICS FALSE - -/** - * @brief Debug option, system state check. - * @details If enabled the correct call protocol for system APIs is checked - * at runtime. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_SYSTEM_STATE_CHECK FALSE - -/** - * @brief Debug option, parameters checks. - * @details If enabled then the checks on the API functions input - * parameters are activated. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_CHECKS FALSE - -/** - * @brief Debug option, consistency checks. - * @details If enabled then all the assertions in the kernel code are - * activated. This includes consistency checks inside the kernel, - * runtime anomalies and port-defined checks. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_ENABLE_ASSERTS FALSE - -/** - * @brief Debug option, trace buffer. - * @details If enabled then the trace buffer is activated. - * - * @note The default is @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_MASK CH_DBG_TRACE_MASK_DISABLED - -/** - * @brief Trace buffer entries. - * @note The trace buffer is only allocated if @p CH_DBG_TRACE_MASK is - * different from @p CH_DBG_TRACE_MASK_DISABLED. - */ -#define CH_DBG_TRACE_BUFFER_SIZE 128 - -/** - * @brief Debug option, stack checks. - * @details If enabled then a runtime stack check is performed. - * - * @note The default is @p FALSE. - * @note The stack check is performed in a architecture/port dependent way. - * It may not be implemented or some ports. - * @note The default failure mode is to halt the system with the global - * @p panic_msg variable set to @p NULL. - */ -#define CH_DBG_ENABLE_STACK_CHECK FALSE - -/** - * @brief Debug option, stacks initialization. - * @details If enabled then the threads working area is filled with a byte - * value when a thread is created. This can be useful for the - * runtime measurement of the used stack. - * - * @note The default is @p FALSE. - */ -#define CH_DBG_FILL_THREADS FALSE - -/** - * @brief Debug option, threads profiling. - * @details If enabled then a field is added to the @p thread_t structure that - * counts the system ticks occurred while executing the thread. - * - * @note The default is @p FALSE. - * @note This debug option is not currently compatible with the - * tickless mode. - */ -#define CH_DBG_THREADS_PROFILING FALSE - -/** @} */ - -/*===========================================================================*/ -/** - * @name Kernel hooks - * @{ - */ -/*===========================================================================*/ - -/** - * @brief Threads descriptor structure extension. - * @details User fields added to the end of the @p thread_t structure. - */ -#define CH_CFG_THREAD_EXTRA_FIELDS \ - /* Add threads custom fields here.*/ - -/** - * @brief Threads initialization hook. - * @details User initialization code added to the @p chThdInit() API. - * - * @note It is invoked from within @p chThdInit() and implicitly from all - * the threads creation APIs. - */ -#define CH_CFG_THREAD_INIT_HOOK(tp) { \ - /* Add threads initialization code here.*/ \ -} - -/** - * @brief Threads finalization hook. - * @details User finalization code added to the @p chThdExit() API. - */ -#define CH_CFG_THREAD_EXIT_HOOK(tp) { \ - /* Add threads finalization code here.*/ \ -} - -/** - * @brief Context switch hook. - * @details This hook is invoked just before switching between threads. - */ -#define CH_CFG_CONTEXT_SWITCH_HOOK(ntp, otp) { \ - /* Context switch code here.*/ \ -} - -/** - * @brief ISR enter hook. - */ -#define CH_CFG_IRQ_PROLOGUE_HOOK() { \ - /* IRQ prologue code here.*/ \ -} - -/** - * @brief ISR exit hook. - */ -#define CH_CFG_IRQ_EPILOGUE_HOOK() { \ - /* IRQ epilogue code here.*/ \ -} - -/** - * @brief Idle thread enter hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to activate a power saving mode. - */ -#define CH_CFG_IDLE_ENTER_HOOK() { \ - /* Idle-enter code here.*/ \ -} - -/** - * @brief Idle thread leave hook. - * @note This hook is invoked within a critical zone, no OS functions - * should be invoked from here. - * @note This macro can be used to deactivate a power saving mode. - */ -#define CH_CFG_IDLE_LEAVE_HOOK() { \ - /* Idle-leave code here.*/ \ -} - -/** - * @brief Idle Loop hook. - * @details This hook is continuously invoked by the idle thread loop. - */ -#define CH_CFG_IDLE_LOOP_HOOK() { \ - /* Idle loop code here.*/ \ -} - -/** - * @brief System tick event hook. - * @details This hook is invoked in the system tick handler immediately - * after processing the virtual timers queue. - */ -#define CH_CFG_SYSTEM_TICK_HOOK() { \ - /* System tick event code here.*/ \ -} - -/** - * @brief System halt hook. - * @details This hook is invoked in case to a system halting error before - * the system is halted. - */ -#define CH_CFG_SYSTEM_HALT_HOOK(reason) { \ - /* System halt code here.*/ \ -} - -/** - * @brief Trace hook. - * @details This hook is invoked each time a new record is written in the - * trace buffer. - */ -#define CH_CFG_TRACE_HOOK(tep) { \ - /* Trace code here.*/ \ -} - -/** @} */ - -/*===========================================================================*/ -/* Port-specific settings (override port settings defaulted in chcore.h). */ -/*===========================================================================*/ - -#endif /* CHCONF_H */ - -/** @} */ diff --git a/keyboards/infinity_chibios/config.h b/keyboards/infinity_chibios/config.h deleted file mode 100644 index 452cc2a9f..000000000 --- a/keyboards/infinity_chibios/config.h +++ /dev/null @@ -1,78 +0,0 @@ -/* -Copyright 2015 Jun Wako - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#define PREVENT_STUCK_MODIFIERS - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6464 -#define DEVICE_VER 0x0001 -/* in python2: list(u"whatever".encode('utf-16-le')) */ -/* at most 32 characters or the ugly hack in usb_main.c borks */ -#define MANUFACTURER "TMK" -#define USBSTR_MANUFACTURER 'T', '\x00', 'M', '\x00', 'K', '\x00', ' ', '\x00', '\xc6', '\x00' -#define PRODUCT "Infinity keyboard/TMK" -#define USBSTR_PRODUCT 'I', '\x00', 'n', '\x00', 'f', '\x00', 'i', '\x00', 'n', '\x00', 'i', '\x00', 't', '\x00', 'y', '\x00', ' ', '\x00', 'k', '\x00', 'e', '\x00', 'y', '\x00', 'b', '\x00', 'o', '\x00', 'a', '\x00', 'r', '\x00', 'd', '\x00', '/', '\x00', 'T', '\x00', 'M', '\x00', 'K', '\x00' - -/* key matrix size */ -#define MATRIX_ROWS 9 -#define MATRIX_COLS 7 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -//#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -//#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* Keymap for Infinity prototype */ -//#define INFINITY_PROTOTYPE - -/* Keymap for Infinity 1.1a (first revision with LED support) */ -//#define INFINITY_LED - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/infinity_chibios/halconf.h b/keyboards/infinity_chibios/halconf.h deleted file mode 100644 index 46b37a4f4..000000000 --- a/keyboards/infinity_chibios/halconf.h +++ /dev/null @@ -1,353 +0,0 @@ -/* - ChibiOS - Copyright (C) 2006..2015 Giovanni Di Sirio - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -/** - * @file templates/halconf.h - * @brief HAL configuration header. - * @details HAL configuration file, this file allows to enable or disable the - * various device drivers from your application. You may also use - * this file in order to override the device drivers default settings. - * - * @addtogroup HAL_CONF - * @{ - */ - -#ifndef _HALCONF_H_ -#define _HALCONF_H_ - -#include "mcuconf.h" - -/** - * @brief Enables the PAL subsystem. - */ -#if !defined(HAL_USE_PAL) || defined(__DOXYGEN__) -#define HAL_USE_PAL TRUE -#endif - -/** - * @brief Enables the ADC subsystem. - */ -#if !defined(HAL_USE_ADC) || defined(__DOXYGEN__) -#define HAL_USE_ADC FALSE -#endif - -/** - * @brief Enables the CAN subsystem. - */ -#if !defined(HAL_USE_CAN) || defined(__DOXYGEN__) -#define HAL_USE_CAN FALSE -#endif - -/** - * @brief Enables the DAC subsystem. - */ -#if !defined(HAL_USE_DAC) || defined(__DOXYGEN__) -#define HAL_USE_DAC FALSE -#endif - -/** - * @brief Enables the EXT subsystem. - */ -#if !defined(HAL_USE_EXT) || defined(__DOXYGEN__) -#define HAL_USE_EXT FALSE -#endif - -/** - * @brief Enables the GPT subsystem. - */ -#if !defined(HAL_USE_GPT) || defined(__DOXYGEN__) -#define HAL_USE_GPT FALSE -#endif - -/** - * @brief Enables the I2C subsystem. - */ -#if !defined(HAL_USE_I2C) || defined(__DOXYGEN__) -#define HAL_USE_I2C FALSE -#endif - -/** - * @brief Enables the I2S subsystem. - */ -#if !defined(HAL_USE_I2S) || defined(__DOXYGEN__) -#define HAL_USE_I2S FALSE -#endif - -/** - * @brief Enables the ICU subsystem. - */ -#if !defined(HAL_USE_ICU) || defined(__DOXYGEN__) -#define HAL_USE_ICU FALSE -#endif - -/** - * @brief Enables the MAC subsystem. - */ -#if !defined(HAL_USE_MAC) || defined(__DOXYGEN__) -#define HAL_USE_MAC FALSE -#endif - -/** - * @brief Enables the MMC_SPI subsystem. - */ -#if !defined(HAL_USE_MMC_SPI) || defined(__DOXYGEN__) -#define HAL_USE_MMC_SPI FALSE -#endif - -/** - * @brief Enables the PWM subsystem. - */ -#if !defined(HAL_USE_PWM) || defined(__DOXYGEN__) -#define HAL_USE_PWM FALSE -#endif - -/** - * @brief Enables the RTC subsystem. - */ -#if !defined(HAL_USE_RTC) || defined(__DOXYGEN__) -#define HAL_USE_RTC FALSE -#endif - -/** - * @brief Enables the SDC subsystem. - */ -#if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE -#endif - -/** - * @brief Enables the SERIAL subsystem. - */ -#if !defined(HAL_USE_SERIAL) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL FALSE -#endif - -/** - * @brief Enables the SERIAL over USB subsystem. - */ -#if !defined(HAL_USE_SERIAL_USB) || defined(__DOXYGEN__) -#define HAL_USE_SERIAL_USB TRUE -#endif - -/** - * @brief Enables the SPI subsystem. - */ -#if !defined(HAL_USE_SPI) || defined(__DOXYGEN__) -#define HAL_USE_SPI FALSE -#endif - -/** - * @brief Enables the UART subsystem. - */ -#if !defined(HAL_USE_UART) || defined(__DOXYGEN__) -#define HAL_USE_UART FALSE -#endif - -/** - * @brief Enables the USB subsystem. - */ -#if !defined(HAL_USE_USB) || defined(__DOXYGEN__) -#define HAL_USE_USB TRUE -#endif - -/** - * @brief Enables the WDG subsystem. - */ -#if !defined(HAL_USE_WDG) || defined(__DOXYGEN__) -#define HAL_USE_WDG FALSE -#endif - -/*===========================================================================*/ -/* ADC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_WAIT) || defined(__DOXYGEN__) -#define ADC_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p adcAcquireBus() and @p adcReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(ADC_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define ADC_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* CAN driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Sleep mode related APIs inclusion switch. - */ -#if !defined(CAN_USE_SLEEP_MODE) || defined(__DOXYGEN__) -#define CAN_USE_SLEEP_MODE TRUE -#endif - -/*===========================================================================*/ -/* I2C driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables the mutual exclusion APIs on the I2C bus. - */ -#if !defined(I2C_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define I2C_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* MAC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_ZERO_COPY) || defined(__DOXYGEN__) -#define MAC_USE_ZERO_COPY FALSE -#endif - -/** - * @brief Enables an event sources for incoming packets. - */ -#if !defined(MAC_USE_EVENTS) || defined(__DOXYGEN__) -#define MAC_USE_EVENTS TRUE -#endif - -/*===========================================================================*/ -/* MMC_SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - * This option is recommended also if the SPI driver does not - * use a DMA channel and heavily loads the CPU. - */ -#if !defined(MMC_NICE_WAITING) || defined(__DOXYGEN__) -#define MMC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SDC driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Number of initialization attempts before rejecting the card. - * @note Attempts are performed at 10mS intervals. - */ -#if !defined(SDC_INIT_RETRY) || defined(__DOXYGEN__) -#define SDC_INIT_RETRY 100 -#endif - -/** - * @brief Include support for MMC cards. - * @note MMC support is not yet implemented so this option must be kept - * at @p FALSE. - */ -#if !defined(SDC_MMC_SUPPORT) || defined(__DOXYGEN__) -#define SDC_MMC_SUPPORT FALSE -#endif - -/** - * @brief Delays insertions. - * @details If enabled this options inserts delays into the MMC waiting - * routines releasing some extra CPU time for the threads with - * lower priority, this may slow down the driver a bit however. - */ -#if !defined(SDC_NICE_WAITING) || defined(__DOXYGEN__) -#define SDC_NICE_WAITING TRUE -#endif - -/*===========================================================================*/ -/* SERIAL driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Default bit rate. - * @details Configuration parameter, this is the baud rate selected for the - * default configuration. - */ -#if !defined(SERIAL_DEFAULT_BITRATE) || defined(__DOXYGEN__) -#define SERIAL_DEFAULT_BITRATE 38400 -#endif - -/** - * @brief Serial buffers size. - * @details Configuration parameter, you can change the depth of the queue - * buffers depending on the requirements of your application. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_BUFFERS_SIZE 16 -#endif - -/*===========================================================================*/ -/* SERIAL_USB driver related setting. */ -/*===========================================================================*/ - -/** - * @brief Serial over USB buffers size. - * @details Configuration parameter, the buffer size must be a multiple of - * the USB data endpoint maximum packet size. - * @note The default is 64 bytes for both the transmission and receive - * buffers. - */ -#if !defined(SERIAL_USB_BUFFERS_SIZE) || defined(__DOXYGEN__) -#define SERIAL_USB_BUFFERS_SIZE 256 -#endif - -/*===========================================================================*/ -/* SPI driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_WAIT) || defined(__DOXYGEN__) -#define SPI_USE_WAIT TRUE -#endif - -/** - * @brief Enables the @p spiAcquireBus() and @p spiReleaseBus() APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(SPI_USE_MUTUAL_EXCLUSION) || defined(__DOXYGEN__) -#define SPI_USE_MUTUAL_EXCLUSION TRUE -#endif - -/*===========================================================================*/ -/* USB driver related settings. */ -/*===========================================================================*/ - -/** - * @brief Enables synchronous APIs. - * @note Disabling this option saves both code and data space. - */ -#if !defined(USB_USE_WAIT) || defined(__DOXYGEN__) -#define USB_USE_WAIT TRUE -#endif - -#endif /* _HALCONF_H_ */ - -/** @} */ diff --git a/keyboards/infinity_chibios/infinity_chibios.c b/keyboards/infinity_chibios/infinity_chibios.c deleted file mode 100644 index 845eda01b..000000000 --- a/keyboards/infinity_chibios/infinity_chibios.c +++ /dev/null @@ -1,17 +0,0 @@ -/* -Copyright 2012,2013 Jun Wako - -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 . -*/ -#include "infinity_chibios.h" diff --git a/keyboards/infinity_chibios/infinity_chibios.h b/keyboards/infinity_chibios/infinity_chibios.h deleted file mode 100644 index f1ba15e48..000000000 --- a/keyboards/infinity_chibios/infinity_chibios.h +++ /dev/null @@ -1,66 +0,0 @@ -/* -Copyright 2014 Jun Wako - -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 . -*/ -#ifndef KEYMAP_COMMON_H -#define KEYMAP_COMMON_H - -#include "quantum.h" - -#ifdef INFINITY_PROTOTYPE - -/* Infinity prototype */ -#define KEYMAP( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K86, \ - K51, K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, \ - K13, K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, \ - K54, K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, \ - K06, K16, K26, K36, K46, K56, K66, K76 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06 }, \ - { K10, K11, K12, K13, K14, K15, K16 }, \ - { K20, K21, K22, K23, K24, K25, K26 }, \ - { K30, K31, K32, K33, K34, K35, K36 }, \ - { K40, K41, K42, K43, K44, K45, K46 }, \ - { K50, K51, K52, K53, K54, K55, K56 }, \ - { K60, K61, K62, K63, K64, K65, K66 }, \ - { K70, K71, K72, K73, K74, K75, K76 }, \ - { K80, K81, K82, K83, K84, K85, K86 } \ -} - -#else - -/* Infinity production */ -#define KEYMAP( \ - K00, K10, K20, K30, K40, K50, K60, K70, K80, K01, K11, K21, K31, K41, K51, \ - K61, K71, K81, K02, K12, K22, K32, K42, K52, K62, K72, K82, K03, K13, \ - K23, K33, K43, K53, K63, K73, K83, K04, K14, K24, K34, K44, K54, \ - K64, K74, K84, K05, K15, K25, K35, K45, K55, K65, K75, K85, K06, \ - K16, K26, K36, K46, K56, K66, K76, K86 \ -) { \ - { K00, K01, K02, K03, K04, K05, K06 }, \ - { K10, K11, K12, K13, K14, K15, K16 }, \ - { K20, K21, K22, K23, K24, K25, K26 }, \ - { K30, K31, K32, K33, K34, K35, K36 }, \ - { K40, K41, K42, K43, K44, K45, K46 }, \ - { K50, K51, K52, K53, K54, K55, K56 }, \ - { K60, K61, K62, K63, K64, K65, K66 }, \ - { K70, K71, K72, K73, K74, K75, K76 }, \ - { K80, K81, K82, K83, K84, K85, K86 } \ -} - -#endif - -#endif diff --git a/keyboards/infinity_chibios/keymaps/default/keymap.c b/keyboards/infinity_chibios/keymaps/default/keymap.c deleted file mode 100644 index 5f3b46a36..000000000 --- a/keyboards/infinity_chibios/keymaps/default/keymap.c +++ /dev/null @@ -1,48 +0,0 @@ -#include "infinity_chibios.h" - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| - * |-----------------------------------------------------------| - * |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, 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_NO, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,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( - KC_PWR, 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, KC_DEL, \ - KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS, KC_BSPC, \ - KC_TRNS,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_PENT, \ - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_TRNS,KC_TRNS, \ - KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS), -}; - -const uint16_t fn_actions[] = { - -}; - diff --git a/keyboards/infinity_chibios/keymaps/depariel/keymap.c b/keyboards/infinity_chibios/keymaps/depariel/keymap.c deleted file mode 100755 index e68891f79..000000000 --- a/keyboards/infinity_chibios/keymaps/depariel/keymap.c +++ /dev/null @@ -1,82 +0,0 @@ -#include "infinity_chibios.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| \| `| - * |-----------------------------------------------------------| - * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| Bksp| - * |-----------------------------------------------------------| - * |Contro| A| S| D| F| G| H| J| K| L| ;| '|Enter | - * |-----------------------------------------------------------| - * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift |Fn2| - * |-----------------------------------------------------------' - * |Fn2 |Gui |Alt | Space |RAlt|Prv|PlPs|Next| - * `-----------------------------------------------------------' - */ - [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, KC_SCLN, KC_QUOT, LT(5, KC_ENT), \ - KC_LSPO, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSPC, MO(4), \ - MO(4), KC_LGUI, KC_LALT, LT(3, KC_SPC), KC_RALT, KC_MPRV, KC_MPLY, KC_MNXT), - - /* Layer 1: "Toggle" off SpaceFn for League of Legends - */ - [1] = 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, 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(4), \ - MO(4), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_MPRV, KC_MPLY, KC_MNXT), - - /* Layer 2: "Toggle" off SpaceFn for MapleRoyals - */ - [2] = 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, 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_UP, KC_LSFT, \ - MO(4), KC_LGUI, KC_LALT, KC_SPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RGHT), - - /* Layer 3: FN layer 1 - */ - [3] = KEYMAP( - KC_NO, 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, KC_BTN1, KC_MS_U, KC_BTN2, LALT(KC_F4), KC_HOME, KC_PGUP, KC_PSCR, KC_SLCK, KC_UP, KC_NO, KC_LPRN, KC_RPRN, KC_DEL, \ - MO(6), KC_MS_L, KC_MS_D, KC_MS_R, KC_NO, KC_END, KC_PGDN, KC_TILD, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, \ - LGUI(KC_SPC), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_CALC, KC_MENU, KC_TRNS, TG(4), \ - KC_TRNS, KC_TRNS, KC_TRNS, LT(3, KC_SPC), KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU), - - /* Layer 4: FN layer 2 - */ - [4] = KEYMAP( - KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_PMNS, KC_PPLS, KC_PSLS, TG(2), \ - KC_CAPS, KC_NO, KC_UP, KC_NO, KC_NO, KC_NO, KC_NO, KC_PSCR, KC_NO, KC_P7, KC_P8, KC_P9, KC_PAST, KC_BSPC, \ - KC_LCTL, KC_LEFT, KC_DOWN, KC_RGHT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P4, KC_P5, KC_P6, KC_PENT, \ - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_P1, KC_P2, KC_P3, KC_RSFT, MO(4), \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_P0, KC_PDOT, KC_NO, TG(1)), - - /* Layer 5: FN layer 3 - */ - [5] = KEYMAP( - 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_TAB , KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F13, KC_F14, KC_F15, KC_F16, KC_NO, KC_TRNS, \ - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F17, KC_F18, KC_F19, KC_F20, LT(5, KC_ENT), \ - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_F21, KC_F22, KC_F23, KC_F24, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_RALT, KC_NO, KC_NO, KC_NO), - - /* Layer 6: FN layer 4 - */ - [6] = KEYMAP( - 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, \ - LCTL(LSFT(KC_TAB)), KC_NO, LGUI(KC_UP), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - MO(6), LGUI(KC_LEFT), LGUI(KC_DOWN), LGUI(KC_RGHT), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, \ - KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_TRNS, KC_TRNS, \ - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_NO, KC_NO, KC_NO), -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - diff --git a/keyboards/infinity_chibios/keymaps/hasu/keymap.c b/keyboards/infinity_chibios/keymaps/hasu/keymap.c deleted file mode 100644 index a1954d258..000000000 --- a/keyboards/infinity_chibios/keymaps/hasu/keymap.c +++ /dev/null @@ -1,113 +0,0 @@ -#include "infinity_chibios.h" - -const uint16_t keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - /* Layer 0: Default Layer - * ,-----------------------------------------------------------. - * |Esc| 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =| `|BSp| - * |-----------------------------------------------------------| - * |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( - KC_PWR, 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, KC_DEL, \ - KC_CAPS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PSCR,KC_SLCK,KC_PAUS, KC_UP, KC_TRNS,KC_BSPC, \ - KC_LCTL,KC_VOLD,KC_VOLU,KC_MUTE,KC_TRNS,KC_TRNS,KC_PAST,KC_PSLS,KC_HOME,KC_PGUP,KC_LEFT,KC_RGHT,KC_ENT, \ - KC_LSFT,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_PPLS,KC_PMNS,KC_END, KC_PGDN,KC_DOWN,KC_RSFT,KC_TRNS, \ - KC_TRNS,KC_LGUI,KC_LALT, KC_TRNS, KC_RALT,KC_RGUI,KC_TRNS,KC_TRNS), - - /* Layer 2: Vi mode[Slash] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab |Hom|PgD|Up |PgU|End|Hom|PgD|PgUlEnd| | | |Backs| - * |-----------------------------------------------------------| - * |Contro| |Lef|Dow|Rig| |Lef|Dow|Up |Rig| | |Return | - * |-----------------------------------------------------------| - * |Shift | | | | | |Hom|PgD|PgUlEnd|Fn0|Shift | | - * `-----------------------------------------------------------' - * |Gui|Alt | Space |Alt |Gui| - * `-------------------------------------------' - */ - [2] = 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_INS, KC_DEL, \ - KC_TAB, KC_HOME,KC_PGDN,KC_UP, KC_PGUP,KC_END, KC_HOME,KC_PGDN,KC_PGUP,KC_END, KC_NO, KC_NO, KC_NO, KC_BSPC, \ - KC_LCTL,KC_NO, KC_LEFT,KC_DOWN,KC_RGHT,KC_NO, KC_LEFT,KC_DOWN,KC_UP, KC_RGHT,KC_NO, KC_NO, KC_ENT, \ - KC_LSFT,KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_HOME,KC_PGDN,KC_PGUP,KC_END, LT(2, KC_SLSH), KC_RSFT,KC_TRNS, \ - KC_TRNS,KC_LGUI,KC_LALT, KC_SPC, KC_RALT,KC_RGUI,KC_TRNS, KC_TRNS), - - /* Layer 3: Mouse mode(IJKL)[Semicolon] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| - * |-----------------------------------------------------------| - * |Contro| | | | | |Mb2|McL|McD|McR|Fn | |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt | Mb1 |Fn |Fn | - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - [3] = 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_INS, KC_DEL, \ - LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R, ALT_T(KC_LEFT), ALT_T(KC_RGHT),LALT(KC_TAB), \ - KC_LCTL, KC_ACL0,KC_ACL1,KC_ACL2,KC_ACL2,KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, LT(3, KC_SCLN), KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3,KC_BTN2,KC_BTN1,ALT_T(KC_LEFT), ALT_T(KC_RGHT), KC_NO, KC_RSFT, KC_TRNS, \ - KC_TRNS, KC_LGUI,KC_LALT, KC_BTN1, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS), - - /* Layer 4: Mouse mode(IJKL)[Space] - * ,-----------------------------------------------------------. - * |Esc| F1| F2| F3| F4| F5| F6| F7| F8| F9|F10|F11|F12|Ins|Del| - * |-----------------------------------------------------------| - * |Tab | | | | | |MwL|MwD|McU|MwU|MwR|Wbk|Wfr|Alt-T| - * |-----------------------------------------------------------| - * |Contro| | | | | |Mb2|McL|McD|McR|Mb1| |Return | - * |-----------------------------------------------------------| - * |Shift | | | | |Mb3|Mb2|Mb1|Mb4|Mb5| |Shift | | - * `-----------------------------------------------------------' - * |Gui |Alt | Mb1 |Fn |Fn | - * `--------------------------------------------' - * Mc: Mouse Cursor / Mb: Mouse Button / Mw: Mouse Wheel - */ - [4] = 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_INS, KC_DEL, \ - LALT(KC_TAB), KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_WH_L,KC_WH_D,KC_MS_U, KC_WH_U, KC_WH_R,KC_BTN4,KC_BTN5,LALT(KC_TAB), \ - KC_LCTL, KC_VOLD,KC_VOLU,KC_MUTE,KC_NO, KC_NO, KC_NO, KC_MS_L,KC_MS_D, KC_MS_R, KC_BTN1,KC_NO, KC_ENT, \ - KC_LSFT, KC_NO, KC_NO, KC_NO, KC_NO, KC_BTN3,KC_BTN2,KC_BTN1,ALT_T(KC_LEFT),ALT_T(KC_RGHT),KC_NO, KC_RSFT,KC_TRNS, \ - KC_TRNS, KC_LGUI,KC_LALT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS), - -}; - -/* - * Fn action definition - */ -const uint16_t fn_actions[] = { - -}; diff --git a/keyboards/infinity_chibios/led.c b/keyboards/infinity_chibios/led.c deleted file mode 100644 index aed66c7c0..000000000 --- a/keyboards/infinity_chibios/led.c +++ /dev/null @@ -1,24 +0,0 @@ -/* -Copyright 2012 Jun Wako - -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 . -*/ - -#include "hal.h" - -#include "led.h" - - -void led_set(uint8_t usb_led) { -} diff --git a/keyboards/infinity_chibios/matrix.c b/keyboards/infinity_chibios/matrix.c deleted file mode 100644 index 62c165aa5..000000000 --- a/keyboards/infinity_chibios/matrix.c +++ /dev/null @@ -1,171 +0,0 @@ -#include -#include -#include -#include "hal.h" -#include "timer.h" -#include "wait.h" -#include "print.h" -#include "matrix.h" - - -/* - * Infinity Pinusage: - * Column pins are input with internal pull-down. Row pins are output and strobe with high. - * Key is high or 1 when it turns on. - * INFINITY PRODUCTION (NO LED) - * col: { PTD1, PTD2, PTD3, PTD4, PTD5, PTD6, PTD7 } - * row: { PTB0, PTB1, PTB2, PTB3, PTB16, PTB17, PTC4, PTC5, PTD0 } - * INFINITY PRODUCTION (WITH LED) - * col: { PTD1, PTD2, PTD3, PTD4, PTD5, PTD6, PTD7 } - * row: { PTC0, PTC1, PTC2, PTC3, PTC4, PTC5, PTC6, PTC7, PTD0 } - */ -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; -static bool debouncing = false; -static uint16_t debouncing_time = 0; - - -void matrix_init(void) -{ - /* Column(sense) */ - palSetPadMode(GPIOD, 1, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 2, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 3, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 4, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 5, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 6, PAL_MODE_INPUT_PULLDOWN); - palSetPadMode(GPIOD, 7, PAL_MODE_INPUT_PULLDOWN); - -#ifdef INFINITY_LED - /* Row(strobe) */ - palSetPadMode(GPIOC, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 6, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 7, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); -#else - /* Row(strobe) */ - palSetPadMode(GPIOB, 0, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 1, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 2, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 3, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 16, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOB, 17, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 4, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOC, 5, PAL_MODE_OUTPUT_PUSHPULL); - palSetPadMode(GPIOD, 0, PAL_MODE_OUTPUT_PUSHPULL); -#endif - memset(matrix, 0, MATRIX_ROWS); - memset(matrix_debouncing, 0, MATRIX_ROWS); -} - -uint8_t matrix_scan(void) -{ - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix_row_t data = 0; - #ifdef INFINITY_LED - // strobe row - switch (row) { - case 0: palSetPad(GPIOC, 0); break; - case 1: palSetPad(GPIOC, 1); break; - case 2: palSetPad(GPIOC, 2); break; - case 3: palSetPad(GPIOC, 3); break; - case 4: palSetPad(GPIOC, 4); break; - case 5: palSetPad(GPIOC, 5); break; - case 6: palSetPad(GPIOC, 6); break; - case 7: palSetPad(GPIOC, 7); break; - case 8: palSetPad(GPIOD, 0); break; - } - #else - // strobe row - switch (row) { - case 0: palSetPad(GPIOB, 0); break; - case 1: palSetPad(GPIOB, 1); break; - case 2: palSetPad(GPIOB, 2); break; - case 3: palSetPad(GPIOB, 3); break; - case 4: palSetPad(GPIOB, 16); break; - case 5: palSetPad(GPIOB, 17); break; - case 6: palSetPad(GPIOC, 4); break; - case 7: palSetPad(GPIOC, 5); break; - case 8: palSetPad(GPIOD, 0); break; - } - #endif - - wait_us(1); // need wait to settle pin state - - // read col data - data = (palReadPort(GPIOD)>>1); - #ifdef INFINITY_LED - // un-strobe row - switch (row) { - case 0: palClearPad(GPIOC, 0); break; - case 1: palClearPad(GPIOC, 1); break; - case 2: palClearPad(GPIOC, 2); break; - case 3: palClearPad(GPIOC, 3); break; - case 4: palClearPad(GPIOC, 4); break; - case 5: palClearPad(GPIOC, 5); break; - case 6: palClearPad(GPIOC, 6); break; - case 7: palClearPad(GPIOC, 7); break; - case 8: palClearPad(GPIOD, 0); break; - } - #else - // un-strobe row - switch (row) { - case 0: palClearPad(GPIOB, 0); break; - case 1: palClearPad(GPIOB, 1); break; - case 2: palClearPad(GPIOB, 2); break; - case 3: palClearPad(GPIOB, 3); break; - case 4: palClearPad(GPIOB, 16); break; - case 5: palClearPad(GPIOB, 17); break; - case 6: palClearPad(GPIOC, 4); break; - case 7: palClearPad(GPIOC, 5); break; - case 8: palClearPad(GPIOD, 0); break; - } - #endif - - if (matrix_debouncing[row] != data) { - matrix_debouncing[row] = data; - debouncing = true; - debouncing_time = timer_read(); - } - } - - if (debouncing && timer_elapsed(debouncing_time) > DEBOUNCE) { - for (int row = 0; row < MATRIX_ROWS; row++) { - matrix[row] = matrix_debouncing[row]; - } - debouncing = false; - } - return 1; -} - -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & (1</os/hal/ports/$(MCU_FAMILY)/$(MCU_SERIES) -# - For Teensies, FAMILY = KINETIS and SERIES is either -# KL2x (LC) or K20x (3.0,3.1,3.2). -# - For Infinity KB, SERIES = K20x -MCU_FAMILY = KINETIS -MCU_SERIES = K20x - -# Linker script to use -# - it should exist either in /os/common/ports/ARMCMx/compilers/GCC/ld/ -# or /ld/ -# - NOTE: a custom ld script is needed for EEPROM on Teensy LC -# - LDSCRIPT = -# - MKL26Z64 for Teensy LC -# - MK20DX128 for Teensy 3.0 -# - MK20DX256 for Teensy 3.1 and 3.2 -# - MK20DX128BLDR4 for Infinity with Kiibohd bootloader -MCU_LDSCRIPT = MK20DX128BLDR4 - -# Startup code to use -# - it should exist in /os/common/ports/ARMCMx/compilers/GCC/mk/ -# - STARTUP = -# - kl2x for Teensy LC -# - k20x5 for Teensy 3.0 and Infinity KB -# - k20x7 for Teensy 3.1 and 3.2 -MCU_STARTUP = k20x5 - -# Board: it should exist either in /os/hal/boards/ -# or /boards -# - BOARD = -# - PJRC_TEENSY_LC for Teensy LC -# - PJRC_TEENSY_3 for Teensy 3.0 -# - PJRC_TEENSY_3_1 for Teensy 3.1 or 3.2 -# - MCHCK_K20 for Infinity KB -BOARD = MCHCK_K20 - -# Cortex version -# Teensy LC is cortex-m0; Teensy 3.x are cortex-m4 -MCU = cortex-m4 - -# ARM version, CORTEX-M0/M1 are 6, CORTEX-M3/M4/M7 are 7 -# I.e. 6 for Teensy LC; 7 for Teensy 3.x -ARMV = 7 - -# Vector table for application -# 0x00000000-0x00001000 area is occupied by bootlaoder.*/ -# The CORTEX_VTOR... is needed only for MCHCK/Infinity KB -OPT_DEFS = -DCORTEX_VTOR_INIT=0x00001000 - -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration -## (Note that for BOOTMAGIC on Teensy LC you have to use a custom .ld script.) -MOUSEKEY_ENABLE ?= yes # Mouse keys -EXTRAKEY_ENABLE ?= yes # Audio control and System control -CONSOLE_ENABLE ?= yes # Console for debug -COMMAND_ENABLE ?= yes # Commands for debug and configuration -SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover -CUSTOM_MATRIX ?= yes # Custom matrix file \ No newline at end of file -- cgit v1.2.3 From 3bdebd2270a40593f4779f0013f588e47b3c53fc Mon Sep 17 00:00:00 2001 From: Fred Sundvik Date: Sun, 28 Aug 2016 00:52:32 +0300 Subject: Update list of community keyboards --- keyboards/readme.md | 47 ++++++++++++++++++++++++++++------------------- 1 file changed, 28 insertions(+), 19 deletions(-) (limited to 'keyboards') diff --git a/keyboards/readme.md b/keyboards/readme.md index 4f1796219..81a23c7e5 100644 --- a/keyboards/readme.md +++ b/keyboards/readme.md @@ -9,38 +9,47 @@ These keyboards are manufactured by the maintainers of QMK. What makes OLKB keyboards shine is a combo of lean aesthetics, compact size, and killer tactile feel. These are available through [olkb.com](http://olkb.com) as well as through [Massdrop](http://massdrop.com) from time to time, as easy to assemble kits. -* [Planck](/keyboards/planck/) - A 40% DIY powerhouse of customizability and modification capability. It's a lean, mean, typing machine. -* [Preonic](/keyboards/preonic/) - Like the Planck, but bigger. 50%. -* [Atomic](/keyboards/atomic/) - Imagine the size of the Planck. Now imagine the size of the Preonic. Now imagine _bigger_. That is the Atomic. A 60% keyboard. +* [Planck](/keyboards/planck/) — A 40% DIY powerhouse of customizability and modification capability. It's a lean, mean, typing machine. +* [Preonic](/keyboards/preonic/) — Like the Planck, but bigger. 50%. +* [Atomic](/keyboards/atomic/) — Imagine the size of the Planck. Now imagine the size of the Preonic. Now imagine _bigger_. That is the Atomic. A 60% keyboard. ### ErgoDox EZ - Erez Zukerman Made in Taiwan using advanced robotic manufacturing, the ErgoDox EZ is a fully-assembled, premium ergonomic keyboard. Its split design allows you to place both halves shoulder width, and its custom-made wrist rests and tilt/tent kit make for incredibly comfortable typing. Available on [ergodox-ez.com](https://ergodox-ez.com). -* [ErgoDox EZ](/keyboards/ergodox/) - Our one and only product. Yes, it's that awesome. Comes with either printed or blank keycaps, and 7 different keyswitch types. +* [ErgoDox EZ](/keyboards/ergodox/) — Our one and only product. Yes, it's that awesome. Comes with either printed or blank keycaps, and 7 different keyswitch types. ### Clueboard - Zach White Designed and built in Felton, CA, Clueboards keyboard emphasize quality and locally sourced components, available on [clueboard.co](http://clueboard.co) -* [Clueboard](/keyboards/clueboard/) - The 66% custom keyboard. -* [Cluepad](/keyboards/cluepad/) - A mechanical numpad with QMK superpowers. +* [Clueboard](/keyboards/clueboard/) — The 66% custom keyboard. +* [Cluecard](/keyboards/cluecard/) — A small board to help you hack on QMK. +* [Cluepad](/keyboards/cluepad/) — A mechanical numpad with QMK superpowers. ## Community-supported QMK Keyboards These keyboards are part of the QMK repository, but their manufacturers are not official maintainers of the repository. -* [alps64](/keyboards/alps64/) — A 60% keyboard for Alps keyswitches. -* [arrow_pad](/keyboards/arrow_pad) — A custom creation by IBNobody. -* [atreus](/keyboards/atreus) — Made by Technomancy. -* [bantam44](/keyboards/bantam44) — It is a 44-key 40% staggered keyboard. -* [gh60](/keyboards/gh60) — A 60% Geekhack community-driven project. -* [hhkb](/keyboards/hhkb) — The Happy Hacking keyboard can be hacked with a custom controller to run QMK. -* [jd45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe. -* [kc60](/keyboards/kc60) — A programmable Chinese-made keyboard, lost in the mists of time. -* [kitten_paw](/keyboards/kitten_paw) — A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies) -* [phantom](/keyboards/phantom) — A tenkeyless kit by Teel, also from Geekhack. -* [retro_refit](/keyboards/retro_refit) — Another creation by IBNobody. -* [satan](/keyboards/satan) — A GH60 variant. -* [sixkeyboard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. +* [Alps64](/keyboards/alps64) — A 60% keyboard for Alps keyswitches. +* [AMJ60](/keyboards/amj60) — DIY/Assembled compact 60% keyboard. +* [Arrow Pad](/keyboards/arrow_pad) — A custom creation by IBNobody. +* [Atreus](/keyboards/atreus) — Made by Technomancy. +* [Bantam44](/keyboards/bantam44) — It is a 44-key 40% staggered keyboard. +* [Ergodox Infinity](/keyboards/ergodox) - Ergonomic Split Keyboard by Input Club. +* [GH60](/keyboards/gh60) — A 60% Geekhack community-driven project. +* [Happy Hacking Keyboard](/keyboards/hhkb) — The Happy Hacking keyboard can be hacked with a custom controller to run QMK. +* [Infinity 60%](/keyboards/infinity60) - — Compact community keyboard by Input Club. +* [JD45](/keyboards/jd45) — Another Geekhack community project, designed by jdcarpe. +* [KC60](/keyboards/kc60) — A programmable Chinese-made keyboard, lost in the mists of time. +* [Kinesis Advantage](/keyboards/kinesis) — Contoured ergonomic keyboard by Kinesis Computer Ergonomics. +* [The Kitten Paw](/keyboards/kitten_paw) — A replacement controller (2016 revision) for the Filco Majestouch by [Bathroom Epiphanies](https://github.com/BathroomEpiphanies). +* [Lets Split](/keyboards/lets_split) - Split ortholinear 40% keyboard. +* [Phantom](/keyboards/phantom) — A tenkeyless kit by Teel, also from Geekhack. +* [Retro Refit](/keyboards/retro_refit) — Another creation by IBNobody. +* [S60-x](/keyboards/s60-x) — DIY compact keyboard designed by VinnyCordeiro for Sentraq. +* [Satan](/keyboards/satan) — A GH60 variant. +* [SixKeyBoard](/keyboards/sixkeyboard) — A 6-key keyboard made by TechKeys. +* [TheVan 44](/keyboars/tv44) — A 44-key staggered keybard by Evangs. +* [Vision Division](/keyboards/vision_division) — Full Size / Split Linear Keyboard by IBNobody. -- cgit v1.2.3 From 42f1ce08dc09ff784add32750e55aa03e2427f5e Mon Sep 17 00:00:00 2001 From: Jack Henahan Date: Mon, 29 Aug 2016 11:35:07 -0400 Subject: jhenahan layout --- keyboards/planck/keymaps/jhenahan/Makefile | 25 +++ keyboards/planck/keymaps/jhenahan/config.h | 9 + keyboards/planck/keymaps/jhenahan/keymap.c | 314 ++++++++++++++++++++++++++++ keyboards/planck/keymaps/jhenahan/readme.md | 35 ++++ 4 files changed, 383 insertions(+) create mode 100644 keyboards/planck/keymaps/jhenahan/Makefile create mode 100644 keyboards/planck/keymaps/jhenahan/config.h create mode 100644 keyboards/planck/keymaps/jhenahan/keymap.c create mode 100644 keyboards/planck/keymaps/jhenahan/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/jhenahan/Makefile b/keyboards/planck/keymaps/jhenahan/Makefile new file mode 100644 index 000000000..de01ad240 --- /dev/null +++ b/keyboards/planck/keymaps/jhenahan/Makefile @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/planck/keymaps/jhenahan/config.h b/keyboards/planck/keymaps/jhenahan/config.h new file mode 100644 index 000000000..cd3adc41c --- /dev/null +++ b/keyboards/planck/keymaps/jhenahan/config.h @@ -0,0 +1,9 @@ +#ifndef CONFIG_USER_H +#define CONFIG_USER_H + +#include "../../config.h" + +#define FORCE_NKRO +#define WORKMAN_SOUND COLEMAK_SOUND + +#endif diff --git a/keyboards/planck/keymaps/jhenahan/keymap.c b/keyboards/planck/keymaps/jhenahan/keymap.c new file mode 100644 index 000000000..2bda4b695 --- /dev/null +++ b/keyboards/planck/keymaps/jhenahan/keymap.c @@ -0,0 +1,314 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _WORKMAN 0 +#define _DEAD 1 +#define _QWERTY 2 +#define _LOWER 3 +#define _RAISE 4 +#define _PLOVER 5 +#define _ADJUST 16 + +enum planck_keycodes { + WORKMAN = SAFE_RANGE, + DEAD, + QWERTY, + LOWER, + RAISE, + PLOVER, + EXT_PLV, + TOG_PLV +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + + +/* Workman + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | D | R | W | B | J | F | U | P | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | H | T | G | Y | N | E | O | I | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | M | C | V | K | L | Dead | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_WORKMAN] = { + {KC_TAB, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, + {MT(MOD_LCTL,KC_ESC), KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_M, KC_C, KC_V, KC_K, KC_L, DEAD, KC_DOT, KC_SLSH, KC_ENT}, + {KC_LCTL, KC_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Workman Dead Layer + * ,-----------------------------------------------------------------------------------. + * | | % | & | ? | + | @ | $ | _ | [ | ] | ! | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | / | ( | = | 0 | { | } | 1 | * | ) | - | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | 6 | 7 | 8 | 9 | | | \ | 2 | 3 | 4 | 5 | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | < | ~ | ` | , | # | ^ | > | | | + * `-----------------------------------------------------------------------------------' + */ +[_DEAD] = { + {XXXXXXX, KC_PERC, KC_AMPR, KC_QUES, KC_PLUS, KC_AT, KC_DLR, KC_UNDS, KC_LBRC, KC_RBRC, KC_EXLM, XXXXXXX}, + {XXXXXXX, KC_SLSH, KC_LPRN, KC_EQL, KC_0, KC_LCBR, KC_RCBR, KC_1, KC_ASTR, KC_RPRN, KC_MINS, XXXXXXX}, + {XXXXXXX, KC_6, KC_7, KC_8, KC_9, KC_PIPE, KC_BSLS, KC_2, KC_3, KC_4, KC_5, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_LT, KC_TILD, KC_GRV, KC_COMM, KC_COMM, KC_HASH, KC_CIRC, KC_GT, XXXXXXX, XXXXXXX} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Ctrl | RAlt | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {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_RALT, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | Vol+ |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Prev | Next | Vol- | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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), _______, KC_VOLU, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, KC_MPRV, KC_MNXT, KC_VOLD, KC_MPLY} +}, + +/* Raise - KWM Interaction + * ,-----------------------------------------------------------------------------------. + * |Restrt| |TgSplt|Flotng|Parent|FlScrn|InsMrk| InsW | InsS | InsN | InsE | | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | Mark |Rotate|Prefix| Term | BSP |SwpMrk|SwapW |SwapS |SwapN |SwapE | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |MarkW |MarkS |MarkN |MarkE |Monocl|Float |FocusW|FocusS|FocusN|FocusE| | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {LCAG(KC_Q), XXXXXXX, LCAG(KC_S), LCAG(KC_W), LCAG(KC_D), LCAG(KC_F), LCTL(S(KC_X)), LCTL(S(KC_H)), LCTL(S(KC_J)), LCTL(S(KC_K)), LCTL(S(KC_L)), XXXXXXX}, + {XXXXXXX, LCAG(KC_M), LGUI(LCTL(KC_R)), LCAG(KC_DOT), LCAG(KC_T), LGUI(LCTL(KC_A)), LCTL(LALT(KC_M)), LCTL(LALT(KC_H)), LCTL(LALT(KC_J)), LCTL(LALT(KC_K)), LCTL(LALT(KC_L)), XXXXXXX}, + {_______, LCAG(KC_H), LCAG(KC_J), LCAG(KC_K), LCAG(KC_L), LGUI(LCTL(KC_S)), LGUI(LCTL(KC_D)), LGUI(LALT(KC_H)), LGUI(LALT(KC_J)), LGUI(LALT(KC_K)), LGUI(LALT(KC_L)), _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + +/* Plover layer (http://opensteno.org) + * ,-----------------------------------------------------------------------------------. + * | # | # | # | # | # | # | # | # | # | # | # | # | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | S | T | P | H | * | * | F | P | L | T | D | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * |TogOut| S | K | W | R | * | * | R | B | G | S | Z | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Exit | | | A | O | | E | U | | | | + * `-----------------------------------------------------------------------------------' + */ + +[_PLOVER] = { + {KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1, KC_1 }, + {XXXXXXX, KC_Q, KC_D, KC_R, KC_W, KC_B, KC_J, KC_F, KC_U, KC_P, KC_SCLN, KC_BSPC}, + {TOG_PLV, KC_A, KC_S, KC_H, KC_T, KC_G, KC_Y, KC_N, KC_E, KC_O, KC_I, KC_QUOT}, + {EXT_PLV, XXXXXXX, XXXXXXX, KC_M, KC_C, XXXXXXX, XXXXXXX, KC_L, KC_COMM, XXXXXXX, XXXXXXX, XXXXXXX} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Workmn|Plover| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, WORKMAN, PLOVER, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_workman[][2] = SONG(WORKMAN_SOUND); +float tone_plover[][2] = SONG(PLOVER_SOUND); +float tone_plover_gb[][2] = SONG(PLOVER_GOODBYE_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case WORKMAN: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_workman, false, 0); + #endif + persistant_default_layer_set(1UL<<_WORKMAN); + } + return false; + break; + case DEAD: + if (record->event.pressed) { + layer_on(_DEAD); + set_oneshot_layer(_DEAD, ONESHOT_START); + clear_oneshot_layer_state(ONESHOT_PRESSED); + } + return false; + break; + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case PLOVER: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + stop_all_notes(); + PLAY_NOTE_ARRAY(tone_plover, false, 0); + #endif + layer_off(_RAISE); + layer_off(_LOWER); + layer_off(_ADJUST); + layer_on(_PLOVER); + if (!eeconfig_is_enabled()) { + eeconfig_init(); + } + keymap_config.raw = eeconfig_read_keymap(); + keymap_config.nkro = 1; + eeconfig_update_keymap(keymap_config.raw); + } + return false; + break; + case EXT_PLV: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_plover_gb, false, 0); + #endif + layer_off(_PLOVER); + } + return false; + break; + case TOG_PLV: + if (record->event.pressed) { + register_code(KC_R); + register_code(KC_W); + register_code(KC_T); + register_code(KC_C); + register_code(KC_P); + register_code(KC_O); + clear_keyboard(); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/planck/keymaps/jhenahan/readme.md b/keyboards/planck/keymaps/jhenahan/readme.md new file mode 100644 index 000000000..1d803fe32 --- /dev/null +++ b/keyboards/planck/keymaps/jhenahan/readme.md @@ -0,0 +1,35 @@ +# jhenahan's layout + +## Layout + +The base layer is based on the +[Workman Dead](https://github.com/ojbucao/Workman/tree/master/mac) layout. The +primary interaction layer is a slightly modified Workman layout with a 'dead' +key on the third row under the middle finger. The dead key activates a layer of +special characters. + +## [Layers](http://www.keyboard-layout-editor.com/#/gists/2b875f7d5d76fe4408c0a5b3bd76ddae) +### Function Layer + +This is very slightly modified from the default, mainly just to rearrange the media keys. + +### [KWM](https://github.com/koekeishiya/kwm) Interaction Layer + +`kwm` is a tiling window manager for OS X. The keys defined in my keymap +correspond to the settings I use in +[my `kwmrc` file](https://github.com/jhenahan/dotfiles/blob/master/kwm/kwmrc). + +### QWERTY + +Just in case. + +### [Plover](http://www.openstenoproject.org/plover/) + +The Plover layer in this keymap is identical to that of the default. This layout +functions exactly as a QWERTY layout unless you're running the Plover +application. + +### Adjust Layer + +This layer is only slightly modified from the default to remove Dvorak and +Colemak and replace them with Workman. -- cgit v1.2.3 From 6d7637ae3eb4b37ab7d294818aa92ea9562df4b9 Mon Sep 17 00:00:00 2001 From: Jack Henahan Date: Mon, 29 Aug 2016 11:43:06 -0400 Subject: Update README --- keyboards/planck/keymaps/jhenahan/readme.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/jhenahan/readme.md b/keyboards/planck/keymaps/jhenahan/readme.md index 1d803fe32..a80506fc9 100644 --- a/keyboards/planck/keymaps/jhenahan/readme.md +++ b/keyboards/planck/keymaps/jhenahan/readme.md @@ -25,9 +25,15 @@ Just in case. ### [Plover](http://www.openstenoproject.org/plover/) -The Plover layer in this keymap is identical to that of the default. This layout -functions exactly as a QWERTY layout unless you're running the Plover -application. +This layout functions exactly as a Workman layout unless you're running the Plover +application. Includes a key for toggling Plover while it's running. + +Add this in the appropriate section of your `plover.cfg` to allow this altered layout: + +``` ini +[System: English Stenotype] +keymap[keyboard] = [["#", ["1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-", "="]], ["S-", ["q", "a"]], ["T-", ["d"]], ["K-", ["s"]], ["P-", ["r"]], ["W-", ["h"]], ["H-", ["w"]], ["R-", ["t"]], ["A-", ["m"]], ["O-", ["c"]], ["*", ["y", "g", "j", "b"]], ["-E", ["l"]], ["-U", [","]], ["-F", ["f"]], ["-R", ["n"]], ["-P", ["u"]], ["-B", ["e"]], ["-L", ["p"]], ["-G", ["o"]], ["-T", [";"]], ["-S", ["i"]], ["-D", ["BackSpace"]], ["-Z", ["'"]], ["no-op", ["\\", "]", "x", ".", "/"]], ["arpeggiate", ["space"]]] +``` ### Adjust Layer -- cgit v1.2.3 From 8b2a235c8de7123187e0aa1dd950947f20a51f07 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 1 Sep 2016 18:14:39 +0100 Subject: changed order of modifiers after experimentation, updated readme --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- keyboards/planck/keymaps/callum/readme.md | 15 +++++---------- 2 files changed, 7 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 494ed30b0..572756a38 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -38,14 +38,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------|------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | + * | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | * `-----------------------------------------------------------------------------------' */ [_BASE] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} + {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} }, /* MOVE diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 030def7f7..c7ad5d163 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,24 +2,19 @@ This is a layout for the grid planck, built with a few ideals in mind. These ideals are just my opinion mind! The great thing about *qmk* is that we can all afford to have different opinions about what makes a good layout: -- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided --- since they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. +- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — since they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), since otherwise certain long key combinations become hard to make. - Backspace should be in the “capslock position” as God intended. -- The keyboard should be usable without any firmware changes on any operating system. In my case that means it should work on *Windows* and *Linux* without any software modifications, while I can change the behaviour slightly on *macOS* in software since that’s my home OS. The images reflect the intended use on *macOS* **after** minor software tweaks; which will be noted. We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. ## The `BASE` layer -![](http://i.imgur.com/aEXOlWl.png) +![](http://i.imgur.com/tVNI3SE.png) This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. -The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneosly, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. - -The `ctrl`, `alt`, `cmd` cluster is asymmetric around the centre so that at least one of each of the modifiers can be reached with the thumbs. The intended use is to always hit the left `cmd` and the right `ctrl`, unless an awkward key combination dictates otherwise. - -In firmware `ctrl` and `cmd`/`GUI` are swapped with respect to the image above --- I swap them to the illustrated location when using *macOS* and leave them be for *Windows* and *Linux*. (so that `cmd-z,x,c,v,...` becomes `ctrl-z,x,c,v,...` saving me some confusion) +The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. ## The `MOVE` layer ![](http://i.imgur.com/KXRSuHT.png) @@ -40,9 +35,9 @@ The symbol layer has all the numbers and their usual corresponding symbols in th Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected. ## The `FUNC` layer -![](http://i.imgur.com/skxRZiH.png) +![](http://i.imgur.com/1VKFBBU.png) -The only thing of note here is that `bl+` and `bl-` are short for *backlight up* and *backlight down* respectively, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. +The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-cmd-power`.) ## Other changes from the default I have LEDs and sound disabled, simply because I have no need of them. \ No newline at end of file -- cgit v1.2.3 From 4c67ccc81ee8006190438c5f54cda871bcb2afa6 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 1 Sep 2016 18:30:49 +0100 Subject: changed some of the wording in the readme --- keyboards/planck/keymaps/callum/readme.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index c7ad5d163..2d38e6355 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -1,11 +1,11 @@ # callum’s planck layout -This is a layout for the grid planck, built with a few ideals in mind. These ideals are just my opinion mind! The great thing about *qmk* is that we can all afford to have different opinions about what makes a good layout: +This is a layout for the grid planck, built with a few ideals in mind: -- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — since they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. +- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. -- There should be two of every modifier (one on each side), since otherwise certain long key combinations become hard to make. -- Backspace should be in the “capslock position” as God intended. +- There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. +- Backspace should be in the “capslock position” in the colemak tradition. We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. -- cgit v1.2.3 From e4167c8c53b0cf7c68192bbe4db368785f24b970 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Fri, 2 Sep 2016 09:03:39 +0100 Subject: fixed incorrect key combination for locking screen on macOS --- keyboards/planck/keymaps/callum/keymap.c | 4 ++-- keyboards/planck/keymaps/callum/readme.md | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 572756a38..6c3431133 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -137,11 +137,11 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case LOCK: if (record->event.pressed) { register_code(KC_RSFT); - register_code(KC_RGUI); + register_code(KC_RCTL); register_code(KC_POWER); } else { unregister_code(KC_POWER); - unregister_code(KC_RGUI); + unregister_code(KC_RCTL); unregister_code(KC_RSFT); } return false; diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 2d38e6355..b70de3f1e 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -14,7 +14,7 @@ We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow c This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. -The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. +The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. ## The `MOVE` layer ![](http://i.imgur.com/KXRSuHT.png) @@ -37,7 +37,7 @@ Again none of the modifiers are overwritten so that shortcuts involving numbers ## The `FUNC` layer ![](http://i.imgur.com/1VKFBBU.png) -The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-cmd-power`.) +The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) ## Other changes from the default -I have LEDs and sound disabled, simply because I have no need of them. \ No newline at end of file +I have LEDs and sound disabled, simply because I have no need of them. -- cgit v1.2.3 From a485e13afeb06ae96616ef381b03ba213efc574c Mon Sep 17 00:00:00 2001 From: profet23 Date: Fri, 2 Sep 2016 16:16:06 -0400 Subject: Adding 80 Key Ergodox Support --- keyboards/ergodox80/Makefile | 5 + keyboards/ergodox80/config.h | 31 + keyboards/ergodox80/ergodox80.c | 0 keyboards/ergodox80/ergodox80.h | 5 + keyboards/ergodox80/ergodox80/190hotfix.sh | 19 + keyboards/ergodox80/ergodox80/Makefile | 3 + keyboards/ergodox80/ergodox80/config.h | 65 ++ keyboards/ergodox80/ergodox80/ergodox80.c | 85 +++ keyboards/ergodox80/ergodox80/ergodox80.h | 122 ++++ keyboards/ergodox80/ergodox80/i2cmaster.h | 178 ++++++ keyboards/ergodox80/ergodox80/matrix.c | 382 +++++++++++ keyboards/ergodox80/ergodox80/rules.mk | 76 +++ keyboards/ergodox80/ergodox80/twimaster.c | 208 ++++++ .../ergodox80/ergodox80/util/compile_keymap.py | 710 +++++++++++++++++++++ keyboards/ergodox80/ergodox80/util/readme.md | 3 + keyboards/ergodox80/keymaps/default/default.png | Bin 0 -> 193672 bytes .../ergodox80/keymaps/default/default_highres.png | Bin 0 -> 1459389 bytes keyboards/ergodox80/keymaps/default/keymap.c | 183 ++++++ keyboards/ergodox80/keymaps/default/readme.md | 10 + keyboards/ergodox80/readme.md | 165 +++++ keyboards/ergodox80/rules.mk | 28 + 21 files changed, 2278 insertions(+) create mode 100644 keyboards/ergodox80/Makefile create mode 100644 keyboards/ergodox80/config.h create mode 100644 keyboards/ergodox80/ergodox80.c create mode 100644 keyboards/ergodox80/ergodox80.h create mode 100755 keyboards/ergodox80/ergodox80/190hotfix.sh create mode 100644 keyboards/ergodox80/ergodox80/Makefile create mode 100644 keyboards/ergodox80/ergodox80/config.h create mode 100644 keyboards/ergodox80/ergodox80/ergodox80.c create mode 100644 keyboards/ergodox80/ergodox80/ergodox80.h create mode 100644 keyboards/ergodox80/ergodox80/i2cmaster.h create mode 100644 keyboards/ergodox80/ergodox80/matrix.c create mode 100644 keyboards/ergodox80/ergodox80/rules.mk create mode 100644 keyboards/ergodox80/ergodox80/twimaster.c create mode 100644 keyboards/ergodox80/ergodox80/util/compile_keymap.py create mode 100644 keyboards/ergodox80/ergodox80/util/readme.md create mode 100644 keyboards/ergodox80/keymaps/default/default.png create mode 100644 keyboards/ergodox80/keymaps/default/default_highres.png create mode 100644 keyboards/ergodox80/keymaps/default/keymap.c create mode 100644 keyboards/ergodox80/keymaps/default/readme.md create mode 100644 keyboards/ergodox80/readme.md create mode 100644 keyboards/ergodox80/rules.mk (limited to 'keyboards') diff --git a/keyboards/ergodox80/Makefile b/keyboards/ergodox80/Makefile new file mode 100644 index 000000000..94fa847ff --- /dev/null +++ b/keyboards/ergodox80/Makefile @@ -0,0 +1,5 @@ +SUBPROJECT_DEFAULT = ergodox80 + +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif diff --git a/keyboards/ergodox80/config.h b/keyboards/ergodox80/config.h new file mode 100644 index 000000000..5dd6daa15 --- /dev/null +++ b/keyboards/ergodox80/config.h @@ -0,0 +1,31 @@ +#ifndef KEYBOARDS_ERGODOX_CONFIG_H_ +#define KEYBOARDS_ERGODOX_CONFIG_H_ + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 + +#define TAPPING_TOGGLE 1 + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +#include "ergodox80/config.h" + + +#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80.c new file mode 100644 index 000000000..e69de29bb diff --git a/keyboards/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80.h new file mode 100644 index 000000000..ea40f4d45 --- /dev/null +++ b/keyboards/ergodox80/ergodox80.h @@ -0,0 +1,5 @@ +#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_ +#define KEYBOARDS_ERGODOX_ERGODOX_H_ +#include "ergodox80.h" + +#endif /* KEYBOARDS_ERGODOX_ERGODOX_H_ */ diff --git a/keyboards/ergodox80/ergodox80/190hotfix.sh b/keyboards/ergodox80/ergodox80/190hotfix.sh new file mode 100755 index 000000000..bdc3adce2 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/190hotfix.sh @@ -0,0 +1,19 @@ +#!/bin/bash +#a tool to fix broken keymaps as a result of pull request #190 +#changing the declaration of matrix_scan_user() and matrix_init_user() +# +#This script will save a copy of the specified keymap as keymap.c.bak +#and then create a new keymap.c with the definion corrected. +#this script must be run from the ergodox_ez directory +if [ $# -ne 1 ]; then + echo $0: usage: ./190hotfix keymap_name + exit 1 +fi + +echo Saving backup as ./keymaps/$1/keymap.c.bak ... +mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak + +echo Modifying ./keymaps/$1/keymap.c ... +cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c + +echo Complete! diff --git a/keyboards/ergodox80/ergodox80/Makefile b/keyboards/ergodox80/ergodox80/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/ergodox80/ergodox80/config.h b/keyboards/ergodox80/ergodox80/config.h new file mode 100644 index 000000000..084a044ee --- /dev/null +++ b/keyboards/ergodox80/ergodox80/config.h @@ -0,0 +1,65 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +#ifndef ERGODOX_EZ_CONFIG_H +#define ERGODOX_EZ_CONFIG_H + +#include "../config.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoDox EZ +#define PRODUCT ErgoDox EZ +#define DESCRIPTION QMK keyboard firmware for Ergodox EZ + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_COLS 6 + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 5 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE + +#endif diff --git a/keyboards/ergodox80/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80/ergodox80.c new file mode 100644 index 000000000..b21b1073b --- /dev/null +++ b/keyboards/ergodox80/ergodox80/ergodox80.c @@ -0,0 +1,85 @@ +#include "ergodox80.h" +#include "i2cmaster.h" + +bool i2c_initialized = 0; +uint8_t mcp23018_status = 0x20; + +void matrix_init_kb(void) { + // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") + TCCR1A = 0b10101001; // set and configure fast PWM + TCCR1B = 0b00001001; // set and configure fast PWM + + // (tied to Vcc for hardware convenience) + DDRB &= ~(1<<4); // set B(4) as input + PORTB &= ~(1<<4); // set B(4) internal pull-up disabled + + // unused pins - C7, D4, D5, D7, E6 + // set as input with internal pull-ip enabled + DDRC &= ~(1<<7); + DDRD &= ~(1<<7 | 1<<5 | 1<<4); + DDRE &= ~(1<<6); + PORTC |= (1<<7); + PORTD |= (1<<7 | 1<<5 | 1<<4); + PORTE |= (1<<6); + + ergodox_blink_all_leds(); + + matrix_init_user(); +} + +void ergodox_blink_all_leds(void) +{ + ergodox_led_all_off(); + ergodox_led_all_set(LED_BRIGHTNESS_HI); + ergodox_right_led_1_on(); + _delay_ms(50); + ergodox_right_led_2_on(); + _delay_ms(50); + ergodox_right_led_3_on(); + _delay_ms(50); + ergodox_right_led_1_off(); + _delay_ms(50); + ergodox_right_led_2_off(); + _delay_ms(50); + ergodox_right_led_3_off(); + //ergodox_led_all_on(); + //_delay_ms(333); + ergodox_led_all_off(); +} + +uint8_t init_mcp23018(void) { + mcp23018_status = 0x20; + + // I2C subsystem + if (i2c_initialized == 0) { + i2c_init(); // on pins D(1,0) + i2c_initialized++; + _delay_ms(1000); + } + + // set pin direction + // - unused : input : 1 + // - input : input : 1 + // - driving : output : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; + i2c_stop(); + + // set pull-up + // - unused : on : 1 + // - input : on : 1 + // - driving : off : 0 + mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; + mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; + +out: + i2c_stop(); + + return mcp23018_status; +} + + diff --git a/keyboards/ergodox80/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80/ergodox80.h new file mode 100644 index 000000000..8012b0a74 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/ergodox80.h @@ -0,0 +1,122 @@ +#ifndef ERGODOX_EZ_H +#define ERGODOX_EZ_H + +#include "quantum.h" +#include +#include +#include "i2cmaster.h" +#include + +#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) +#define CPU_16MHz 0x00 + +// I2C aliases and register addresses (see "mcp23018.md") +#define I2C_ADDR 0b0100000 +#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) +#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) +#define IODIRA 0x00 // i/o direction register +#define IODIRB 0x01 +#define GPPUA 0x0C // GPIO pull-up resistor register +#define GPPUB 0x0D +#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) +#define GPIOB 0x13 +#define OLATA 0x14 // output latch register +#define OLATB 0x15 + +extern uint8_t mcp23018_status; + +void init_ergodox(void); +void ergodox_blink_all_leds(void); +uint8_t init_mcp23018(void); +uint8_t ergodox_left_leds_update(void); + +#define LED_BRIGHTNESS_LO 15 +#define LED_BRIGHTNESS_HI 255 + + +inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } +inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } +inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } +inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } +inline void ergodox_right_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); } + +inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } +inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } +inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } +inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } +inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); } + +inline void ergodox_led_all_on(void) +{ + ergodox_board_led_on(); + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + ergodox_right_led_3_on(); +} + +inline void ergodox_led_all_off(void) +{ + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +} + +inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } +inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } +inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } +inline void ergodox_right_led_set(uint8_t led, uint8_t n) { + (led == 1) ? (OCR1A = n) : + (led == 2) ? (OCR1B = n) : + (OCR1C = n); +} + +inline void ergodox_led_all_set(uint8_t n) +{ + ergodox_right_led_1_set(n); + ergodox_right_led_2_set(n); + ergodox_right_led_3_set(n); +} + +#define KEYMAP( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k45,k46,k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59,k47,k48, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k10, k20, k30, k40, KC_NO }, \ + { k01, k11, k21, k31, k41, k51 }, \ + { k02, k12, k22, k32, k42, k52 }, \ + { k03, k13, k23, k33, k43, k53 }, \ + { k04, k14, k24, k34, k44, k54 }, \ + { k05, k15, k25, k35, k45, k55 }, \ + { k06, k16, KC_NO, k36, k46, k56 }, \ + \ + { k07, k17, KC_NO, k37, k47, k57 }, \ + { k08, k18, k28, k38, k48, k58 }, \ + { k09, k19, k29, k39, k49, k59 }, \ + { k0A, k1A, k2A, k3A, k4A, k5A }, \ + { k0B, k1B, k2B, k3B, k4B, k5B }, \ + { k0C, k1C, k2C, k3C, k4C, k5C }, \ + { k0D, k1D, k2D, k3D, k4D, KC_NO } \ + } + +#endif diff --git a/keyboards/ergodox80/ergodox80/i2cmaster.h b/keyboards/ergodox80/ergodox80/i2cmaster.h new file mode 100644 index 000000000..3917b9e6c --- /dev/null +++ b/keyboards/ergodox80/ergodox80/i2cmaster.h @@ -0,0 +1,178 @@ +#ifndef _I2CMASTER_H +#define _I2CMASTER_H 1 +/************************************************************************* +* Title: C include file for the I2C master interface +* (i2cmaster.S or twimaster.c) +* Author: Peter Fleury http://jump.to/fleury +* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device +* Usage: see Doxygen manual +**************************************************************************/ + +#ifdef DOXYGEN +/** + @defgroup pfleury_ic2master I2C Master library + @code #include @endcode + + @brief I2C (TWI) Master Software Library + + Basic routines for communicating with I2C slave devices. This single master + implementation is limited to one bus master on the I2C bus. + + This I2c library is implemented as a compact assembler software implementation of the I2C protocol + which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). + Since the API for these two implementations is exactly the same, an application can be linked either against the + software I2C implementation or the hardware I2C implementation. + + Use 4.7k pull-up resistor on the SDA and SCL pin. + + Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module + i2cmaster.S to your target when using the software I2C implementation ! + + Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. + + @note + The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted + to GNU assembler and AVR-GCC C call interface. + Replaced the incorrect quarter period delays found in AVR300 with + half period delays. + + @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury + + @par API Usage Example + The following code shows typical usage of this library, see example test_i2cmaster.c + + @code + + #include + + + #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet + + int main(void) + { + unsigned char ret; + + i2c_init(); // initialize I2C library + + // write 0x75 to EEPROM address 5 (Byte Write) + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + i2c_write(0x05); // write address = 5 + i2c_write(0x75); // write value 0x75 to EEPROM + i2c_stop(); // set stop conditon = release bus + + + // read previously written value back from EEPROM address 5 + i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode + + i2c_write(0x05); // write address = 5 + i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode + + ret = i2c_readNak(); // read one byte from EEPROM + i2c_stop(); + + for(;;); + } + @endcode + +*/ +#endif /* DOXYGEN */ + +/**@{*/ + +#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 +#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" +#endif + +#include + +/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_READ 1 + +/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ +#define I2C_WRITE 0 + + +/** + @brief initialize the I2C master interace. Need to be called only once + @param void + @return none + */ +extern void i2c_init(void); + + +/** + @brief Terminates the data transfer and releases the I2C bus + @param void + @return none + */ +extern void i2c_stop(void); + + +/** + @brief Issues a start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_start(unsigned char addr); + + +/** + @brief Issues a repeated start condition and sends address and transfer direction + + @param addr address and transfer direction of I2C device + @retval 0 device accessible + @retval 1 failed to access device + */ +extern unsigned char i2c_rep_start(unsigned char addr); + + +/** + @brief Issues a start condition and sends address and transfer direction + + If device is busy, use ack polling to wait until device ready + @param addr address and transfer direction of I2C device + @return none + */ +extern void i2c_start_wait(unsigned char addr); + + +/** + @brief Send one byte to I2C device + @param data byte to be transfered + @retval 0 write successful + @retval 1 write failed + */ +extern unsigned char i2c_write(unsigned char data); + + +/** + @brief read one byte from the I2C device, request more data from device + @return byte read from I2C device + */ +extern unsigned char i2c_readAck(void); + +/** + @brief read one byte from the I2C device, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_readNak(void); + +/** + @brief read one byte from the I2C device + + Implemented as a macro, which calls either i2c_readAck or i2c_readNak + + @param ack 1 send ack, request more data from device
+ 0 send nak, read is followed by a stop condition + @return byte read from I2C device + */ +extern unsigned char i2c_read(unsigned char ack); +#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); + + +/**@}*/ +#endif diff --git a/keyboards/ergodox80/ergodox80/matrix.c b/keyboards/ergodox80/ergodox80/matrix.c new file mode 100644 index 000000000..c352924b5 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/matrix.c @@ -0,0 +1,382 @@ +/* + +Note for ErgoDox EZ customizers: Here be dragons! +This is not a file you want to be messing with. +All of the interesting stuff for you is under keymaps/ :) +Love, Erez + +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +/* + * scan matrix + */ +#include +#include +#include +#include "wait.h" +#include "action_layer.h" +#include "print.h" +#include "debug.h" +#include "util.h" +#include "matrix.h" +#include "ergodox80.h" +#include "i2cmaster.h" +#ifdef DEBUG_MATRIX_SCAN_RATE +#include "timer.h" +#endif + +/* + * This constant define not debouncing time in msecs, but amount of matrix + * scan loops which should be made to get stable debounced results. + * + * On Ergodox matrix scan rate is relatively low, because of slow I2C. + * Now it's only 317 scans/second, or about 3.15 msec/scan. + * According to Cherry specs, debouncing time is 5 msec. + * + * And so, there is no sense to have DEBOUNCE higher than 2. + */ + +#ifndef DEBOUNCE +# define DEBOUNCE 5 +#endif +static uint8_t debouncing = DEBOUNCE; + +/* matrix state(1:on, 0:off) */ +static matrix_row_t matrix[MATRIX_ROWS]; +static matrix_row_t matrix_debouncing[MATRIX_ROWS]; + +static matrix_row_t read_cols(uint8_t row); +static void init_cols(void); +static void unselect_rows(void); +static void select_row(uint8_t row); + +static uint8_t mcp23018_reset_loop; + +#ifdef DEBUG_MATRIX_SCAN_RATE +uint32_t matrix_timer; +uint32_t matrix_scan_count; +#endif + + +__attribute__ ((weak)) +void matrix_init_user(void) {} + +__attribute__ ((weak)) +void matrix_scan_user(void) {} + +__attribute__ ((weak)) +void matrix_init_kb(void) { + matrix_init_user(); +} + +__attribute__ ((weak)) +void matrix_scan_kb(void) { + matrix_scan_user(); +} + +inline +uint8_t matrix_rows(void) +{ + return MATRIX_ROWS; +} + +inline +uint8_t matrix_cols(void) +{ + return MATRIX_COLS; +} + +void matrix_init(void) +{ + // initialize row and col + + mcp23018_status = init_mcp23018(); + + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + + matrix_init_kb(); + +} + +void matrix_power_up(void) { + mcp23018_status = init_mcp23018(); + + unselect_rows(); + init_cols(); + + // initialize matrix state: all keys off + for (uint8_t i=0; i < MATRIX_ROWS; i++) { + matrix[i] = 0; + matrix_debouncing[i] = 0; + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_timer = timer_read32(); + matrix_scan_count = 0; +#endif + +} + +uint8_t matrix_scan(void) +{ + if (mcp23018_status) { // if there was an error + if (++mcp23018_reset_loop == 0) { + // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans + // this will be approx bit more frequent than once per second + print("trying to reset mcp23018\n"); + mcp23018_status = init_mcp23018(); + if (mcp23018_status) { + print("left side not responding\n"); + } else { + print("left side attached\n"); + ergodox_blink_all_leds(); + } + } + } + +#ifdef DEBUG_MATRIX_SCAN_RATE + matrix_scan_count++; + + uint32_t timer_now = timer_read32(); + if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { + print("matrix scan frequency: "); + pdec(matrix_scan_count); + print("\n"); + + matrix_timer = timer_now; + matrix_scan_count = 0; + } +#endif + + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + select_row(i); + wait_us(30); // without this wait read unstable value. + matrix_row_t cols = read_cols(i); + if (matrix_debouncing[i] != cols) { + matrix_debouncing[i] = cols; + if (debouncing) { + debug("bounce!: "); debug_hex(debouncing); debug("\n"); + } + debouncing = DEBOUNCE; + } + unselect_rows(); + } + + if (debouncing) { + if (--debouncing) { + wait_us(1); + // this should be wait_ms(1) but has been left as-is at EZ's request + } else { + for (uint8_t i = 0; i < MATRIX_ROWS; i++) { + matrix[i] = matrix_debouncing[i]; + } + } + } + + matrix_scan_quantum(); + + return 1; +} + +bool matrix_is_modified(void) +{ + if (debouncing) return false; + return true; +} + +inline +bool matrix_is_on(uint8_t row, uint8_t col) +{ + return (matrix[row] & ((matrix_row_t)1< http://jump.to/fleury +* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ +* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 +* Target: any AVR device with hardware TWI +* Usage: API compatible with I2C Software Library i2cmaster.h +**************************************************************************/ +#include +#include + +#include + + +/* define CPU frequency in Mhz here if not defined in Makefile */ +#ifndef F_CPU +#define F_CPU 16000000UL +#endif + +/* I2C clock in Hz */ +#define SCL_CLOCK 400000L + + +/************************************************************************* + Initialization of the I2C bus interface. Need to be called only once +*************************************************************************/ +void i2c_init(void) +{ + /* initialize TWI clock + * minimal values in Bit Rate Register (TWBR) and minimal Prescaler + * bits in the TWI Status Register should give us maximal possible + * I2C bus speed - about 444 kHz + * + * for more details, see 20.5.2 in ATmega16/32 secification + */ + + TWSR = 0; /* no prescaler */ + TWBR = 10; /* must be >= 10 for stable operation */ + +}/* i2c_init */ + + +/************************************************************************* + Issues a start condition and sends address and transfer direction. + return 0 = device accessible, 1= failed to access device +*************************************************************************/ +unsigned char i2c_start(unsigned char address) +{ + uint8_t twst; + + // send START condition + TWCR = (1<= 0: + if section['name'] == 'layout_config': + config.update(loads("\n".join( + section['code_lines'] + ))) + elif section['sub_name'].startswith('layer'): + layer_name = section['sub_name'] + config['layer_lines'][layer_name] = section['code_lines'] + + reset_section() + + def amend_section(line_index, line): + section['end_line'] = line_index + section['code_lines'].append(line) + + config = DEFAULT_CONFIG.copy() + config.update({ + 'layer_lines': collections.OrderedDict(), + 'macro_ids': {'UM'}, + 'unicode_macros': {}, + }) + + section = {} + reset_section() + + with io.open(path, encoding="utf-8") as fh: + for i, line in enumerate(fh): + if line.startswith("#"): + start_section(i, line) + elif line.startswith(" "): + amend_section(i, line[4:]) + else: + # TODO: maybe parse description + pass + + end_section() + assert 'layout' in config + return config + +# header file parsing + +IF0_RE = re.compile(r""" + ^ + #if 0 + $.*? + #endif +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +COMMENT_RE = re.compile(r""" + /\* + .*? + \*/" +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +def read_header_file(path): + with io.open(path, encoding="utf-8") as fh: + data = fh.read() + data, _ = COMMENT_RE.subn("", data) + data, _ = IF0_RE.subn("", data) + return data + + +def regex_partial(re_str_fmt, flags): + def partial(*args, **kwargs): + re_str = re_str_fmt.format(*args, **kwargs) + return re.compile(re_str, flags) + return partial + + +KEYDEF_REP = regex_partial(r""" + #define + \s + ( + (?:{}) # the prefixes + (?:\w+) # the key name + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +ENUM_RE = re.compile(r""" + ( + enum + \s\w+\s + \{ + .*? # the enum content + \} + ; + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +ENUM_KEY_REP = regex_partial(r""" + ( + {} # the prefixes + \w+ # the key name + ) # capture group end +""", re.MULTILINE | re.DOTALL | re.VERBOSE) + + +def parse_keydefs(config, data): + prefix_options = "|".join(config['key_prefixes']) + keydef_re = KEYDEF_REP(prefix_options) + enum_key_re = ENUM_KEY_REP(prefix_options) + for match in keydef_re.finditer(data): + yield match.groups()[0] + + for enum_match in ENUM_RE.finditer(data): + enum = enum_match.groups()[0] + for key_match in enum_key_re.finditer(enum): + yield key_match.groups()[0] + + +def parse_valid_keys(config, out_path): + basepath = os.path.abspath(os.path.join(os.path.dirname(out_path))) + dirpaths = [] + subpaths = [] + while len(subpaths) < 6: + path = os.path.join(basepath, *subpaths) + dirpaths.append(path) + dirpaths.append(os.path.join(path, "tmk_core", "common")) + dirpaths.append(os.path.join(path, "quantum")) + subpaths.append('..') + + includes = set(config['keymaps_includes']) + includes.add("keycode.h") + + valid_keycodes = set() + for dirpath, include in it.product(dirpaths, includes): + include_path = os.path.join(dirpath, include) + if os.path.exists(include_path): + header_data = read_header_file(include_path) + valid_keycodes.update( + parse_keydefs(config, header_data) + ) + return valid_keycodes + + +# Keymap Parsing + +def iter_raw_codes(layer_lines, filler, separator): + filler_re = re.compile("[" + filler + " ]") + for line in layer_lines: + line, _ = filler_re.subn("", line.strip()) + if not line: + continue + codes = line.split(separator) + for code in codes[1:-1]: + yield code + + +def iter_indexed_codes(raw_codes, key_indexes): + key_rows = {} + key_indexes_flat = [] + + for row_index, key_indexes in enumerate(key_indexes): + for key_index in key_indexes: + key_rows[key_index] = row_index + key_indexes_flat.extend(key_indexes) + assert len(raw_codes) == len(key_indexes_flat) + for raw_code, key_index in zip(raw_codes, key_indexes_flat): + # we keep track of the row mostly for layout purposes + yield raw_code, key_index, key_rows[key_index] + + +LAYER_CHANGE_RE = re.compile(r""" + (DF|TG|MO)\(\d+\) +""", re.VERBOSE) + + +MACRO_RE = re.compile(r""" + M\(\w+\) +""", re.VERBOSE) + + +UNICODE_RE = re.compile(r""" + U[0-9A-F]{4} +""", re.VERBOSE) + + +NON_CODE = re.compile(r""" + ^[^A-Z0-9_]$ +""", re.VERBOSE) + + +def parse_uni_code(raw_code): + macro_id = "UC_" + ( + unicodedata.name(raw_code) + .replace(" ", "_") + .replace("-", "_") + ) + code = "M({})".format(macro_id) + uc_hex = "{:04X}".format(ord(raw_code)) + return code, macro_id, uc_hex + + +def parse_key_code(raw_code, key_prefixes, valid_keycodes): + if raw_code in valid_keycodes: + return raw_code + + for prefix in key_prefixes: + code = prefix + raw_code + if code in valid_keycodes: + return code + + +def parse_code(raw_code, key_prefixes, valid_keycodes): + if not raw_code: + return 'KC_TRNS', None, None + + if LAYER_CHANGE_RE.match(raw_code): + return raw_code, None, None + + if MACRO_RE.match(raw_code): + macro_id = raw_code[2:-1] + return raw_code, macro_id, None + + if UNICODE_RE.match(raw_code): + hex_code = raw_code[1:] + return parse_uni_code(chr(int(hex_code, 16))) + + if NON_CODE.match(raw_code): + return parse_uni_code(raw_code) + + code = parse_key_code(raw_code, key_prefixes, valid_keycodes) + return code, None, None + + +def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): + keymap = {} + raw_codes = list(iter_raw_codes( + layer_lines, config['filler'], config['separator'] + )) + indexed_codes = iter_indexed_codes(raw_codes, key_indexes) + key_prefixes = config['key_prefixes'] + for raw_code, key_index, row_index in indexed_codes: + code, macro_id, uc_hex = parse_code( + raw_code, key_prefixes, valid_keycodes + ) + # TODO: line numbers for invalid codes + err_msg = "Could not parse key '{}' on row {}".format( + raw_code, row_index + ) + assert code is not None, err_msg + # print(repr(raw_code), repr(code), macro_id, uc_hex) + if macro_id: + config['macro_ids'].add(macro_id) + if uc_hex: + config['unicode_macros'][macro_id] = uc_hex + keymap[key_index] = (code, row_index) + return keymap + + +def parse_keymaps(config, valid_keycodes): + keymaps = collections.OrderedDict() + key_indexes = config.get( + 'key_indexes', KEYBOARD_LAYOUTS[config['layout']] + ) + # TODO: maybe validate key_indexes + + for layer_name, layer_lines, in config['layer_lines'].items(): + keymaps[layer_name] = parse_keymap( + config, key_indexes, layer_lines, valid_keycodes + ) + return keymaps + +# keymap.c output + +USERCODE = """ +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + case L1: + ergodox_right_led_1_on(); + break; + case L2: + ergodox_right_led_2_on(); + break; + case L3: + ergodox_right_led_3_on(); + break; + case L4: + ergodox_right_led_1_on(); + ergodox_right_led_2_on(); + break; + case L5: + ergodox_right_led_1_on(); + ergodox_right_led_3_on(); + break; + // case L6: + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + // case L7: + // ergodox_right_led_1_on(); + // ergodox_right_led_2_on(); + // ergodox_right_led_3_on(); + // break; + default: + ergodox_board_led_off(); + break; + } +}; +""" + +MACROCODE = """ +#define UC_MODE_WIN 0 +#define UC_MODE_LINUX 1 +#define UC_MODE_OSX 2 + +// TODO: allow default mode to be configured +static uint16_t unicode_mode = UC_MODE_WIN; + +uint16_t hextokeycode(uint8_t hex) {{ + if (hex == 0x0) {{ + return KC_P0; + }} + if (hex < 0xA) {{ + return KC_P1 + (hex - 0x1); + }} + return KC_A + (hex - 0xA); +}} + +void unicode_action_function(uint16_t hi, uint16_t lo) {{ + switch (unicode_mode) {{ + case UC_MODE_WIN: + register_code(KC_LALT); + + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LALT); + break; + case UC_MODE_LINUX: + register_code(KC_LCTL); + register_code(KC_LSFT); + + register_code(KC_U); + unregister_code(KC_U); + + register_code(hextokeycode((hi & 0xF0) >> 4)); + unregister_code(hextokeycode((hi & 0xF0) >> 4)); + register_code(hextokeycode((hi & 0x0F))); + unregister_code(hextokeycode((hi & 0x0F))); + register_code(hextokeycode((lo & 0xF0) >> 4)); + unregister_code(hextokeycode((lo & 0xF0) >> 4)); + register_code(hextokeycode((lo & 0x0F))); + unregister_code(hextokeycode((lo & 0x0F))); + + unregister_code(KC_LCTL); + unregister_code(KC_LSFT); + break; + case UC_MODE_OSX: + break; + }} +}} + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{ + if (!record->event.pressed) {{ + return MACRO_NONE; + }} + // MACRODOWN only works in this function + switch(id) {{ + case UM: + unicode_mode = (unicode_mode + 1) % 2; + break; +{macro_cases} +{unicode_macro_cases} + default: + break; + }} + return MACRO_NONE; +}}; +""" + + +UNICODE_MACRO_TEMPLATE = """ +case {macro_id}: + unicode_action_function(0x{hi:02x}, 0x{lo:02x}); + break; +""".strip() + + +def unicode_macro_cases(config): + for macro_id, uc_hex in config['unicode_macros'].items(): + hi = int(uc_hex, 16) >> 8 + lo = int(uc_hex, 16) & 0xFF + unimacro_keys = ", ".join( + "T({})".format( + "KP_" + digit if digit.isdigit() else digit + ) for digit in uc_hex + ) + yield UNICODE_MACRO_TEMPLATE.format( + macro_id=macro_id, hi=hi, lo=lo + ) + + +def iter_keymap_lines(keymap, row_indents=None): + col_widths = {} + col = 0 + # first pass, figure out the column widths + prev_row_index = None + for code, row_index in keymap.values(): + if row_index != prev_row_index: + col = 0 + if row_indents: + col = row_indents[row_index] + col_widths[col] = max(len(code), col_widths.get(col, 0)) + prev_row_index = row_index + col += 1 + + # second pass, yield the cell values + col = 0 + prev_row_index = None + for key_index in sorted(keymap): + code, row_index = keymap[key_index] + if row_index != prev_row_index: + col = 0 + yield "\n" + if row_indents: + for indent_col in range(row_indents[row_index]): + pad = " " * (col_widths[indent_col] - 4) + yield (" /*-*/" + pad) + col = row_indents[row_index] + else: + yield pad + yield " {}".format(code) + if key_index < len(keymap) - 1: + yield "," + # This will be yielded on the next iteration when + # we know that we're not at the end of a line. + pad = " " * (col_widths[col] - len(code)) + prev_row_index = row_index + col += 1 + + +def iter_keymap_parts(config, keymaps): + # includes + for include_path in config['keymaps_includes']: + yield '#include "{}"\n'.format(include_path) + + yield "\n" + + # definitions + for i, macro_id in enumerate(sorted(config['macro_ids'])): + yield "#define {} {}\n".format(macro_id, i) + + yield "\n" + + for i, layer_name in enumerate(config['layer_lines']): + yield '#define L{0:<3} {0:<5} // {1}\n'.format(i, layer_name) + + yield "\n" + + # keymaps + yield "const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n" + + for i, layer_name in enumerate(config['layer_lines']): + # comment + layer_lines = config['layer_lines'][layer_name] + prefixed_lines = " * " + " * ".join(layer_lines) + yield "/*\n{} */\n".format(prefixed_lines) + + # keymap codes + keymap = keymaps[layer_name] + row_indents = ROW_INDENTS.get(config['layout']) + keymap_lines = "".join(iter_keymap_lines(keymap, row_indents)) + yield "[L{0}] = KEYMAP({1}\n),\n".format(i, keymap_lines) + + yield "};\n\n" + + # no idea what this is for + yield "const uint16_t PROGMEM fn_actions[] = {};\n" + + # macros + yield MACROCODE.format( + macro_cases="", + unicode_macro_cases="\n".join(unicode_macro_cases(config)), + ) + + # TODO: dynamically create blinking lights + yield USERCODE + + +def main(argv=sys.argv[1:]): + if not argv or '-h' in argv or '--help' in argv: + print(__doc__) + return 0 + + in_path = os.path.abspath(argv[0]) + if not os.path.exists(in_path): + print("No such file '{}'".format(in_path)) + return 1 + + if len(argv) > 1: + out_path = os.path.abspath(argv[1]) + else: + dirname = os.path.dirname(in_path) + out_path = os.path.join(dirname, "keymap.c") + + config = parse_config(in_path) + valid_keys = parse_valid_keys(config, out_path) + keymaps = parse_keymaps(config, valid_keys) + + with io.open(out_path, mode="w", encoding="utf-8") as fh: + for part in iter_keymap_parts(config, keymaps): + fh.write(part) + + +if __name__ == '__main__': + sys.exit(main()) diff --git a/keyboards/ergodox80/ergodox80/util/readme.md b/keyboards/ergodox80/ergodox80/util/readme.md new file mode 100644 index 000000000..26c5e5d99 --- /dev/null +++ b/keyboards/ergodox80/ergodox80/util/readme.md @@ -0,0 +1,3 @@ +# ErgoDox EZ Utilities + +The Python script in this directory, by [mbarkhau](https://github.com/mbarkhau) allows you to write out a basic ErgoDox EZ keymap using Markdown notation, and then transpile it to C, which you can then compile. It's experimental, but if you're not comfortable using C, it's a nice option. diff --git a/keyboards/ergodox80/keymaps/default/default.png b/keyboards/ergodox80/keymaps/default/default.png new file mode 100644 index 000000000..6575f7b5e Binary files /dev/null and b/keyboards/ergodox80/keymaps/default/default.png differ diff --git a/keyboards/ergodox80/keymaps/default/default_highres.png b/keyboards/ergodox80/keymaps/default/default_highres.png new file mode 100644 index 000000000..7d9f045f4 Binary files /dev/null and b/keyboards/ergodox80/keymaps/default/default_highres.png differ diff --git a/keyboards/ergodox80/keymaps/default/keymap.c b/keyboards/ergodox80/keymaps/default/keymap.c new file mode 100644 index 000000000..2da2c5b0e --- /dev/null +++ b/keyboards/ergodox80/keymaps/default/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox80.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | 1 | 2 | Home | | PgUp | 3 | 4 | + * |------|------|------| |------|--------|------| + * | Space| BkSp | End | | PgDn | Tab |Enter | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_1, KC_2, KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP,KC_3, KC_4, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,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, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+----------. + * | | | | | | | | + * |------|------|------| |------|------|----------| + * | | | | | | |BrwserBack| + * `--------------------' `------------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +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) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox80/keymaps/default/readme.md b/keyboards/ergodox80/keymaps/default/readme.md new file mode 100644 index 000000000..8f6dba45e --- /dev/null +++ b/keyboards/ergodox80/keymaps/default/readme.md @@ -0,0 +1,10 @@ +# ErgoDox EZ Default Configuration + +## Changelog + +* Feb 2, 2016 (V1.1): + * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). + +This is what we ship with out of the factory. :) The image says it all: + +![Default](default_highres.png) diff --git a/keyboards/ergodox80/readme.md b/keyboards/ergodox80/readme.md new file mode 100644 index 000000000..3bbe98fd6 --- /dev/null +++ b/keyboards/ergodox80/readme.md @@ -0,0 +1,165 @@ +# The Easy Way + +If you can find firmware someone else has made that does what you want, that +is the easiest way to customize your ErgoDox. It requires no programming +experience or the setup of a build environment. + +Quickstart: + + - Find and download an existing firmware + [from Other Firmware Options](#other-firmware-options) + + - Then flash the firmware to your [ErgoDox Ez](#ergodox-ez) + or [ErgoDox Infinity](#ergodox-infinity) + +# Customizing Keymaps + +There are many existing keymaps in the "keymaps" directory. If you just want +to use one of them, you don't need to modify keymaps and can just build and +flash the firmware as described below. These directories each have a +"readme.md" file which describe them. + +If none of the existing keymaps suit you, you can create your own custom +keymap. This will require some experience with coding. Follow these steps +to customize a keymap: + + - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) + + - Clone the qmk_firmware repository + + - Set up your build environment (see below). + + - Make a new directory under "keymaps" to hold your customizations. + + - Copy an existing keymap that is close to what you want, such as + "keymaps/default/keymap.c". + + - Use an editor to modify the new "keymap.c". See "Finding the keycodes you + need" below). Try to edit the comments as well, so the "text graphics" + represent your layout correctly. + + - Compile your new firmware (see below) + + - Flash your firmware (see below) + + - Test the changes. + + - Submit your keymap as a pull request to the qmk_firmware repository so + others can use it. You will want to add a "readme.md" that describes the + keymap. + +# Build Dependencies + +Before you can build, you will need the build dependencies. There is a script +to try to do this for Linux: + + - Run the `util/install_dependencies.sh` script as root. + +For the Infinity, you need the chibios submodules to be checked out or you +will receive errors about the build process being unable to find the chibios +files. Check them out with: + + - Go to the top level repo directory and run: `git submodule update --init --recursive` + +# Flashing Firmware + +## ErgoDox Ez + +The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). + +Linux users need to modify udev rules as described on the Teensy Linux page. +Some distributions provide a binary, maybe called `teensy-loader-cli`). + +To flash the firmware: + + - Build the firmware with `make keymapname`, for example `make default` + - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. + `ergodox_ez_default.hex` + + - Start the teensy loader. + + - Load the .hex file into it. + + - Press the Reset button by inserting a paperclip gently into the reset hole + in the top right corder. + + - Click the button in the Teensy app to download the firmware. + +## ErgoDox Infinity + +The Infinity is two completely independent keyboards, and needs to be flashed +for the left and right halves seperately. To flash them: + + - Build the firmware with `make infinity-keymapname` + + - Plug in the left hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make infinity-keymapname-dfu-util` + + - Build left hand firmware with `make infinity-keymapname MASTER=right` + + - Plug in the right hand keyboard only. + + - Press the program button (back of keyboard, above thumb pad). + + - Install the firmware with `sudo make infinity-keymapname-dfu-util MASTER=right` + +More information on the Infinity firmware is available in the [TMK/chibios for +Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) + +### Infinity Master/Two Halves + +The Infinity is two completely independent keyboards, that can connect together. +You have a few options in how you flash the firmware: + +- Flash the left half, rebuild the firmware with "MASTER=right" and then flash + the right half. This allows you to plug in either half directly to the + computer and is what the above instructions do. + +- Flash the left half, then flash the same firmware on the right. This only + works when the left half is plugged directly to the computer and the keymap + is mirrored. It saves the small extra step of rebuilding with + "MASTER=right". + +- The same as the previous one but with "MASTER=right" when you build the + firmware, then flash the same firmware to both halves. You just have to + directly connect the right half to the computer. + +- For minor changes such as changing only the keymap without having updated + any part of the firmware code itself, you can program only the MASTER half. + It is safest to program both halves though. + +# Contributing your keymap + +The QMK firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed dozens of user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. + +1. All work goes inside your keymap subdirectory (`keymaps/german` in this example). +2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did. +3. `readme.md` - a readme file, which GitHub would display by default when people go to your directory. Explain what's different about your keymap, what you tweaked or how it works. No specific format to follow, just communicate what you did. :) +4. Any graphics you wish to add. This is absolutely not a must. If you feel like it, you can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to make something and grab a screenshot, but it's really not a must. If you do have graphics, your readme can just embed the graphic as a link, just like I did with the default layout. + +# Finding the keycodes you need + +Let's say you want a certain key in your layout to send a colon; to figure out what keycode to use to make it do that, you're going to need `quantum/keymap_common.h`. + +That file contains a big list of all of the special, fancy keys (like, being able to send % on its own and whatnot). + +If you want to send a plain vanilla key, you can look up its code under `doc/keycode.txt`. That's where all the boring keys hang out. + +# Other Firmware Options + +There are external tools for customizing the layout, but those do not use +the featurs of this qmk firmware. These sites include: + + - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for Ez + - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files + +You can also find an existing firmware that you like, for example from: + + - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) + +This qmk firmware also provides the ability to customize keymaps, but requires +a toolchain to build the firmware. See below for instructions on building +firmware and customizing keymaps. diff --git a/keyboards/ergodox80/rules.mk b/keyboards/ergodox80/rules.mk new file mode 100644 index 000000000..ac63d4eff --- /dev/null +++ b/keyboards/ergodox80/rules.mk @@ -0,0 +1,28 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make = Make software. +# +# make clean = Clean out built project files. +# +# That's pretty much all you need. To compile, always go make clean, +# followed by make. +# +# For advanced users only: +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +#---------------------------------------------------------------------------- +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= no # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ +SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +MIDI_ENABLE ?= no # MIDI controls +UNICODE_ENABLE ?= yes # Unicode -- cgit v1.2.3 From 36e16b46e37b3bcc1753ff0a2006179f0dd005e7 Mon Sep 17 00:00:00 2001 From: profet23 Date: Fri, 2 Sep 2016 17:18:39 -0400 Subject: Removing/editing non applicable readme --- keyboards/ergodox80/keymaps/default/default.png | Bin 193672 -> 0 bytes .../ergodox80/keymaps/default/default_highres.png | Bin 1459389 -> 0 bytes keyboards/ergodox80/keymaps/default/readme.md | 10 -- keyboards/ergodox80/readme.md | 163 +-------------------- 4 files changed, 2 insertions(+), 171 deletions(-) delete mode 100644 keyboards/ergodox80/keymaps/default/default.png delete mode 100644 keyboards/ergodox80/keymaps/default/default_highres.png delete mode 100644 keyboards/ergodox80/keymaps/default/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox80/keymaps/default/default.png b/keyboards/ergodox80/keymaps/default/default.png deleted file mode 100644 index 6575f7b5e..000000000 Binary files a/keyboards/ergodox80/keymaps/default/default.png and /dev/null differ diff --git a/keyboards/ergodox80/keymaps/default/default_highres.png b/keyboards/ergodox80/keymaps/default/default_highres.png deleted file mode 100644 index 7d9f045f4..000000000 Binary files a/keyboards/ergodox80/keymaps/default/default_highres.png and /dev/null differ diff --git a/keyboards/ergodox80/keymaps/default/readme.md b/keyboards/ergodox80/keymaps/default/readme.md deleted file mode 100644 index 8f6dba45e..000000000 --- a/keyboards/ergodox80/keymaps/default/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ErgoDox EZ Default Configuration - -## Changelog - -* Feb 2, 2016 (V1.1): - * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). - -This is what we ship with out of the factory. :) The image says it all: - -![Default](default_highres.png) diff --git a/keyboards/ergodox80/readme.md b/keyboards/ergodox80/readme.md index 3bbe98fd6..b5c09f922 100644 --- a/keyboards/ergodox80/readme.md +++ b/keyboards/ergodox80/readme.md @@ -1,165 +1,6 @@ -# The Easy Way +# Ergodox 80 key support -If you can find firmware someone else has made that does what you want, that -is the easiest way to customize your ErgoDox. It requires no programming -experience or the setup of a build environment. +This is based on the ergodox-ez qmk firmware but is for ergodoxes with 80 keys. -Quickstart: - - Find and download an existing firmware - [from Other Firmware Options](#other-firmware-options) - - Then flash the firmware to your [ErgoDox Ez](#ergodox-ez) - or [ErgoDox Infinity](#ergodox-infinity) - -# Customizing Keymaps - -There are many existing keymaps in the "keymaps" directory. If you just want -to use one of them, you don't need to modify keymaps and can just build and -flash the firmware as described below. These directories each have a -"readme.md" file which describe them. - -If none of the existing keymaps suit you, you can create your own custom -keymap. This will require some experience with coding. Follow these steps -to customize a keymap: - - - Read the [qmk firmware README](https://github.com/jackhumbert/qmk_firmware) from top to bottom. Then come back here. :) - - - Clone the qmk_firmware repository - - - Set up your build environment (see below). - - - Make a new directory under "keymaps" to hold your customizations. - - - Copy an existing keymap that is close to what you want, such as - "keymaps/default/keymap.c". - - - Use an editor to modify the new "keymap.c". See "Finding the keycodes you - need" below). Try to edit the comments as well, so the "text graphics" - represent your layout correctly. - - - Compile your new firmware (see below) - - - Flash your firmware (see below) - - - Test the changes. - - - Submit your keymap as a pull request to the qmk_firmware repository so - others can use it. You will want to add a "readme.md" that describes the - keymap. - -# Build Dependencies - -Before you can build, you will need the build dependencies. There is a script -to try to do this for Linux: - - - Run the `util/install_dependencies.sh` script as root. - -For the Infinity, you need the chibios submodules to be checked out or you -will receive errors about the build process being unable to find the chibios -files. Check them out with: - - - Go to the top level repo directory and run: `git submodule update --init --recursive` - -# Flashing Firmware - -## ErgoDox Ez - -The Ez uses the [Teensy Loader](https://www.pjrc.com/teensy/loader.html). - -Linux users need to modify udev rules as described on the Teensy Linux page. -Some distributions provide a binary, maybe called `teensy-loader-cli`). - -To flash the firmware: - - - Build the firmware with `make keymapname`, for example `make default` - - This will result in a hex file called `ergodox_ez_keymapname.hex`, e.g. - `ergodox_ez_default.hex` - - - Start the teensy loader. - - - Load the .hex file into it. - - - Press the Reset button by inserting a paperclip gently into the reset hole - in the top right corder. - - - Click the button in the Teensy app to download the firmware. - -## ErgoDox Infinity - -The Infinity is two completely independent keyboards, and needs to be flashed -for the left and right halves seperately. To flash them: - - - Build the firmware with `make infinity-keymapname` - - - Plug in the left hand keyboard only. - - - Press the program button (back of keyboard, above thumb pad). - - - Install the firmware with `sudo make infinity-keymapname-dfu-util` - - - Build left hand firmware with `make infinity-keymapname MASTER=right` - - - Plug in the right hand keyboard only. - - - Press the program button (back of keyboard, above thumb pad). - - - Install the firmware with `sudo make infinity-keymapname-dfu-util MASTER=right` - -More information on the Infinity firmware is available in the [TMK/chibios for -Input Club Infinity Ergodox](https://github.com/fredizzimo/infinity_ergodox/blob/master/README.md) - -### Infinity Master/Two Halves - -The Infinity is two completely independent keyboards, that can connect together. -You have a few options in how you flash the firmware: - -- Flash the left half, rebuild the firmware with "MASTER=right" and then flash - the right half. This allows you to plug in either half directly to the - computer and is what the above instructions do. - -- Flash the left half, then flash the same firmware on the right. This only - works when the left half is plugged directly to the computer and the keymap - is mirrored. It saves the small extra step of rebuilding with - "MASTER=right". - -- The same as the previous one but with "MASTER=right" when you build the - firmware, then flash the same firmware to both halves. You just have to - directly connect the right half to the computer. - -- For minor changes such as changing only the keymap without having updated - any part of the firmware code itself, you can program only the MASTER half. - It is safest to program both halves though. - -# Contributing your keymap - -The QMK firmware is open-source, so it would be wonderful to have your contribution! Within a very short time after launching we already amassed dozens of user-contributed keymaps, with all sorts of creative improvements and tweaks. This is very valuable for people who aren't comfortable coding, but do want to customize their ErgoDox. To make it easy for these people to use your layout, I recommend submitting your PR in the following format. - -1. All work goes inside your keymap subdirectory (`keymaps/german` in this example). -2. `keymap.c` - this is your actual keymap file; please update the ASCII comments in the file so they correspond with what you did. -3. `readme.md` - a readme file, which GitHub would display by default when people go to your directory. Explain what's different about your keymap, what you tweaked or how it works. No specific format to follow, just communicate what you did. :) -4. Any graphics you wish to add. This is absolutely not a must. If you feel like it, you can use [Keyboard Layout Editor](http://keyboard-layout-editor.com) to make something and grab a screenshot, but it's really not a must. If you do have graphics, your readme can just embed the graphic as a link, just like I did with the default layout. - -# Finding the keycodes you need - -Let's say you want a certain key in your layout to send a colon; to figure out what keycode to use to make it do that, you're going to need `quantum/keymap_common.h`. - -That file contains a big list of all of the special, fancy keys (like, being able to send % on its own and whatnot). - -If you want to send a plain vanilla key, you can look up its code under `doc/keycode.txt`. That's where all the boring keys hang out. - -# Other Firmware Options - -There are external tools for customizing the layout, but those do not use -the featurs of this qmk firmware. These sites include: - - - [Massdrop configurator](https://keyboard-configurator.massdrop.com/ext/ergodox) for Ez - - [Input Club configurator](https://input.club/configurator-ergodox) for Infinity, provides left and right files - -You can also find an existing firmware that you like, for example from: - - - [Dozens of community-contributed keymaps](http://qmk.fm/keyboards/ergodox/) - -This qmk firmware also provides the ability to customize keymaps, but requires -a toolchain to build the firmware. See below for instructions on building -firmware and customizing keymaps. -- cgit v1.2.3 From 295ef0d9649b7482c380f38dd6157879df4af91d Mon Sep 17 00:00:00 2001 From: Major Koos Date: Fri, 2 Sep 2016 16:14:40 -0700 Subject: Add support for JD40 MKII PCB RGB Included. --- keyboards/jd40/Makefile | 74 ++++++++++++++ keyboards/jd40/config.h | 79 +++++++++++++++ keyboards/jd40/jd40.c | 26 +++++ keyboards/jd40/jd40.h | 45 +++++++++ keyboards/jd40/keymaps/default/keymap.c | 164 ++++++++++++++++++++++++++++++++ keyboards/jd40/readme.md | 17 ++++ 6 files changed, 405 insertions(+) create mode 100644 keyboards/jd40/Makefile create mode 100644 keyboards/jd40/config.h create mode 100644 keyboards/jd40/jd40.c create mode 100644 keyboards/jd40/jd40.h create mode 100644 keyboards/jd40/keymaps/default/keymap.c create mode 100644 keyboards/jd40/readme.md (limited to 'keyboards') diff --git a/keyboards/jd40/Makefile b/keyboards/jd40/Makefile new file mode 100644 index 000000000..242748111 --- /dev/null +++ b/keyboards/jd40/Makefile @@ -0,0 +1,74 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow + +ifndef QUANTUM_DIR + include ../../Makefile +endif + diff --git a/keyboards/jd40/config.h b/keyboards/jd40/config.h new file mode 100644 index 000000000..e2594f4b3 --- /dev/null +++ b/keyboards/jd40/config.h @@ -0,0 +1,79 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER geekhack +#define PRODUCT jd40v2 +#define DESCRIPTION t.m.k. keyboard firmware for JD40 MKII + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 12 + +/* + * Keyboard Matrix Assignments + * + * Change this to how you wired your keyboard + * COLS: AVR pins used for columns, left to right + * ROWS: AVR pins used for rows, top to bottom + * DIODE_DIRECTION: COL2ROW = COL = Anode (+), ROW = Cathode (-, marked on diode) + * ROW2COL = ROW = Anode (+), COL = Cathode (-, marked on diode) + * +*/ +#define MATRIX_ROW_PINS { F0, F1, F5, B4 } +#define MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ +#define DEBOUNCING_DELAY 5 + +/* define if matrix has ghost (lacks anti-ghosting diodes) */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +#define RGB_DI_PIN D3 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 12 // Number of LEDs +#define RGBLIGHT_HUE_STEP 8 +#define RGBLIGHT_SAT_STEP 8 +#define RGBLIGHT_VAL_STEP 8 + +#endif diff --git a/keyboards/jd40/jd40.c b/keyboards/jd40/jd40.c new file mode 100644 index 000000000..fa06356d9 --- /dev/null +++ b/keyboards/jd40/jd40.c @@ -0,0 +1,26 @@ +#include "jd40.h" + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + + // if (usb_led & (1<event.pressed) { + register_code(KC_RSFT); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +void matrix_scan_user(void) { + +// Layer LED indicators +// ESC led on when in function layer, WASD cluster leds enabled when on arrow cluster + uint32_t layer = layer_state; + if (layer & (1<<1)) { + //gh60_wasd_leds_on(); + } else { + //gh60_wasd_leds_off(); + } + + if (layer & (1<<2)) { + //gh60_esc_led_on(); + } else { + //gh60_esc_led_off(); + } +}; + +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + switch (id) { + case RGBLED_TOGGLE: + //led operations + if (record->event.pressed) { + rgblight_toggle(); + } + break; + case RGBLED_INCREASE_HUE: + if (record->event.pressed) { + rgblight_increase_hue(); + } + break; + case RGBLED_DECREASE_HUE: + if (record->event.pressed) { + rgblight_decrease_hue(); + } + break; + case RGBLED_INCREASE_SAT: + if (record->event.pressed) { + rgblight_increase_sat(); + } + break; + case RGBLED_DECREASE_SAT: + if (record->event.pressed) { + rgblight_decrease_sat(); + } + break; + case RGBLED_INCREASE_VAL: + if (record->event.pressed) { + rgblight_increase_val(); + } + break; + case RGBLED_DECREASE_VAL: + if (record->event.pressed) { + rgblight_decrease_val(); + } + break; + case RGBLED_STEP_MODE: + if (record->event.pressed) { + rgblight_step(); + } + break; + static uint8_t shift_esc_shift_mask; + // Shift + ESC = ~ + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +}; diff --git a/keyboards/jd40/readme.md b/keyboards/jd40/readme.md new file mode 100644 index 000000000..7daa0980e --- /dev/null +++ b/keyboards/jd40/readme.md @@ -0,0 +1,17 @@ +## jd40 mkii keyboard firmware + + Pins: + MATRIX_ROW_PINS { F0, F1, F5, B4 } + MATRIX_COL_PINS { F4, D7, B5, B6, C6, C7, D4, D6, D5, D0, D1, D2 } + RGB_DI_PIN D3 + +====================== + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/jd40 folder. +Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Amtel Flip to program your .hex file. -- cgit v1.2.3 From 11224a00fe79bcba8ed596847000b7ad8118b95f Mon Sep 17 00:00:00 2001 From: Major Koos Date: Fri, 2 Sep 2016 16:42:40 -0700 Subject: Add rules.mk file --- keyboards/jd40/rules.mk | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 keyboards/jd40/rules.mk (limited to 'keyboards') diff --git a/keyboards/jd40/rules.mk b/keyboards/jd40/rules.mk new file mode 100644 index 000000000..2f18fdf10 --- /dev/null +++ b/keyboards/jd40/rules.mk @@ -0,0 +1,69 @@ + + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +# CONSOLE_ENABLE ?= yes # Console for debug(+400) +# COMMAND_ENABLE ?= yes # Commands for debug and configuration +KEYBOARD_LOCK_ENABLE ?= yes # Allow locking of keyboard via magic key +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +# SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality +# MIDI_ENABLE ?= YES # MIDI controls +# UNICODE_ENABLE ?= YES # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE ?= yes # Enable RGB Underglow \ No newline at end of file -- cgit v1.2.3 From f6cb08a5bd0d3c34c64691c7f51911742b562c05 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Sun, 4 Sep 2016 01:07:36 -0500 Subject: Added diagonal mice macros, breathing ala Atomic --- keyboards/planck/keymaps/pvc/config.h | 9 +- keyboards/planck/keymaps/pvc/keymap.c | 428 +++++++++++++++++++--------------- 2 files changed, 238 insertions(+), 199 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/pvc/config.h b/keyboards/planck/keymaps/pvc/config.h index c857a3e89..1113372b0 100644 --- a/keyboards/planck/keymaps/pvc/config.h +++ b/keyboards/planck/keymaps/pvc/config.h @@ -59,13 +59,8 @@ along with this program. If not, see . keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ ) -/* ws2812 RGB LED */ -#define RGB_DI_PIN D1 -#define RGBLIGHT_TIMER -#define RGBLED_NUM 28 // Number of LEDs -#define RGBLIGHT_HUE_STEP 10 -#define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING /* * Feature disable options diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 0bb7f0def..8ff40f377 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -2,48 +2,50 @@ #include "action_layer.h" #include "eeconfig.h" #include "led.h" +#include "mousekey.h" #ifdef AUDIO_ENABLE #include "audio.h" #include "song_list.h" #endif -#define LAYER_QWERTY 0 -#define LAYER_COLEMAK 1 -#define LAYER_DVORAK 2 -#define LAYER_UPPER 3 -#define LAYER_LOWER 4 -#define LAYER_FUNCTION 5 -#define LAYER_MOUSE 6 -#define LAYER_ADJUST 7 - -#define MACRO_QWERTY 0 -#define MACRO_COLEMAK 1 -#define MACRO_DVORAK 2 -#define MACRO_UPPER 3 -#define MACRO_LOWER 4 -#define MACRO_FUNCTION 5 -#define MACRO_MOUSE 6 -#define MACRO_TIMBRE_1 7 -#define MACRO_TIMBRE_2 8 -#define MACRO_TIMBRE_3 9 -#define MACRO_TIMBRE_4 10 -#define MACRO_TEMPO_U 11 -#define MACRO_TEMPO_D 12 -#define MACRO_TONE_DEFAULT 13 -#define MACRO_MUSIC_TOGGLE 14 -#define MACRO_AUDIO_TOGGLE 16 -#define MACRO_INC_VOICE 18 -#define MACRO_DEC_VOICE 19 -#define MACRO_BACKLIGHT 20 -#define MACRO_BREATH_TOGGLE 21 -#define MACRO_BREATH_SPEED_INC 23 -#define MACRO_BREATH_SPEED_DEC 24 -#define MACRO_BREATH_DEFAULT 25 +enum keyboard_layers { + LAYER_QWERTY = 0, + LAYER_UPPER, + LAYER_LOWER, + LAYER_FUNCTION, + LAYER_MOUSE, + LAYER_ADJUST, +}; +enum keyboard_macros { + MACRO_QWERTY = 0, + MACRO_UPPER, + MACRO_LOWER, + MACRO_FUNCTION, + MACRO_MOUSE, + MACRO_TIMBRE_1, + MACRO_TIMBRE_2, + MACRO_TIMBRE_3, + MACRO_TIMBRE_4, + MACRO_TEMPO_U, + MACRO_TEMPO_D, + MACRO_TONE_DEFAULT, + MACRO_MUSIC_TOGGLE, + MACRO_AUDIO_TOGGLE, + MACRO_INC_VOICE, + MACRO_DEC_VOICE, + MACRO_BACKLIGHT, + MACRO_BREATH_TOGGLE, + MACRO_BREATH_SPEED_INC, + MACRO_BREATH_SPEED_DEC, + MACRO_BREATH_DEFAULT, + MACRO_MOUSE_MOVE_UL, + MACRO_MOUSE_MOVE_UR, + MACRO_MOUSE_MOVE_DL, + MACRO_MOUSE_MOVE_DR, +}; #define M_QWRTY M(MACRO_QWERTY) -#define M_COLMK M(MACRO_COLEMAK) -#define M_DVORK M(MACRO_DVORAK) #define M_UPPER M(MACRO_UPPER) #define M_LOWER M(MACRO_LOWER) #define M_FUNCT M(MACRO_FUNCTION) @@ -60,6 +62,10 @@ #define M_BSPDU M(MACRO_BREATH_SPEED_INC) #define M_BSPDD M(MACRO_BREATH_SPEED_DEC) #define M_BDFLT M(MACRO_BREATH_DEFAULT) +#define M_MS_UL M(MACRO_MOUSE_MOVE_UL) +#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) +#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) +#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) #define VC_UP M(MACRO_INC_VOICE) @@ -86,147 +92,124 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - * .-----------------------------------------------------------------------------------------------------------. - * | TAB | Q | W | E | R | T | Y | U | I | O | P | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ESC | A | S | D | F | G | H | J | K | L | ; | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | UP | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | SHIFT | LEFT | DOWN | RIGHT | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_QWERTY] = { // QWERTY - { 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_UP, KC_ENT }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* COLEMAK - * .-----------------------------------------------------------------------------------------------------------. - * | TAB | Q | W | F | P | G | J | L | U | Y | ; | ESC | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LSHIFT | Z | X | C | V | B | K | M | , | . | UP | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | SHIFT | LEFT | DOWN | RIGHT | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_COLEMAK] = { // COLEMAK - { KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_ESC }, - { KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_UP, KC_ENT }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* DVORAK - * .-----------------------------------------------------------------------------------------------------------. - * | TAB | ' | , | . | P | Y | F | G | C | R | L | BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | ESC | A | O | E | U | I | D | H | T | N | S | / | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | ENTER | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | UP | DOWN | LEFT | RIGHT | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_DVORAK] = { // DVORAK - { KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC }, - { KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH }, - { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, KC_UP, KC_DOWN, KC_LEFT, KC_RGHT }, - }, - -/* UPPER - * .-----------------------------------------------------------------------------------------------------------. - * | PRINT | F1 | F2 | F3 | F4 | NUM LK | / | 7 | 8 | 9 | - | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | CAP LK | F5 | F6 | F7 | F8 | SCR LK | * | 4 | 5 | 6 | + | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | F9 | F10 | F11 | F12 | PAUSE | | 1 | 2 | 3 | ENTER | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | 0 | 0 | | RALT | . | ENTER | END | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_UPPER] = { // UPPER - { KC_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL }, - { KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS }, - { _______, KC_F9, KC_F10, KC_F11, KC_F12, KC_PAUS, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME }, - { _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END }, - }, - -/* LOWER - * .-----------------------------------------------------------------------------------------------------------. - * | | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | ^ | * | + | - | / | \ | _ | ' | " | ` | PG DN | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | | | | & | ! | ~ | ; | : | = | < | > | ? | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | | | | | | | | | | | END | - * '-----------------------------------------------------------------------------------------------------------' - */ - - [LAYER_LOWER] = { // LOWER - { _______, KC_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, KC_PGUP }, - { _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, KC_PGDN }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL, KC_LT, KC_GT, KC_QUES, KC_HOME }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_END }, - }, - - -/* FUNCTION - * .-----------------------------------------------------------------------------------------------------------. - * | NUM LK | F13 | F14 | F15 | F16 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | PAUSE | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | CAP LK | F17 | F18 | F19 | F20 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | PRINT | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | SCR LK | F21 | F22 | F23 | F24 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MUTE | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | PLAY | PLAY | LOWER | VOL UP | VOL DN | NEXT | PREV | - * '-----------------------------------------------------------------------------------------------------------' - */ - [LAYER_FUNCTION] = { // FUNCTION - { KC_NLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PAUS }, - { KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_PSCR }, - { KC_SLCK, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_MUTE }, - { _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, KC_VOLU, KC_VOLD, KC_MPRV, KC_MNXT }, - }, +/* LAYER = LAYER_QWERTY + .-----------------------------------------------------------------------------------------------------------. + | TAB | Q | W | E | R | T | Y | U | I | O | P | BACKSP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ESC | A | S | D | F | G | H | J | K | L | ; | ' | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LSHIFT | Z | X | C | V | B | N | M | , | . | UP | ENTER | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCTRL | LWIN | FN | LALT | UPPER | SPACE | SPACE | LOWER | OSHIFT | LEFT | DOWN | RIGHT | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_QWERTY] = { + { 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_UP , KC_ENT }, + { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_LEFT, KC_DOWN, KC_RGHT } +}, + +/* LAYER = LAYER_UPPER + .-----------------------------------------------------------------------------------------------------------. + | PRINT | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | DEL | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | PAUSE | F5 | F6 | F7 | F8 | SCR LK | KP * | KP 4 | KP 5 | KP 6 | KP + | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F9 | F10 | F11 | F12 | PAUSE | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | UPPER | KP 0 | KP 0 | ______ | RALT | KP . | KP ENT | END | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_UPPER] = { + { KC_PSCR, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, KC_DEL }, + { KC_PAUS, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_SLCK, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_INS }, + { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_PAUS, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_HOME }, + { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, KC_END } +}, + +/* LAYER = LAYER_LOWER + .-----------------------------------------------------------------------------------------------------------. + | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | PG UP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | PG DN | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | ______ | ______ | LOWER | ______ | ______ | ______ | END | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_LOWER] = { + { _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , KC_PGUP }, + { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , KC_PGDN }, + { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, KC_HOME }, + { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, KC_END } +}, + +/* LAYER = LAYER_FUNCTION + .-----------------------------------------------------------------------------------------------------------. + | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | VOL UP | MUTE | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | FN | ______ | ______ | PLAY | PLAY | ______ | ______ | PREV | VOL DN | NEXT | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_FUNCTION] = { + { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_VOLU, KC_MUTE }, + { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } +}, #ifdef MOUSEKEY_ENABLE - [LAYER_MOUSE] = { // MOUSE - { KC_ESC, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_ESC }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { _______, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, KC_MS_U, KC_MS_D, KC_MS_L, KC_MS_R }, - }, +/* LAYER = LAYER_MOUSE + .-----------------------------------------------------------------------------------------------------------. + | ESC | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | MS WHL | MS WHR | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | MS WHU | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | MS U | MS WHD | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | MS BT1 | MS BT1 | ______ | ______ | MS L | MS D | MS R | + '-----------------------------------------------------------------------------------------------------------' +*/ + +[LAYER_MOUSE] = { + { KC_ESC , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, KC_WH_L, KC_WH_R }, + { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, KC_WH_U }, + { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, KC_MS_U, KC_WH_D }, + { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } +}, #endif - [LAYER_ADJUST] = { // ADJUST - { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, MU_TOG, AU_TOG }, - { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, MUV_IN, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, MUV_DE, _______ }, - }, - -/* - [LAYER_EMPTY] = { - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, }, - }, +/* LAYER = LAYER_ADJUST + .-----------------------------------------------------------------------------------------------------------. + | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MUSIC | AUDIO | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | VOICE+ | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX | XXXXXX | LOWER | XXXXXX | TEMPO- | VOICE- | TEMPO+ | + '-----------------------------------------------------------------------------------------------------------' */ +[LAYER_ADJUST] = { + { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG , AU_TOG }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } +}, + }; #ifdef AUDIO_ENABLE @@ -234,10 +217,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { float tone_my_startup[][2] = SONG(ODE_TO_JOY); float tone_my_goodbye[][2] = SONG(ROCK_A_BYE_BABY); -float tone_qwerty[][2] = SONG(QWERTY_SOUND); -float tone_dvorak[][2] = SONG(DVORAK_SOUND); -float tone_colemak[][2] = SONG(COLEMAK_SOUND); - float tone_audio_on[][2] = SONG(CLOSE_ENCOUNTERS_5_NOTE); float tone_music_on[][2] = SONG(DOE_A_DEER); float tone_caps_on[][2] = SONG(CAPS_LOCK_ON_SOUND); @@ -267,46 +246,38 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) switch(id) { - case MACRO_QWERTY: + case MACRO_BREATH_TOGGLE: if (record->event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - layer_on(LAYER_LOWER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + breathing_defaults(); } - else + break; + + case MACRO_QWERTY: + if (record->event.pressed) { - layer_off(LAYER_LOWER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + persistant_default_layer_set(1UL<event.pressed) { layer_on(LAYER_UPPER); + breathing_speed_set(2); + breathing_pulse(); update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); } else @@ -323,13 +296,32 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; + case MACRO_LOWER: + if (record->event.pressed) + { + layer_on(LAYER_LOWER); + breathing_speed_set(2); + breathing_pulse(); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + else + { + layer_off(LAYER_LOWER); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + break; + case MACRO_FUNCTION: if (record->event.pressed) { + breathing_speed_set(3); + breathing_enable(); layer_on(LAYER_FUNCTION); } else { + breathing_speed_set(1); + breathing_self_disable(); layer_off(LAYER_FUNCTION); } break; @@ -352,6 +344,58 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } break; + case MACRO_MOUSE_MOVE_UL: + if (record->event.pressed) + { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_LEFT); + } + else + { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_LEFT); + } + break; + + case MACRO_MOUSE_MOVE_UR: + if (record->event.pressed) + { + mousekey_on(KC_MS_UP); + mousekey_on(KC_MS_RIGHT); + } + else + { + mousekey_off(KC_MS_UP); + mousekey_off(KC_MS_RIGHT); + } + break; + + case MACRO_MOUSE_MOVE_DL: + if (record->event.pressed) + { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_LEFT); + } + else + { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_LEFT); + } + break; + + case MACRO_MOUSE_MOVE_DR: + if (record->event.pressed) + { + mousekey_on(KC_MS_DOWN); + mousekey_on(KC_MS_RIGHT); + } + else + { + mousekey_off(KC_MS_DOWN); + mousekey_off(KC_MS_RIGHT); + } + break; + #endif /* MOUSEKEY_ENABLE */ #ifdef AUDIO_ENABLE -- cgit v1.2.3 From bf5941b335268748ee7877fc24cdd538a9faacd0 Mon Sep 17 00:00:00 2001 From: Samuel Ryan Goodwin Date: Mon, 5 Sep 2016 15:53:52 +0200 Subject: Add my keymap. --- keyboards/planck/keymaps/sgoodwin/Makefile | 25 +++ keyboards/planck/keymaps/sgoodwin/keymap.c | 233 ++++++++++++++++++++++++++++ keyboards/planck/keymaps/sgoodwin/readme.md | 10 ++ 3 files changed, 268 insertions(+) create mode 100644 keyboards/planck/keymaps/sgoodwin/Makefile create mode 100644 keyboards/planck/keymaps/sgoodwin/keymap.c create mode 100644 keyboards/planck/keymaps/sgoodwin/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/sgoodwin/Makefile b/keyboards/planck/keymaps/sgoodwin/Makefile new file mode 100644 index 000000000..581e08cd0 --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/Makefile @@ -0,0 +1,25 @@ + + +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/sgoodwin/keymap.c b/keyboards/planck/keymaps/sgoodwin/keymap.c new file mode 100644 index 000000000..4d5d3d7ef --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/keymap.c @@ -0,0 +1,233 @@ +// This is sgoodwin's layout file for the Quantum project. +// It doesn't have Plover or Dvorak layers because he doesn't use that. +// It Also doesn't allow for swapping alt with CMD because that only happens in error. + +#include "planck.h" +#include "action_layer.h" +#ifdef AUDIO_ENABLE + #include "audio.h" +#endif +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 1 +#define _COLEMAK 0 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum planck_keycodes { + COLEMAK = SAFE_RANGE, + QWERTY, + LOWER, + RAISE, + BACKLIT, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |SHEnt | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC}, + {KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, MT(MOD_RSFT, KC_ENT) }, + {ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |SHEnt | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Hyper| Ctrl | Alt | GUI |Lower | Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = { + {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, MT(MOD_RSFT, KC_ENT) }, + {ALL_T(KC_NO), KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} +}, + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | { | } | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = { + {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),_______, _______, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = { + {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, _______, _______, _______}, + {BACKLIT, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} +}, + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff| | |Qwerty|Colemk| | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | |Voice-|Voice+|Mus on|Musoff|MIDIon|MIDIof| | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = { + {_______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL}, + {_______, _______, _______, AU_ON, AU_OFF, _______, _______, QWERTY, COLEMAK, _______, _______, _______}, + {_______, MUV_DE, MUV_IN, MU_ON, MU_OFF, MI_ON, MI_OFF, _______, _______, _______, _______, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +} + + +}; + +#ifdef AUDIO_ENABLE + +float tone_startup[][2] = SONG(STARTUP_SOUND); +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +float music_scale[][2] = SONG(MUSIC_SCALE_SOUND); + +float tone_goodbye[][2] = SONG(GOODBYE_SOUND); +#endif + + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case BACKLIT: + if (record->event.pressed) { + register_code(KC_RSFT); + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } else { + unregister_code(KC_RSFT); + } + return false; + break; + } + return true; +} + +void matrix_init_user(void) { + #ifdef AUDIO_ENABLE + startup_user(); + #endif +} + +#ifdef AUDIO_ENABLE + +void startup_user() +{ + _delay_ms(20); // gets rid of tick + PLAY_NOTE_ARRAY(tone_startup, false, 0); +} + +void shutdown_user() +{ + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); +} + +void music_on_user(void) +{ + music_scale_user(); +} + +void music_scale_user(void) +{ + PLAY_NOTE_ARRAY(music_scale, false, 0); +} + +#endif diff --git a/keyboards/planck/keymaps/sgoodwin/readme.md b/keyboards/planck/keymaps/sgoodwin/readme.md new file mode 100644 index 000000000..dfa88f380 --- /dev/null +++ b/keyboards/planck/keymaps/sgoodwin/readme.md @@ -0,0 +1,10 @@ +# sgoodwin's Planck Layout + +Includes: + +1. No Dvorak or Plover +2. No alt-swapping +3. Right enter is shift when held down, enter when tapped. +4. Bottom left corner in normal layers is Hyper and not brightness control. +5. Brightness is instead in the bottom corner on raise/lower. + -- cgit v1.2.3 From e9ce4960c15066c14c775b1d769f1f89ec450787 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Mon, 5 Sep 2016 17:40:03 -0400 Subject: Add new ErgoDox EZ keymap, YORUIAN --- .../keymaps/yoruian/90-ergodox-yoruian.conf | 6 ++ keyboards/ergodox/keymaps/yoruian/Makefile | 13 +++ keyboards/ergodox/keymaps/yoruian/README | 102 +++++++++++++++++++++ keyboards/ergodox/keymaps/yoruian/ergodox_yoruian | 34 +++++++ keyboards/ergodox/keymaps/yoruian/keymap.c | 61 ++++++++++++ keyboards/ergodox/keymaps/yoruian/yoruian.h | 61 ++++++++++++ 6 files changed, 277 insertions(+) create mode 100644 keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf create mode 100644 keyboards/ergodox/keymaps/yoruian/Makefile create mode 100644 keyboards/ergodox/keymaps/yoruian/README create mode 100644 keyboards/ergodox/keymaps/yoruian/ergodox_yoruian create mode 100644 keyboards/ergodox/keymaps/yoruian/keymap.c create mode 100644 keyboards/ergodox/keymaps/yoruian/yoruian.h (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf new file mode 100644 index 000000000..c8a92c5c5 --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf @@ -0,0 +1,6 @@ +Section "InputClass" + Identifier "ErgoDox EZ" + MatchIsKeyboard "on" + MatchProduct "ErgoDox EZ ErgoDox EZ" + Option "XkbLayout" "ergodox_ez_yoruian" +EndSection diff --git a/keyboards/ergodox/keymaps/yoruian/Makefile b/keyboards/ergodox/keymaps/yoruian/Makefile new file mode 100644 index 000000000..b43a24c61 --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/Makefile @@ -0,0 +1,13 @@ +ifndef QUANTUM_DIR + include ../../../../Makefile +endif + +install-xorg-configuration: + install -m 0664 90-$(KEYBOARD)-$(KEYMAP).conf \ + /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf + install -m 0644 $(KEYBOARD)_$(KEYMAP) \ + /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP) + +uninstall-xorg-configuration: + -rm -f /etc/X11/xorg.conf.d/90-$(KEYBOARD)-$(KEYMAP).conf + -rm -f /usr/share/X11/xkb/symbols/$(KEYBOARD)_$(KEYMAP) diff --git a/keyboards/ergodox/keymaps/yoruian/README b/keyboards/ergodox/keymaps/yoruian/README new file mode 100644 index 000000000..99b41434e --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/README @@ -0,0 +1,102 @@ + Snarfangel's YORUIAN for the ErgoDox EZ + ‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +DEFAULT +┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ +┃ ` │ ; │ : │ - │ / │ ( │ < ┃ ┃ > │ ) │ ^ │ * │ ~ │ Γ │ σ ┃ +┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨ +┃ ⎋ │ . │ y │ o │ r │ ? │ ✦ ┃ ┃ ✦ │ j │ v │ d │ f │ w │ q ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ ⎈ │ u │ i │ a │ n │ ! ├───┨ ┠───┤ m │ h │ t │ s │ c │ ⎈ ┃ +┠───┼───┼───┼───┼───┼───┤ ❖ ┃ ┃ ❖ ├───┼───┼───┼───┼───┼───┨ +┃ λ │ ' │ " │ , │ _ │ = │ ┃ ┃ │ k │ l │ p │ g │ b │ x ┃ +┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨ +┃ ⎀ │ E │ │ │ ◆ ┃ ┃ ◆ │ │ │ z │ ⎙ ┃ +┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛ + ┏━━━┯━━━┓ ┏━━━┯━━━┓ + ┃ ⌫ │ ⌥ ┃ ┃ ⎄ │ ↹ ┃ + ┏━━━╃───┼───┨ ┠───┼───╄━━━┓ + ┃ │ │ ┃ ┃ │ │ ┃ + ┃ e │ ⇧ ├───┨ ┠───┤ ⏎ │ ␣ ┃ + ┃ │ │ ┃ ┃ │ │ ┃ + ┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛ +SHIFTED +┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ +┃ 9 │ 7 │ 5 │ 3 │ 1 │ [ │ { ┃ ┃ } │ ] │ 0 │ 2 │ 4 │ 6 │ 8 ┃ +┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨ +┃ │ * │ Y │ O │ R │ \ │ ┃ ┃ │ J │ V │ D │ F │ W │ Q ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ │ U │ I │ A │ N │ | ├───┨ ┠───┤ M │ H │ T │ S │ C │ ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ │ # │ $ │ @ │ & │ + │ ┃ ┃ │ K │ L │ P │ G │ B │ X ┃ +┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨ +┃ │ │ │ │ ┃ ┃ │ │ │ Z │ ┃ +┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛ + ┏━━━┯━━━┓ ┏━━━┯━━━┓ + ┃ │ ┃ ┃ │ ┃ + ┏━━━╃───┼───┨ ┠───┼───╄━━━┓ + ┃ │ │ ┃ ┃ │ │ ┃ + ┃ │ ├───┨ ┠───┤ │ ┃ + ┃ │ │ ┃ ┃ │ │ ┃ + ┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛ +λ LAYER +┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ ┏━━━┯━━━┯━━━┯━━━┯━━━┯━━━┯━━━┓ +┃ │ │ │ │ │ │ ┃ ┃ │ │ ⑤ │ ⑥ │ ⑦ │ ⑧ │ ⑨ ┃ +┠───┼───┼───┼───┼───┼───┼───┨ ┠───┼───┼───┼───┼───┼───┼───┨ +┃ │ │ │ │ │ │ ┃ ┃ │ │ ① │ ② │ ③ │ ④ │ ⑩ ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ │ │ │ │ │ ├───┨ ┠───┤ ⎉ │ ← │ ↓ │ ↑ │ → │ ⑪ ┃ +┠───┼───┼───┼───┼───┼───┤ ┃ ┃ ├───┼───┼───┼───┼───┼───┨ +┃ λ │ │ │ │ │ │ ┃ ┃ │ │ ⇱ │ ⎘ │ ⎗ │ ⇲ │ ⑫ ┃ +┠───┼───┼───┼───┼───╆━━━┷━━━┛ ┗━━━┷━━━╅───┼───┼───┼───┼───┨ +┃ │ │ │ │ ┃ ┃ │ │ │ │ ┃ +┗━━━┷━━━┷━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┷━━━┷━━━┛ + ┏━━━┯━━━┓ ┏━━━┯━━━┓ + ┃ │ ┃ ┃ │ ┃ + ┏━━━╃───┼───┨ ┠───┼───╄━━━┓ + ┃ │ │ ┃ ┃ │ │ ┃ + ┃ │ ├───┨ ┠───┤ │ ┃ + ┃ │ │ ┃ ┃ │ │ ┃ + ┗━━━┷━━━┷━━━┛ ┗━━━┷━━━┷━━━┛ + +Installation (X only) +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ + 1. Build and flash firmware as usual + + 2. sudo make install-xorg-configuration + + 3. Restart X + +Features +‾‾‾‾‾‾‾‾ + • E on the thumb + + • Emacs-friendly + + • Symmetric control keys for finger wear levelling + + • Greek and subscript dead keys + + • Compose key for arbitrary Unicode input via ~/.XCompose + +Don't Cares +‾‾‾‾‾‾‾‾‾‾‾ + • Easy migration from QWERTY + + • Compatbility with non-XKB systems + + • Mouse emulation + + • Media keys + +Acknowledgements +‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾ +Snarfangel, for designing the layout. + +The GNU FreeFont project and Steve White, for adding new keyboard +symbols. + +Xah Lee, for http://xahlee.info/comp/unicode_computing_symbols.html + +Colophon +‾‾‾‾‾‾‾‾ +This file is best-viewed with an SVN version of GNU FreeFont Mono. diff --git a/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian new file mode 100644 index 000000000..734314394 --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian @@ -0,0 +1,34 @@ +partial alphanumeric_keys modifier_keys +xkb_symbols "ergodox_ez_yoruian" { + include "us" + name[Group1]= "English (yoruian-1.0.0)"; + + replace key { [ Multi_key, Multi_key ] }; + replace key { [ Hyper_L, Hyper_L ] }; + replace key { [ grave, 9 ] }; + replace key { [ semicolon, 7 ] }; + replace key { [ colon, 5 ] }; + replace key { [ minus, 3 ] }; + replace key { [ slash, 1 ] }; + replace key { [ asciicircum, 0 ] }; + replace key { [ percent, 2 ] }; + replace key { [ asciitilde, 4 ] }; + replace key { [ dead_greek, 6 ] }; + replace key { [ dead_caron, 8 ] }; + replace key { [ E, E ] }; + replace key { [ period, asterisk ] }; + replace key { [ question, backslash ] }; + replace key { [ exclam, bar ] }; + replace key { [ apostrophe, numbersign ] }; + replace key { [ quotedbl, dollar ] }; + replace key { [ comma, at ] }; + replace key { [ underscore, ampersand ] }; + replace key { [ equal, plus ] }; + replace key { [ parenleft, bracketleft ] }; + replace key { [ less, braceleft ] }; + replace key { [ greater, braceright ] }; + replace key { [ parenright, bracketright ] }; + + modifier_map none { }; + modifier_map Mod3 { }; +}; diff --git a/keyboards/ergodox/keymaps/yoruian/keymap.c b/keyboards/ergodox/keymaps/yoruian/keymap.c new file mode 100644 index 000000000..d3635ddf3 --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/keymap.c @@ -0,0 +1,61 @@ +/* + * Copyright 2016 Thomas Fitzsimmons + * + * 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 3 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 . + */ +#include "yoruian.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = KEYMAP\ +(9, 7, 5, 3, 1, GRV, MINS, EQL, LBRC, 0, 2, 4, 6, 8, + ES, RBRC, Y, O, R, BSLS, P3, P3, J, V, D, F, W, Q, + LC, U, I, A, N, SCLN, M, H, T, S, C, RC, + FF, QUOT, COMM, DOT, SLSH, P0, LGUI, LGUI, K, L, P, G, B, X, + IN, P1, NO, NO, LALT, LALT, NO, NO, Z, PS, + BSPC, RALT, P2, TAB, + NO, NO, + E, LSFT, NO, NO, ENT, SPC), +[1] = KEYMAP\ +(TR, TR, TR, TR, TR, TR, TR, TR, TR, F5, F6, F7, F8, F9, + TR, TR, TR, TR, TR, TR, TR, TR, TR, F1, F2, F3, F4, FT, + TR, TR, TR, TR, TR, TR, PAUS, LEFT, DOWN, UP, RGHT, FE, + TR, TR, TR, TR, TR, TR, TR, TR, TR, HOME, PGDN, PGUP, END, FW, + TR, TR, TR, TR, TR, TR, TR, TR, TR, TR, + TR, TR, TR, TR, + TR, TR, + TR, TR, TR, TR, TR, TR), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { + return MACRO_NONE; +}; + +void matrix_init_user(void) { +}; + +void matrix_scan_user(void) { + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); +}; + +/* + * Local Variables: + * electric-indent-mode: nil + * End: + */ diff --git a/keyboards/ergodox/keymaps/yoruian/yoruian.h b/keyboards/ergodox/keymaps/yoruian/yoruian.h new file mode 100644 index 000000000..1adcb7fd3 --- /dev/null +++ b/keyboards/ergodox/keymaps/yoruian/yoruian.h @@ -0,0 +1,61 @@ +/* + * Copyright 2016 Thomas Fitzsimmons + * + * 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 3 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 . + */ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +#undef KEYMAP +#define KEYMAP\ +( \ + /* Spacial positions. */ \ + k00, k01, k02, k03, k04, k05, k06, k07, k08, k09, k0A, k0B, k0C, k0D, \ + k10, k11, k12, k13, k14, k15, k16, k17, k18, k19, k1A, k1B, k1C, k1D, \ + k20, k21, k22, k23, k24, k25, k28, k29, k2A, k2B, k2C, k2D, \ + k30, k31, k32, k33, k34, k35, k36, k37, k38, k39, k3A, k3B, k3C, k3D, \ + k40, k41, k42, k43, k44, k49, k4A, k4B, k4C, k4D, \ + k55, k56, k57, k58, \ + k54, k59, \ + k53, k52, k51, k5C, k5B, k5A) \ + \ + /* Matrix positions. */ \ + { \ + { KC_##k00, KC_##k10, KC_##k20, KC_##k30, KC_##k40, KC_NO }, \ + { KC_##k01, KC_##k11, KC_##k21, KC_##k31, KC_##k41, KC_##k51 }, \ + { KC_##k02, KC_##k12, KC_##k22, KC_##k32, KC_##k42, KC_##k52 }, \ + { KC_##k03, KC_##k13, KC_##k23, KC_##k33, KC_##k43, KC_##k53 }, \ + { KC_##k04, KC_##k14, KC_##k24, KC_##k34, KC_##k44, KC_##k54 }, \ + { KC_##k05, KC_##k15, KC_##k25, KC_##k35, KC_NO, KC_##k55 }, \ + { KC_##k06, KC_##k16, KC_NO, KC_##k36, KC_NO, KC_##k56 }, \ + { KC_##k07, KC_##k17, KC_NO, KC_##k37, KC_NO, KC_##k57 }, \ + { KC_##k08, KC_##k18, KC_##k28, KC_##k38, KC_NO, KC_##k58 }, \ + { KC_##k09, KC_##k19, KC_##k29, KC_##k39, KC_##k49, KC_##k59 }, \ + { KC_##k0A, KC_##k1A, KC_##k2A, KC_##k3A, KC_##k4A, KC_##k5A }, \ + { KC_##k0B, KC_##k1B, KC_##k2B, KC_##k3B, KC_##k4B, KC_##k5B }, \ + { KC_##k0C, KC_##k1C, KC_##k2C, KC_##k3C, KC_##k4C, KC_##k5C }, \ + { KC_##k0D, KC_##k1D, KC_##k2D, KC_##k3D, KC_##k4D, KC_NO } \ + } + +#define KC_ES KC_ESC +#define KC_LC KC_LCTL +#define KC_RC KC_RCTL +#define KC_FF MO(1) +#define KC_IN KC_INS +#define KC_PS KC_PSCR +#define KC_TR KC_TRNS +#define KC_FT KC_F10 +#define KC_FE KC_F11 +#define KC_FW KC_F12 -- cgit v1.2.3 From ce53c0643d4eaf8f13ac1140d3bd91dfa5f90e22 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Tue, 6 Sep 2016 00:09:14 -0400 Subject: Fix ergodox_yoruian XKB naming --- keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf | 2 +- keyboards/ergodox/keymaps/yoruian/ergodox_yoruian | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf index c8a92c5c5..ce4fce3b1 100644 --- a/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf +++ b/keyboards/ergodox/keymaps/yoruian/90-ergodox-yoruian.conf @@ -2,5 +2,5 @@ Section "InputClass" Identifier "ErgoDox EZ" MatchIsKeyboard "on" MatchProduct "ErgoDox EZ ErgoDox EZ" - Option "XkbLayout" "ergodox_ez_yoruian" + Option "XkbLayout" "ergodox_yoruian" EndSection diff --git a/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian index 734314394..0d13fbfd4 100644 --- a/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian +++ b/keyboards/ergodox/keymaps/yoruian/ergodox_yoruian @@ -1,5 +1,5 @@ partial alphanumeric_keys modifier_keys -xkb_symbols "ergodox_ez_yoruian" { +xkb_symbols "ergodox_yoruian" { include "us" name[Group1]= "English (yoruian-1.0.0)"; -- cgit v1.2.3 From a3e7042084ac2a117cea129e4dd4995904f247e8 Mon Sep 17 00:00:00 2001 From: joar Date: Tue, 6 Sep 2016 16:00:08 +0200 Subject: norwegian programmer-friendly layout --- .../keyboard-layout.png | Bin 0 -> 140077 bytes .../keymaps/norwegian_programmer_osx_pc/keymap.c | 180 +++++++++++++++++++++ .../keymaps/norwegian_programmer_osx_pc/readme.md | 30 ++++ .../keyboard-layout.png | Bin 0 -> 97519 bytes .../norwegian_programmer_osx_pc_colemak/keymap.c | 180 +++++++++++++++++++++ .../norwegian_programmer_osx_pc_colemak/readme.md | 30 ++++ 6 files changed, 420 insertions(+) create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c create mode 100644 keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png new file mode 100644 index 000000000..544b5658e Binary files /dev/null and b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c new file mode 100644 index 000000000..1d505f8e3 --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/keymap.c @@ -0,0 +1,180 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_norwegian.h" + +#define BASE 0 // default layer +#define BASE_MAC 1 // default layer mac +#define NUMB_FUNC 2 // numbers and function keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Basic layer PC + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | * | [ | ] | { | } | ~ |Mac/PC| | ^ | $ | ( | ) | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | + | 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 | RIGHT| DOWN | UP | _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Alt/esc| ! | ? | : | TAB | | LEFT | _ | & | | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | # | ` | |Insert| % | + * ,------|------|------| |------+-------+------. + * | | | ´ | | Del | | | + * | Shift|Ctrl/.|------| |------| Enter |Space | + * | | |GUI/, | | Bspc | | | + * `--------------------' `---------------------' + */ +[BASE] = KEYMAP( + // left hand + KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), + KC_PPLS, KC_Q, KC_W, KC_E, KC_R, KC_T, NO_QUO2, + KC_PSLS, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, + ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, + KC_HASH, KC_FN7, + KC_FN6, + KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA), + // right hand + KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, + NO_APOS, KC_Y, KC_U, KC_I, KC_O, KC_P, NO_AA , + KC_H, KC_J, KC_K, KC_L, NO_OSLH, NO_AE, + NO_EQL, KC_N, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, + KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), + KC_INSERT, KC_PERC, + KC_DELT, + KC_BSPC,KC_ENT,KC_SPC + ), +/* Keymap 1: Basic layer MACS (Same as pc, except for cmd/ctrl, which are swapped) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | \ | | | { | } | | | | | $ | | | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | ' |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | |,/Ctrl| | | | ` | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | ` | | | | + * ,------|------|------| |------+------+------. + * | | | ´ | | | | | + * | |GUI/. |------| |------| | | + * | | |crtl/,| | | | | + * `--------------------' `--------------------' + */ +[BASE_MAC] = KEYMAP( + KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, 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, NO_GRV_MAC, + KC_FN10, + KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA), + // right hand + KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC, + NO_APOS_MAC, 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, NO_BSLS_MAC, + KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2), + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: Number ++´ánd Fn layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 8 | 7 | 6 | 5 | 9 | | | | | F5 | F6 | F7 | F8 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | 4 | 3 | 2 | 1 | 0 |------| |------| | F1 | F2 | F3 | F4 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | END | PGDWN| PGUP | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | HOME | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUMB_FUNC] = KEYMAP( + NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS, + NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0, + NO_MINS, 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, + // right hand + KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_F5, KC_F6 , KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, + KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_PGDN, KC_PGUP, KC_TRNS, + KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +) +}; + +enum macro_id { + TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. + [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. + [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. + [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. + [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed. + [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed. + [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed. + [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly + [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly + [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed +}; + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + keyevent_t event = record->event; + + switch (id) { + case TILDE_NO: + return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE); + case LESS_NO: + return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE); + case GRTR_NO: + return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE); + case CIRC_NO: + return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE); + case ACUT_NO: + return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE); + case GRV_NO: + return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE); + case LESS_NO_MAC: + return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE); + case GRTR_NO_MAC: + return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE); + case ACUT_NO_MAC: + return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE); + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md new file mode 100644 index 000000000..f7e8baf56 --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc/readme.md @@ -0,0 +1,30 @@ +# Norwegian setup with osx/pc toggle + +## Motivation +I wanted a Norwegian setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup. + +## Overview +The setup is created to be programmer friendly. +- Most of the symbols used in code can be activated without using layers or shift key. +- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist. +- Navigation is prioritized, arrows below the home row. + +## PC/Mac toggle +The default setup is for Norwegian keyboard setting(on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard. + +## Layers +Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys. + +## Tap-shift +Tap for the next character to be shifted, hold down for regular shift. + +## Comma dot and escape +Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys. + +## Numpad symbols ++-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0. +If you really need the norwegian symbols in a program, you can access them using the number toggle button. + +## Layout + +![keyboard-layout](keyboard-layout.png) diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png new file mode 100644 index 000000000..462de5c56 Binary files /dev/null and b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keyboard-layout.png differ diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c new file mode 100644 index 000000000..acf74a47d --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/keymap.c @@ -0,0 +1,180 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "keymap_norwegian.h" + +#define BASE 0 // default layer +#define BASE_MAC 1 // default layer mac +#define NUMB_FUNC 2 // numbers and function keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Keymap 0: Basic layer PC + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | * | [ | ] | { | } | ~ |Mac/PC| | ^ | $ | ( | ) | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | + | 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 | RIGHT| DOWN | UP | _ | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Alt/esc| ! | ? | : | TAB | | LEFT | _ | & | | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,--------------. + * | # | ` | |Insert| % | + * ,------|------|------| |------+-------+------. + * | | | ´ | | Del | | | + * | Shift|Ctrl/.|------| |------| Enter |Space | + * | | |GUI/, | | Bspc | | | + * `--------------------' `---------------------' + */ +[BASE] = KEYMAP( + // left hand + KC_PAST, NO_LBRC, NO_RBRC, NO_LCBR, NO_RCBR, KC_FN2, TG(1), + KC_PPLS, KC_Q, KC_W, KC_F, KC_P, KC_G, NO_QUO2, + KC_PSLS, KC_A, KC_R, KC_S, KC_T, KC_D, + KC_PMNS, KC_Z, KC_X, KC_C, KC_V, KC_B, NO_SCLN, + ALT_T(KC_ESC), KC_EXLM , NO_QUES, NO_COLN, KC_TAB, + KC_HASH, KC_FN7, + KC_FN6, + KC_FN1,CTL_T(KC_DOT),GUI_T(KC_COMMA), + // right hand + KC_FN5, NO_DLR, NO_LPRN, NO_RPRN ,KC_FN3, KC_FN4,NO_AT, + NO_APOS, KC_J, KC_L, KC_U, KC_Y, NO_AA, NO_AE , + KC_H, KC_N, KC_E, KC_I, KC_O, NO_OSLH, + NO_EQL, KC_K, KC_M, KC_RIGHT, KC_DOWN, KC_UP, NO_BSLS, + KC_LEFT, NO_UNDS, NO_AMPR, NO_PIPE, OSL(2), + KC_INSERT, KC_PERC, + KC_DELT, + KC_BSPC,KC_ENT,KC_SPC + ), +/* Keymap 1: Basic layer MAC (Same as pc, except for cmd/ctrl, which are swapped) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | \ | | | { | } | | | | | $ | | | < | > | @ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | ' |------+------+------+------+------+--------| + * | | | | | | |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | |,/Ctrl| | | | ` | |Num/fn| + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | ` | | | | + * ,------|------|------| |------+------+------. + * | | | ´ | | | | | + * | |GUI/. |------| |------| | | + * | | |crtl/,| | | | | + * `--------------------' `--------------------' + */ +[BASE_MAC] = KEYMAP( + KC_TRNS, KC_TRNS,KC_TRNS, NO_LCBR_MAC,NO_RCBR_MAC, 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, NO_GRV_MAC, + KC_FN10, + KC_TRNS,GUI_T(KC_DOT) , CTL_T(KC_COMMA), + // right hand + KC_TRNS, NO_DLR_MAC, KC_TRNS,KC_TRNS,KC_FN8, KC_FN9,NO_AT_MAC, + NO_APOS_MAC, 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, NO_BSLS_MAC, + KC_TRNS, KC_TRNS, KC_TRNS, NO_PIPE_MAC, OSL(2), + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), + +/* Keymap 2: Number ++´ánd Fn layer pc + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | 8 | 7 | 6 | 5 | 9 | | | | | F5 | F6 | F7 | F8 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | 4 | 3 | 2 | 1 | 0 |------| |------| | F1 | F2 | F3 | F4 | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | END | PGDWN| PGUP | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | HOME | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[NUMB_FUNC] = KEYMAP( + NO_ASTR, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + NO_PLUS, KC_8, KC_7,KC_6,KC_5, KC_9 , KC_TRNS, + NO_SLSH , KC_4 , KC_3 , KC_2 , KC_1 , KC_0, + NO_MINS, 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, + // right hand + KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_TRNS, KC_F5, KC_F6 , KC_F7, KC_F8, KC_TRNS, + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_TRNS, + KC_TRNS, KC_HOME, KC_TRNS, KC_END, KC_PGDN, KC_PGUP, KC_TRNS, + KC_HOME, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +) +}; + +enum macro_id { + TILDE_NO, LESS_NO, GRTR_NO, CIRC_NO, ACUT_NO, GRV_NO, LESS_NO_MAC, GRTR_NO_MAC, ACUT_NO_MAC +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_MODS_ONESHOT(MOD_LSFT), // Sticky shift light. Tap for the next keypress to be shifted. Hold for regular shift. + [2] = ACTION_MACRO(TILDE_NO), // Completed ~ character(pc and mac), no space needed. + [3] = ACTION_MACRO(LESS_NO), // < completed on keypress down, to avoid shifting the next character if it is not released first. + [4] = ACTION_MACRO(GRTR_NO), // > completed on keypress down, to avoid shifting the next character if it is not released first. + [5] = ACTION_MACRO(CIRC_NO), // Completed ^ character, no space needed. + [6] = ACTION_MACRO(ACUT_NO), // Completed ´ character, no space needed. + [7] = ACTION_MACRO(GRV_NO), // Completed ` character, no space needed. + [8] = ACTION_MACRO(LESS_NO_MAC), // < completed on keypress down, to avoid same button problem when typing <> quickly + [9] = ACTION_MACRO(GRTR_NO_MAC), // > completed on keypress down, to avoid same button problem when typing <> quickly + [10] = ACTION_MACRO(ACUT_NO_MAC), // Completed ´ character, no space needed +}; + + + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + keyevent_t event = record->event; + + switch (id) { + case TILDE_NO: + return (event.pressed ? MACRO( D(RALT), T(RBRC), U(RALT), T(SPC), END ) : MACRO_NONE); + case LESS_NO: + return (event.pressed ? MACRO( T(NUBS), END ) : MACRO_NONE); + case GRTR_NO: + return (event.pressed ? MACRO( D(LSFT), T(NUBS), U(LSFT), END ) : MACRO_NONE); + case CIRC_NO: + return (event.pressed ? MACRO( D(LSFT), T(RBRC), U(LSFT), T(SPC), END ) : MACRO_NONE); + case ACUT_NO: + return (event.pressed ? MACRO( D(RALT), T(EQL), U(RALT), T(SPC), END ) : MACRO_NONE); + case GRV_NO: + return (event.pressed ? MACRO( D(LSFT), T(EQL), T(SPC), U(LSFT), END ) : MACRO_NONE); + case LESS_NO_MAC: + return (event.pressed ? MACRO( T(GRV), END ) : MACRO_NONE); + case GRTR_NO_MAC: + return (event.pressed ? MACRO( D(LSFT), T(GRV), U(LSFT), END ) : MACRO_NONE); + case ACUT_NO_MAC: + return (event.pressed ? MACRO( T(EQL), T(SPC), END ) : MACRO_NONE); + } + return MACRO_NONE; +}; diff --git a/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md new file mode 100644 index 000000000..aaaec3e53 --- /dev/null +++ b/keyboards/ergodox/keymaps/norwegian_programmer_osx_pc_colemak/readme.md @@ -0,0 +1,30 @@ +# Norwegian Colemak setup with osx/pc toggle + +## Motivation +I wanted a Norwegian Colemak setup that worked in a similar way on both my Mac and PC. I also wanted the keyboard to translate from a standard Norwegian keyboard OS setup. + +## Overview +The setup is created to be programmer friendly. +- Most of the symbols used in code can be activated without using layers or shift key. +- You can reach the IDE/OS shortcut activators(Ctrl, Win/Cmd, Alt, Shift) with the thumb or the wrist. +- Navigation is prioritized, arrows below the home row. + +## PC/Mac toggle +The default setup is for Norwegian keyboard setting(not colemak software variants) on a PC(Windows or Linux) or Mac. Use the Mac/PC toggle button to switch between OSX and PC setup. The settings will be reverted to PC setup each time you restart/connect the keyboard. + +## Layers +Since symbols are prioritized in this setup, numbers and function keys are on a new layer. The easiest way to use the layer switch(and also the alt key), is to push your hand right below the little finger, on the key. You will then have all your fingers free to type numbers or press function keys. + +## Tap-shift +Tap for the next character to be shifted, hold down for regular shift. + +## Comma dot and escape +Comma, dot and escape share buttons with modifier keys. Tap to access these keys, hold down to use the keys as modifier keys. + +## Numpad symbols ++-/* are implemented with the numpad keycodes. The benefit is that they will work better with shortcuts in certain programs. For some reason, the default setting in the osx terminal is to not accept numpad characters for '/' and '-'. For a solution, see https://discussions.apple.com/thread/6613968?start=0&tstart=0. +If you really need the norwegian symbols in a program, you can access them using the number toggle button. + +## Layout + +![keyboard-layout](keyboard-layout.png) -- cgit v1.2.3 From da16733e7ab66ebd27fde21312990f5733966a52 Mon Sep 17 00:00:00 2001 From: Roman Zolotarev Date: Wed, 7 Sep 2016 07:55:22 +0800 Subject: Change CTL_T(KC_ESC) to KC_LCTRL and update readme --- .../keymaps/romanzolotarev-norman-osx/keymap.c | 30 +++++++++--------- .../keymaps/romanzolotarev-norman-osx/readme.md | 37 +++++++++++++++------- 2 files changed, 40 insertions(+), 27 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c index 24d0c4ecb..2c6430440 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c +++ b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/keymap.c @@ -6,23 +6,23 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( - KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5, - KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS, - CTL_T(KC_ESC), KC_A, KC_S, KC_E, KC_T, KC_G, - KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, - KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, - /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT, + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_F5, + KC_TAB, KC_Q, KC_W, KC_D, KC_F, KC_K, KC_BSLS, + KC_LCTRL, KC_A, KC_S, KC_E, KC_T, KC_G, + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, + KC_F1, KC_F2, KC_F3, KC_F4, KC_LGUI, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLD, KC_MUTE, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_VOLU, + /*-*/ /*-*/ /*-*/ /*-*/ /*-*/ KC_BSPC, CTL_T(KC_ESC), KC_LALT, // - /*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, - /*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, - /*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT, - /*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, - /*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, - KC_MPLY, KC_MNXT, + /*-*/ KC_F6, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, + /*-*/ KC_NO, KC_J, KC_U, KC_R, KC_L, KC_SCLN, KC_MINS, + /*-*/ /*-*/ KC_Y, KC_N, KC_I, KC_O, KC_H, KC_ENT, + /*-*/ KC_RBRC, KC_P, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, + /*-*/ /*-*/ /*-*/ KC_RGUI, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, + KC_MPLY, KC_MNXT, KC_MPRV, - KC_RALT, KC_QUOT, KC_SPC + KC_RALT, KC_QUOT, KC_SPC ) }; diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md index 80475ab21..a86061285 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md +++ b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md @@ -1,28 +1,41 @@ # Roman's Layout -There is only one layer based on [Norman layout](https://normanlayout.info/). +There is only one layer, and it is based on [Norman +layout](https://normanlayout.info/). Looking for multiple-layer layouts? -- [Symbols, arrows, plover, HJKL arrows](../romanzolotarev-norman-plover-osx-hjkl/) +- [Symbols, arrows, plover, HJKL + arrows](../romanzolotarev-norman-plover-osx-hjkl/) - [Same with IJKL arrows](../romanzolotarev-norman-plover-osx/) [![keyboard-layout](romanzolotarev-norman-osx.png)](http://www.keyboard-layout-editor.com/#/gists/9e89d54f1ea6eeeb7dab1b2d19d28195) -## Functional Keys +## How to use Vim key -- Tap `F1` to mute microphone via [Shush](http://mizage.com/shush/). -- Tap `F2` to copy screenshot to the clipboard. -- Hold `SHIFT` and tap `F2` to save screenshot as a file. -- Tap `F3`, `F4`, `F5`, `F6` to resize a window via [Divvy](http://mizage.com/divvy/). - -## CTRL/ESC - -CTRL and ESC are frequently used in Vim. +It is `CTL_T(KC_ESC)` and it works this way: - Tap `CTRL/ESC` to send `ESC`. - Hold `CTRL/ESC` to use as `CTRL`. -## Activate N-rollover +## How to activate N-rollover - Hold left `SHIFT` and right `SHIRT` and then tap `N`. + +## How to make and flash on OS X + +First you need to install few brew packages. + +```bash +brew tap osx-cross/avr +brew install dfu-programmer avr-libc teensy_loader_cli +``` + +Then you can clone this repository, make and flash your ErgoDox. + +```bash +git clone https://github.com/romanzolotarev/qmk_firmware +cd qmk_firmware/keyboards/ergodox +# Optionally tweak ./keymaps/romanzolotarev-norman-osx/keymap.c +SLEEP_LED_ENABLED=no KEYMAP=romanzolotarev-norman-osx make teensy +``` -- cgit v1.2.3 From 1406118c7123359cd66d589d22d6ecfa268e3a24 Mon Sep 17 00:00:00 2001 From: profet23 Date: Tue, 6 Sep 2016 21:59:23 -0400 Subject: Removing separate ergodox80 project. Created KEYMAP_80 in ez.h to support 80 key ergodoxes. Creating default_80 keymap as ez keymap. --- keyboards/ergodox/ez/ez.h | 41 ++ .../ergodox/ez/keymaps/default_80/ergodox80.png | Bin 0 -> 20663 bytes keyboards/ergodox/ez/keymaps/default_80/keymap.c | 183 ++++++ keyboards/ergodox/ez/keymaps/default_80/readme.md | 10 + keyboards/ergodox80/Makefile | 5 - keyboards/ergodox80/config.h | 31 - keyboards/ergodox80/ergodox80.c | 0 keyboards/ergodox80/ergodox80.h | 5 - keyboards/ergodox80/ergodox80/190hotfix.sh | 19 - keyboards/ergodox80/ergodox80/Makefile | 3 - keyboards/ergodox80/ergodox80/config.h | 65 -- keyboards/ergodox80/ergodox80/ergodox80.c | 85 --- keyboards/ergodox80/ergodox80/ergodox80.h | 122 ---- keyboards/ergodox80/ergodox80/i2cmaster.h | 178 ------ keyboards/ergodox80/ergodox80/matrix.c | 382 ----------- keyboards/ergodox80/ergodox80/rules.mk | 76 --- keyboards/ergodox80/ergodox80/twimaster.c | 208 ------ .../ergodox80/ergodox80/util/compile_keymap.py | 710 --------------------- keyboards/ergodox80/ergodox80/util/readme.md | 3 - keyboards/ergodox80/keymaps/default/keymap.c | 183 ------ keyboards/ergodox80/readme.md | 6 - keyboards/ergodox80/rules.mk | 28 - 22 files changed, 234 insertions(+), 2109 deletions(-) create mode 100644 keyboards/ergodox/ez/keymaps/default_80/ergodox80.png create mode 100644 keyboards/ergodox/ez/keymaps/default_80/keymap.c create mode 100644 keyboards/ergodox/ez/keymaps/default_80/readme.md delete mode 100644 keyboards/ergodox80/Makefile delete mode 100644 keyboards/ergodox80/config.h delete mode 100644 keyboards/ergodox80/ergodox80.c delete mode 100644 keyboards/ergodox80/ergodox80.h delete mode 100755 keyboards/ergodox80/ergodox80/190hotfix.sh delete mode 100644 keyboards/ergodox80/ergodox80/Makefile delete mode 100644 keyboards/ergodox80/ergodox80/config.h delete mode 100644 keyboards/ergodox80/ergodox80/ergodox80.c delete mode 100644 keyboards/ergodox80/ergodox80/ergodox80.h delete mode 100644 keyboards/ergodox80/ergodox80/i2cmaster.h delete mode 100644 keyboards/ergodox80/ergodox80/matrix.c delete mode 100644 keyboards/ergodox80/ergodox80/rules.mk delete mode 100644 keyboards/ergodox80/ergodox80/twimaster.c delete mode 100644 keyboards/ergodox80/ergodox80/util/compile_keymap.py delete mode 100644 keyboards/ergodox80/ergodox80/util/readme.md delete mode 100644 keyboards/ergodox80/keymaps/default/keymap.c delete mode 100644 keyboards/ergodox80/readme.md delete mode 100644 keyboards/ergodox80/rules.mk (limited to 'keyboards') diff --git a/keyboards/ergodox/ez/ez.h b/keyboards/ergodox/ez/ez.h index db4ec867b..124bf850e 100644 --- a/keyboards/ergodox/ez/ez.h +++ b/keyboards/ergodox/ez/ez.h @@ -119,4 +119,45 @@ inline void ergodox_led_all_set(uint8_t n) { k0D, k1D, k2D, k3D, k4D, KC_NO } \ } +#define KEYMAP_80( \ + \ + /* left hand, spatial positions */ \ + k00,k01,k02,k03,k04,k05,k06, \ + k10,k11,k12,k13,k14,k15,k16, \ + k20,k21,k22,k23,k24,k25, \ + k30,k31,k32,k33,k34,k35,k36, \ + k40,k41,k42,k43,k44, \ + k55,k56, \ + k45,k46,k54, \ + k53,k52,k51, \ + \ + /* right hand, spatial positions */ \ + k07,k08,k09,k0A,k0B,k0C,k0D, \ + k17,k18,k19,k1A,k1B,k1C,k1D, \ + k28,k29,k2A,k2B,k2C,k2D, \ + k37,k38,k39,k3A,k3B,k3C,k3D, \ + k49,k4A,k4B,k4C,k4D, \ + k57,k58, \ + k59,k47,k48, \ + k5C,k5B,k5A ) \ + \ + /* matrix positions */ \ + { \ + { k00, k10, k20, k30, k40, KC_NO }, \ + { k01, k11, k21, k31, k41, k51 }, \ + { k02, k12, k22, k32, k42, k52 }, \ + { k03, k13, k23, k33, k43, k53 }, \ + { k04, k14, k24, k34, k44, k54 }, \ + { k05, k15, k25, k35, k45, k55 }, \ + { k06, k16, KC_NO, k36, k46, k56 }, \ + \ + { k07, k17, KC_NO, k37, k47, k57 }, \ + { k08, k18, k28, k38, k48, k58 }, \ + { k09, k19, k29, k39, k49, k59 }, \ + { k0A, k1A, k2A, k3A, k4A, k5A }, \ + { k0B, k1B, k2B, k3B, k4B, k5B }, \ + { k0C, k1C, k2C, k3C, k4C, k5C }, \ + { k0D, k1D, k2D, k3D, k4D, KC_NO } \ + } + #endif diff --git a/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png b/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png new file mode 100644 index 000000000..66b9752eb Binary files /dev/null and b/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png differ diff --git a/keyboards/ergodox/ez/keymaps/default_80/keymap.c b/keyboards/ergodox/ez/keymaps/default_80/keymap.c new file mode 100644 index 000000000..505ff2972 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/default_80/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | 1 | 2 | Home | | PgUp | 3 | 4 | + * |------|------|------| |------|--------|------| + * | Space| BkSp | End | | PgDn | Tab |Enter | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP_80( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_1, KC_2, KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP,KC_3, KC_4, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP_80( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,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, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+----------. + * | | | | | | | | + * |------|------|------| |------|------|----------| + * | | | | | | |BrwserBack| + * `--------------------' `------------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP_80( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +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) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/ez/keymaps/default_80/readme.md b/keyboards/ergodox/ez/keymaps/default_80/readme.md new file mode 100644 index 000000000..b6bbb86d2 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/default_80/readme.md @@ -0,0 +1,10 @@ +# ErgoDox 80 Default Configuration + +This is based on the default Ergodox EZ keymap. +The difference is that this keymap supports 80 key layouts. +If you own an 80 key Ergodox, use this as an example to get your desired keymap. + +**NOTE:** This layout is not physically supported by the Ergodox EZ. + + +![Default80](ergodox80.png) diff --git a/keyboards/ergodox80/Makefile b/keyboards/ergodox80/Makefile deleted file mode 100644 index 94fa847ff..000000000 --- a/keyboards/ergodox80/Makefile +++ /dev/null @@ -1,5 +0,0 @@ -SUBPROJECT_DEFAULT = ergodox80 - -ifndef MAKEFILE_INCLUDED - include ../../Makefile -endif diff --git a/keyboards/ergodox80/config.h b/keyboards/ergodox80/config.h deleted file mode 100644 index 5dd6daa15..000000000 --- a/keyboards/ergodox80/config.h +++ /dev/null @@ -1,31 +0,0 @@ -#ifndef KEYBOARDS_ERGODOX_CONFIG_H_ -#define KEYBOARDS_ERGODOX_CONFIG_H_ - -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 3 -#define MOUSEKEY_TIME_TO_MAX 10 - -#define TAPPING_TOGGLE 1 - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ -) - -#include "ergodox80/config.h" - - -#endif /* KEYBOARDS_ERGODOX_CONFIG_H_ */ diff --git a/keyboards/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80.c deleted file mode 100644 index e69de29bb..000000000 diff --git a/keyboards/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80.h deleted file mode 100644 index ea40f4d45..000000000 --- a/keyboards/ergodox80/ergodox80.h +++ /dev/null @@ -1,5 +0,0 @@ -#ifndef KEYBOARDS_ERGODOX_ERGODOX_H_ -#define KEYBOARDS_ERGODOX_ERGODOX_H_ -#include "ergodox80.h" - -#endif /* KEYBOARDS_ERGODOX_ERGODOX_H_ */ diff --git a/keyboards/ergodox80/ergodox80/190hotfix.sh b/keyboards/ergodox80/ergodox80/190hotfix.sh deleted file mode 100755 index bdc3adce2..000000000 --- a/keyboards/ergodox80/ergodox80/190hotfix.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -#a tool to fix broken keymaps as a result of pull request #190 -#changing the declaration of matrix_scan_user() and matrix_init_user() -# -#This script will save a copy of the specified keymap as keymap.c.bak -#and then create a new keymap.c with the definion corrected. -#this script must be run from the ergodox_ez directory -if [ $# -ne 1 ]; then - echo $0: usage: ./190hotfix keymap_name - exit 1 -fi - -echo Saving backup as ./keymaps/$1/keymap.c.bak ... -mv ./keymaps/$1/keymap.c ./keymaps/$1/keymap.c.bak - -echo Modifying ./keymaps/$1/keymap.c ... -cat ./keymaps/$1/keymap.c.bak | sed -r 's/^void \* matrix_/void matrix_/'>./keymaps/$1/keymap.c - -echo Complete! diff --git a/keyboards/ergodox80/ergodox80/Makefile b/keyboards/ergodox80/ergodox80/Makefile deleted file mode 100644 index 191c6bb66..000000000 --- a/keyboards/ergodox80/ergodox80/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -ifndef MAKEFILE_INCLUDED - include ../../../Makefile -endif \ No newline at end of file diff --git a/keyboards/ergodox80/ergodox80/config.h b/keyboards/ergodox80/ergodox80/config.h deleted file mode 100644 index 084a044ee..000000000 --- a/keyboards/ergodox80/ergodox80/config.h +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2013 Oleg Kostyuk - -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 . -*/ - -#ifndef ERGODOX_EZ_CONFIG_H -#define ERGODOX_EZ_CONFIG_H - -#include "../config.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1307 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ErgoDox EZ -#define PRODUCT ErgoDox EZ -#define DESCRIPTION QMK keyboard firmware for Ergodox EZ - -/* key matrix size */ -#define MATRIX_ROWS 14 -#define MATRIX_COLS 6 - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -#define LED_BRIGHTNESS_LO 15 -#define LED_BRIGHTNESS_HI 255 - - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 5 - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION -//#define DEBUG_MATRIX_SCAN_RATE - -#endif diff --git a/keyboards/ergodox80/ergodox80/ergodox80.c b/keyboards/ergodox80/ergodox80/ergodox80.c deleted file mode 100644 index b21b1073b..000000000 --- a/keyboards/ergodox80/ergodox80/ergodox80.c +++ /dev/null @@ -1,85 +0,0 @@ -#include "ergodox80.h" -#include "i2cmaster.h" - -bool i2c_initialized = 0; -uint8_t mcp23018_status = 0x20; - -void matrix_init_kb(void) { - // keyboard LEDs (see "PWM on ports OC1(A|B|C)" in "teensy-2-0.md") - TCCR1A = 0b10101001; // set and configure fast PWM - TCCR1B = 0b00001001; // set and configure fast PWM - - // (tied to Vcc for hardware convenience) - DDRB &= ~(1<<4); // set B(4) as input - PORTB &= ~(1<<4); // set B(4) internal pull-up disabled - - // unused pins - C7, D4, D5, D7, E6 - // set as input with internal pull-ip enabled - DDRC &= ~(1<<7); - DDRD &= ~(1<<7 | 1<<5 | 1<<4); - DDRE &= ~(1<<6); - PORTC |= (1<<7); - PORTD |= (1<<7 | 1<<5 | 1<<4); - PORTE |= (1<<6); - - ergodox_blink_all_leds(); - - matrix_init_user(); -} - -void ergodox_blink_all_leds(void) -{ - ergodox_led_all_off(); - ergodox_led_all_set(LED_BRIGHTNESS_HI); - ergodox_right_led_1_on(); - _delay_ms(50); - ergodox_right_led_2_on(); - _delay_ms(50); - ergodox_right_led_3_on(); - _delay_ms(50); - ergodox_right_led_1_off(); - _delay_ms(50); - ergodox_right_led_2_off(); - _delay_ms(50); - ergodox_right_led_3_off(); - //ergodox_led_all_on(); - //_delay_ms(333); - ergodox_led_all_off(); -} - -uint8_t init_mcp23018(void) { - mcp23018_status = 0x20; - - // I2C subsystem - if (i2c_initialized == 0) { - i2c_init(); // on pins D(1,0) - i2c_initialized++; - _delay_ms(1000); - } - - // set pin direction - // - unused : input : 1 - // - input : input : 1 - // - driving : output : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(IODIRA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; - i2c_stop(); - - // set pull-up - // - unused : on : 1 - // - input : on : 1 - // - driving : off : 0 - mcp23018_status = i2c_start(I2C_ADDR_WRITE); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(GPPUA); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00000000); if (mcp23018_status) goto out; - mcp23018_status = i2c_write(0b00111111); if (mcp23018_status) goto out; - -out: - i2c_stop(); - - return mcp23018_status; -} - - diff --git a/keyboards/ergodox80/ergodox80/ergodox80.h b/keyboards/ergodox80/ergodox80/ergodox80.h deleted file mode 100644 index 8012b0a74..000000000 --- a/keyboards/ergodox80/ergodox80/ergodox80.h +++ /dev/null @@ -1,122 +0,0 @@ -#ifndef ERGODOX_EZ_H -#define ERGODOX_EZ_H - -#include "quantum.h" -#include -#include -#include "i2cmaster.h" -#include - -#define CPU_PRESCALE(n) (CLKPR = 0x80, CLKPR = (n)) -#define CPU_16MHz 0x00 - -// I2C aliases and register addresses (see "mcp23018.md") -#define I2C_ADDR 0b0100000 -#define I2C_ADDR_WRITE ( (I2C_ADDR<<1) | I2C_WRITE ) -#define I2C_ADDR_READ ( (I2C_ADDR<<1) | I2C_READ ) -#define IODIRA 0x00 // i/o direction register -#define IODIRB 0x01 -#define GPPUA 0x0C // GPIO pull-up resistor register -#define GPPUB 0x0D -#define GPIOA 0x12 // general purpose i/o port register (write modifies OLAT) -#define GPIOB 0x13 -#define OLATA 0x14 // output latch register -#define OLATB 0x15 - -extern uint8_t mcp23018_status; - -void init_ergodox(void); -void ergodox_blink_all_leds(void); -uint8_t init_mcp23018(void); -uint8_t ergodox_left_leds_update(void); - -#define LED_BRIGHTNESS_LO 15 -#define LED_BRIGHTNESS_HI 255 - - -inline void ergodox_board_led_on(void) { DDRD |= (1<<6); PORTD |= (1<<6); } -inline void ergodox_right_led_1_on(void) { DDRB |= (1<<5); PORTB |= (1<<5); } -inline void ergodox_right_led_2_on(void) { DDRB |= (1<<6); PORTB |= (1<<6); } -inline void ergodox_right_led_3_on(void) { DDRB |= (1<<7); PORTB |= (1<<7); } -inline void ergodox_right_led_on(uint8_t led) { DDRB |= (1<<(led+4)); PORTB |= (1<<(led+4)); } - -inline void ergodox_board_led_off(void) { DDRD &= ~(1<<6); PORTD &= ~(1<<6); } -inline void ergodox_right_led_1_off(void) { DDRB &= ~(1<<5); PORTB &= ~(1<<5); } -inline void ergodox_right_led_2_off(void) { DDRB &= ~(1<<6); PORTB &= ~(1<<6); } -inline void ergodox_right_led_3_off(void) { DDRB &= ~(1<<7); PORTB &= ~(1<<7); } -inline void ergodox_right_led_off(uint8_t led) { DDRB &= ~(1<<(led+4)); PORTB &= ~(1<<(led+4)); } - -inline void ergodox_led_all_on(void) -{ - ergodox_board_led_on(); - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - ergodox_right_led_3_on(); -} - -inline void ergodox_led_all_off(void) -{ - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); -} - -inline void ergodox_right_led_1_set(uint8_t n) { OCR1A = n; } -inline void ergodox_right_led_2_set(uint8_t n) { OCR1B = n; } -inline void ergodox_right_led_3_set(uint8_t n) { OCR1C = n; } -inline void ergodox_right_led_set(uint8_t led, uint8_t n) { - (led == 1) ? (OCR1A = n) : - (led == 2) ? (OCR1B = n) : - (OCR1C = n); -} - -inline void ergodox_led_all_set(uint8_t n) -{ - ergodox_right_led_1_set(n); - ergodox_right_led_2_set(n); - ergodox_right_led_3_set(n); -} - -#define KEYMAP( \ - \ - /* left hand, spatial positions */ \ - k00,k01,k02,k03,k04,k05,k06, \ - k10,k11,k12,k13,k14,k15,k16, \ - k20,k21,k22,k23,k24,k25, \ - k30,k31,k32,k33,k34,k35,k36, \ - k40,k41,k42,k43,k44, \ - k55,k56, \ - k45,k46,k54, \ - k53,k52,k51, \ - \ - /* right hand, spatial positions */ \ - k07,k08,k09,k0A,k0B,k0C,k0D, \ - k17,k18,k19,k1A,k1B,k1C,k1D, \ - k28,k29,k2A,k2B,k2C,k2D, \ - k37,k38,k39,k3A,k3B,k3C,k3D, \ - k49,k4A,k4B,k4C,k4D, \ - k57,k58, \ - k59,k47,k48, \ - k5C,k5B,k5A ) \ - \ - /* matrix positions */ \ - { \ - { k00, k10, k20, k30, k40, KC_NO }, \ - { k01, k11, k21, k31, k41, k51 }, \ - { k02, k12, k22, k32, k42, k52 }, \ - { k03, k13, k23, k33, k43, k53 }, \ - { k04, k14, k24, k34, k44, k54 }, \ - { k05, k15, k25, k35, k45, k55 }, \ - { k06, k16, KC_NO, k36, k46, k56 }, \ - \ - { k07, k17, KC_NO, k37, k47, k57 }, \ - { k08, k18, k28, k38, k48, k58 }, \ - { k09, k19, k29, k39, k49, k59 }, \ - { k0A, k1A, k2A, k3A, k4A, k5A }, \ - { k0B, k1B, k2B, k3B, k4B, k5B }, \ - { k0C, k1C, k2C, k3C, k4C, k5C }, \ - { k0D, k1D, k2D, k3D, k4D, KC_NO } \ - } - -#endif diff --git a/keyboards/ergodox80/ergodox80/i2cmaster.h b/keyboards/ergodox80/ergodox80/i2cmaster.h deleted file mode 100644 index 3917b9e6c..000000000 --- a/keyboards/ergodox80/ergodox80/i2cmaster.h +++ /dev/null @@ -1,178 +0,0 @@ -#ifndef _I2CMASTER_H -#define _I2CMASTER_H 1 -/************************************************************************* -* Title: C include file for the I2C master interface -* (i2cmaster.S or twimaster.c) -* Author: Peter Fleury http://jump.to/fleury -* File: $Id: i2cmaster.h,v 1.10 2005/03/06 22:39:57 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device -* Usage: see Doxygen manual -**************************************************************************/ - -#ifdef DOXYGEN -/** - @defgroup pfleury_ic2master I2C Master library - @code #include @endcode - - @brief I2C (TWI) Master Software Library - - Basic routines for communicating with I2C slave devices. This single master - implementation is limited to one bus master on the I2C bus. - - This I2c library is implemented as a compact assembler software implementation of the I2C protocol - which runs on any AVR (i2cmaster.S) and as a TWI hardware interface for all AVR with built-in TWI hardware (twimaster.c). - Since the API for these two implementations is exactly the same, an application can be linked either against the - software I2C implementation or the hardware I2C implementation. - - Use 4.7k pull-up resistor on the SDA and SCL pin. - - Adapt the SCL and SDA port and pin definitions and eventually the delay routine in the module - i2cmaster.S to your target when using the software I2C implementation ! - - Adjust the CPU clock frequence F_CPU in twimaster.c or in the Makfile when using the TWI hardware implementaion. - - @note - The module i2cmaster.S is based on the Atmel Application Note AVR300, corrected and adapted - to GNU assembler and AVR-GCC C call interface. - Replaced the incorrect quarter period delays found in AVR300 with - half period delays. - - @author Peter Fleury pfleury@gmx.ch http://jump.to/fleury - - @par API Usage Example - The following code shows typical usage of this library, see example test_i2cmaster.c - - @code - - #include - - - #define Dev24C02 0xA2 // device address of EEPROM 24C02, see datasheet - - int main(void) - { - unsigned char ret; - - i2c_init(); // initialize I2C library - - // write 0x75 to EEPROM address 5 (Byte Write) - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - i2c_write(0x05); // write address = 5 - i2c_write(0x75); // write value 0x75 to EEPROM - i2c_stop(); // set stop conditon = release bus - - - // read previously written value back from EEPROM address 5 - i2c_start_wait(Dev24C02+I2C_WRITE); // set device address and write mode - - i2c_write(0x05); // write address = 5 - i2c_rep_start(Dev24C02+I2C_READ); // set device address and read mode - - ret = i2c_readNak(); // read one byte from EEPROM - i2c_stop(); - - for(;;); - } - @endcode - -*/ -#endif /* DOXYGEN */ - -/**@{*/ - -#if (__GNUC__ * 100 + __GNUC_MINOR__) < 304 -#error "This library requires AVR-GCC 3.4 or later, update to newer AVR-GCC compiler !" -#endif - -#include - -/** defines the data direction (reading from I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_READ 1 - -/** defines the data direction (writing to I2C device) in i2c_start(),i2c_rep_start() */ -#define I2C_WRITE 0 - - -/** - @brief initialize the I2C master interace. Need to be called only once - @param void - @return none - */ -extern void i2c_init(void); - - -/** - @brief Terminates the data transfer and releases the I2C bus - @param void - @return none - */ -extern void i2c_stop(void); - - -/** - @brief Issues a start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_start(unsigned char addr); - - -/** - @brief Issues a repeated start condition and sends address and transfer direction - - @param addr address and transfer direction of I2C device - @retval 0 device accessible - @retval 1 failed to access device - */ -extern unsigned char i2c_rep_start(unsigned char addr); - - -/** - @brief Issues a start condition and sends address and transfer direction - - If device is busy, use ack polling to wait until device ready - @param addr address and transfer direction of I2C device - @return none - */ -extern void i2c_start_wait(unsigned char addr); - - -/** - @brief Send one byte to I2C device - @param data byte to be transfered - @retval 0 write successful - @retval 1 write failed - */ -extern unsigned char i2c_write(unsigned char data); - - -/** - @brief read one byte from the I2C device, request more data from device - @return byte read from I2C device - */ -extern unsigned char i2c_readAck(void); - -/** - @brief read one byte from the I2C device, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_readNak(void); - -/** - @brief read one byte from the I2C device - - Implemented as a macro, which calls either i2c_readAck or i2c_readNak - - @param ack 1 send ack, request more data from device
- 0 send nak, read is followed by a stop condition - @return byte read from I2C device - */ -extern unsigned char i2c_read(unsigned char ack); -#define i2c_read(ack) (ack) ? i2c_readAck() : i2c_readNak(); - - -/**@}*/ -#endif diff --git a/keyboards/ergodox80/ergodox80/matrix.c b/keyboards/ergodox80/ergodox80/matrix.c deleted file mode 100644 index c352924b5..000000000 --- a/keyboards/ergodox80/ergodox80/matrix.c +++ /dev/null @@ -1,382 +0,0 @@ -/* - -Note for ErgoDox EZ customizers: Here be dragons! -This is not a file you want to be messing with. -All of the interesting stuff for you is under keymaps/ :) -Love, Erez - -Copyright 2013 Oleg Kostyuk - -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 . -*/ - -/* - * scan matrix - */ -#include -#include -#include -#include "wait.h" -#include "action_layer.h" -#include "print.h" -#include "debug.h" -#include "util.h" -#include "matrix.h" -#include "ergodox80.h" -#include "i2cmaster.h" -#ifdef DEBUG_MATRIX_SCAN_RATE -#include "timer.h" -#endif - -/* - * This constant define not debouncing time in msecs, but amount of matrix - * scan loops which should be made to get stable debounced results. - * - * On Ergodox matrix scan rate is relatively low, because of slow I2C. - * Now it's only 317 scans/second, or about 3.15 msec/scan. - * According to Cherry specs, debouncing time is 5 msec. - * - * And so, there is no sense to have DEBOUNCE higher than 2. - */ - -#ifndef DEBOUNCE -# define DEBOUNCE 5 -#endif -static uint8_t debouncing = DEBOUNCE; - -/* matrix state(1:on, 0:off) */ -static matrix_row_t matrix[MATRIX_ROWS]; -static matrix_row_t matrix_debouncing[MATRIX_ROWS]; - -static matrix_row_t read_cols(uint8_t row); -static void init_cols(void); -static void unselect_rows(void); -static void select_row(uint8_t row); - -static uint8_t mcp23018_reset_loop; - -#ifdef DEBUG_MATRIX_SCAN_RATE -uint32_t matrix_timer; -uint32_t matrix_scan_count; -#endif - - -__attribute__ ((weak)) -void matrix_init_user(void) {} - -__attribute__ ((weak)) -void matrix_scan_user(void) {} - -__attribute__ ((weak)) -void matrix_init_kb(void) { - matrix_init_user(); -} - -__attribute__ ((weak)) -void matrix_scan_kb(void) { - matrix_scan_user(); -} - -inline -uint8_t matrix_rows(void) -{ - return MATRIX_ROWS; -} - -inline -uint8_t matrix_cols(void) -{ - return MATRIX_COLS; -} - -void matrix_init(void) -{ - // initialize row and col - - mcp23018_status = init_mcp23018(); - - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - - matrix_init_kb(); - -} - -void matrix_power_up(void) { - mcp23018_status = init_mcp23018(); - - unselect_rows(); - init_cols(); - - // initialize matrix state: all keys off - for (uint8_t i=0; i < MATRIX_ROWS; i++) { - matrix[i] = 0; - matrix_debouncing[i] = 0; - } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_timer = timer_read32(); - matrix_scan_count = 0; -#endif - -} - -uint8_t matrix_scan(void) -{ - if (mcp23018_status) { // if there was an error - if (++mcp23018_reset_loop == 0) { - // since mcp23018_reset_loop is 8 bit - we'll try to reset once in 255 matrix scans - // this will be approx bit more frequent than once per second - print("trying to reset mcp23018\n"); - mcp23018_status = init_mcp23018(); - if (mcp23018_status) { - print("left side not responding\n"); - } else { - print("left side attached\n"); - ergodox_blink_all_leds(); - } - } - } - -#ifdef DEBUG_MATRIX_SCAN_RATE - matrix_scan_count++; - - uint32_t timer_now = timer_read32(); - if (TIMER_DIFF_32(timer_now, matrix_timer)>1000) { - print("matrix scan frequency: "); - pdec(matrix_scan_count); - print("\n"); - - matrix_timer = timer_now; - matrix_scan_count = 0; - } -#endif - - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - select_row(i); - wait_us(30); // without this wait read unstable value. - matrix_row_t cols = read_cols(i); - if (matrix_debouncing[i] != cols) { - matrix_debouncing[i] = cols; - if (debouncing) { - debug("bounce!: "); debug_hex(debouncing); debug("\n"); - } - debouncing = DEBOUNCE; - } - unselect_rows(); - } - - if (debouncing) { - if (--debouncing) { - wait_us(1); - // this should be wait_ms(1) but has been left as-is at EZ's request - } else { - for (uint8_t i = 0; i < MATRIX_ROWS; i++) { - matrix[i] = matrix_debouncing[i]; - } - } - } - - matrix_scan_quantum(); - - return 1; -} - -bool matrix_is_modified(void) -{ - if (debouncing) return false; - return true; -} - -inline -bool matrix_is_on(uint8_t row, uint8_t col) -{ - return (matrix[row] & ((matrix_row_t)1< http://jump.to/fleury -* File: $Id: twimaster.c,v 1.3 2005/07/02 11:14:21 Peter Exp $ -* Software: AVR-GCC 3.4.3 / avr-libc 1.2.3 -* Target: any AVR device with hardware TWI -* Usage: API compatible with I2C Software Library i2cmaster.h -**************************************************************************/ -#include -#include - -#include - - -/* define CPU frequency in Mhz here if not defined in Makefile */ -#ifndef F_CPU -#define F_CPU 16000000UL -#endif - -/* I2C clock in Hz */ -#define SCL_CLOCK 400000L - - -/************************************************************************* - Initialization of the I2C bus interface. Need to be called only once -*************************************************************************/ -void i2c_init(void) -{ - /* initialize TWI clock - * minimal values in Bit Rate Register (TWBR) and minimal Prescaler - * bits in the TWI Status Register should give us maximal possible - * I2C bus speed - about 444 kHz - * - * for more details, see 20.5.2 in ATmega16/32 secification - */ - - TWSR = 0; /* no prescaler */ - TWBR = 10; /* must be >= 10 for stable operation */ - -}/* i2c_init */ - - -/************************************************************************* - Issues a start condition and sends address and transfer direction. - return 0 = device accessible, 1= failed to access device -*************************************************************************/ -unsigned char i2c_start(unsigned char address) -{ - uint8_t twst; - - // send START condition - TWCR = (1<= 0: - if section['name'] == 'layout_config': - config.update(loads("\n".join( - section['code_lines'] - ))) - elif section['sub_name'].startswith('layer'): - layer_name = section['sub_name'] - config['layer_lines'][layer_name] = section['code_lines'] - - reset_section() - - def amend_section(line_index, line): - section['end_line'] = line_index - section['code_lines'].append(line) - - config = DEFAULT_CONFIG.copy() - config.update({ - 'layer_lines': collections.OrderedDict(), - 'macro_ids': {'UM'}, - 'unicode_macros': {}, - }) - - section = {} - reset_section() - - with io.open(path, encoding="utf-8") as fh: - for i, line in enumerate(fh): - if line.startswith("#"): - start_section(i, line) - elif line.startswith(" "): - amend_section(i, line[4:]) - else: - # TODO: maybe parse description - pass - - end_section() - assert 'layout' in config - return config - -# header file parsing - -IF0_RE = re.compile(r""" - ^ - #if 0 - $.*? - #endif -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -COMMENT_RE = re.compile(r""" - /\* - .*? - \*/" -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -def read_header_file(path): - with io.open(path, encoding="utf-8") as fh: - data = fh.read() - data, _ = COMMENT_RE.subn("", data) - data, _ = IF0_RE.subn("", data) - return data - - -def regex_partial(re_str_fmt, flags): - def partial(*args, **kwargs): - re_str = re_str_fmt.format(*args, **kwargs) - return re.compile(re_str, flags) - return partial - - -KEYDEF_REP = regex_partial(r""" - #define - \s - ( - (?:{}) # the prefixes - (?:\w+) # the key name - ) # capture group end -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -ENUM_RE = re.compile(r""" - ( - enum - \s\w+\s - \{ - .*? # the enum content - \} - ; - ) # capture group end -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -ENUM_KEY_REP = regex_partial(r""" - ( - {} # the prefixes - \w+ # the key name - ) # capture group end -""", re.MULTILINE | re.DOTALL | re.VERBOSE) - - -def parse_keydefs(config, data): - prefix_options = "|".join(config['key_prefixes']) - keydef_re = KEYDEF_REP(prefix_options) - enum_key_re = ENUM_KEY_REP(prefix_options) - for match in keydef_re.finditer(data): - yield match.groups()[0] - - for enum_match in ENUM_RE.finditer(data): - enum = enum_match.groups()[0] - for key_match in enum_key_re.finditer(enum): - yield key_match.groups()[0] - - -def parse_valid_keys(config, out_path): - basepath = os.path.abspath(os.path.join(os.path.dirname(out_path))) - dirpaths = [] - subpaths = [] - while len(subpaths) < 6: - path = os.path.join(basepath, *subpaths) - dirpaths.append(path) - dirpaths.append(os.path.join(path, "tmk_core", "common")) - dirpaths.append(os.path.join(path, "quantum")) - subpaths.append('..') - - includes = set(config['keymaps_includes']) - includes.add("keycode.h") - - valid_keycodes = set() - for dirpath, include in it.product(dirpaths, includes): - include_path = os.path.join(dirpath, include) - if os.path.exists(include_path): - header_data = read_header_file(include_path) - valid_keycodes.update( - parse_keydefs(config, header_data) - ) - return valid_keycodes - - -# Keymap Parsing - -def iter_raw_codes(layer_lines, filler, separator): - filler_re = re.compile("[" + filler + " ]") - for line in layer_lines: - line, _ = filler_re.subn("", line.strip()) - if not line: - continue - codes = line.split(separator) - for code in codes[1:-1]: - yield code - - -def iter_indexed_codes(raw_codes, key_indexes): - key_rows = {} - key_indexes_flat = [] - - for row_index, key_indexes in enumerate(key_indexes): - for key_index in key_indexes: - key_rows[key_index] = row_index - key_indexes_flat.extend(key_indexes) - assert len(raw_codes) == len(key_indexes_flat) - for raw_code, key_index in zip(raw_codes, key_indexes_flat): - # we keep track of the row mostly for layout purposes - yield raw_code, key_index, key_rows[key_index] - - -LAYER_CHANGE_RE = re.compile(r""" - (DF|TG|MO)\(\d+\) -""", re.VERBOSE) - - -MACRO_RE = re.compile(r""" - M\(\w+\) -""", re.VERBOSE) - - -UNICODE_RE = re.compile(r""" - U[0-9A-F]{4} -""", re.VERBOSE) - - -NON_CODE = re.compile(r""" - ^[^A-Z0-9_]$ -""", re.VERBOSE) - - -def parse_uni_code(raw_code): - macro_id = "UC_" + ( - unicodedata.name(raw_code) - .replace(" ", "_") - .replace("-", "_") - ) - code = "M({})".format(macro_id) - uc_hex = "{:04X}".format(ord(raw_code)) - return code, macro_id, uc_hex - - -def parse_key_code(raw_code, key_prefixes, valid_keycodes): - if raw_code in valid_keycodes: - return raw_code - - for prefix in key_prefixes: - code = prefix + raw_code - if code in valid_keycodes: - return code - - -def parse_code(raw_code, key_prefixes, valid_keycodes): - if not raw_code: - return 'KC_TRNS', None, None - - if LAYER_CHANGE_RE.match(raw_code): - return raw_code, None, None - - if MACRO_RE.match(raw_code): - macro_id = raw_code[2:-1] - return raw_code, macro_id, None - - if UNICODE_RE.match(raw_code): - hex_code = raw_code[1:] - return parse_uni_code(chr(int(hex_code, 16))) - - if NON_CODE.match(raw_code): - return parse_uni_code(raw_code) - - code = parse_key_code(raw_code, key_prefixes, valid_keycodes) - return code, None, None - - -def parse_keymap(config, key_indexes, layer_lines, valid_keycodes): - keymap = {} - raw_codes = list(iter_raw_codes( - layer_lines, config['filler'], config['separator'] - )) - indexed_codes = iter_indexed_codes(raw_codes, key_indexes) - key_prefixes = config['key_prefixes'] - for raw_code, key_index, row_index in indexed_codes: - code, macro_id, uc_hex = parse_code( - raw_code, key_prefixes, valid_keycodes - ) - # TODO: line numbers for invalid codes - err_msg = "Could not parse key '{}' on row {}".format( - raw_code, row_index - ) - assert code is not None, err_msg - # print(repr(raw_code), repr(code), macro_id, uc_hex) - if macro_id: - config['macro_ids'].add(macro_id) - if uc_hex: - config['unicode_macros'][macro_id] = uc_hex - keymap[key_index] = (code, row_index) - return keymap - - -def parse_keymaps(config, valid_keycodes): - keymaps = collections.OrderedDict() - key_indexes = config.get( - 'key_indexes', KEYBOARD_LAYOUTS[config['layout']] - ) - # TODO: maybe validate key_indexes - - for layer_name, layer_lines, in config['layer_lines'].items(): - keymaps[layer_name] = parse_keymap( - config, key_indexes, layer_lines, valid_keycodes - ) - return keymaps - -# keymap.c output - -USERCODE = """ -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - case L1: - ergodox_right_led_1_on(); - break; - case L2: - ergodox_right_led_2_on(); - break; - case L3: - ergodox_right_led_3_on(); - break; - case L4: - ergodox_right_led_1_on(); - ergodox_right_led_2_on(); - break; - case L5: - ergodox_right_led_1_on(); - ergodox_right_led_3_on(); - break; - // case L6: - // ergodox_right_led_2_on(); - // ergodox_right_led_3_on(); - // break; - // case L7: - // ergodox_right_led_1_on(); - // ergodox_right_led_2_on(); - // ergodox_right_led_3_on(); - // break; - default: - ergodox_board_led_off(); - break; - } -}; -""" - -MACROCODE = """ -#define UC_MODE_WIN 0 -#define UC_MODE_LINUX 1 -#define UC_MODE_OSX 2 - -// TODO: allow default mode to be configured -static uint16_t unicode_mode = UC_MODE_WIN; - -uint16_t hextokeycode(uint8_t hex) {{ - if (hex == 0x0) {{ - return KC_P0; - }} - if (hex < 0xA) {{ - return KC_P1 + (hex - 0x1); - }} - return KC_A + (hex - 0xA); -}} - -void unicode_action_function(uint16_t hi, uint16_t lo) {{ - switch (unicode_mode) {{ - case UC_MODE_WIN: - register_code(KC_LALT); - - register_code(KC_PPLS); - unregister_code(KC_PPLS); - - register_code(hextokeycode((hi & 0xF0) >> 4)); - unregister_code(hextokeycode((hi & 0xF0) >> 4)); - register_code(hextokeycode((hi & 0x0F))); - unregister_code(hextokeycode((hi & 0x0F))); - register_code(hextokeycode((lo & 0xF0) >> 4)); - unregister_code(hextokeycode((lo & 0xF0) >> 4)); - register_code(hextokeycode((lo & 0x0F))); - unregister_code(hextokeycode((lo & 0x0F))); - - unregister_code(KC_LALT); - break; - case UC_MODE_LINUX: - register_code(KC_LCTL); - register_code(KC_LSFT); - - register_code(KC_U); - unregister_code(KC_U); - - register_code(hextokeycode((hi & 0xF0) >> 4)); - unregister_code(hextokeycode((hi & 0xF0) >> 4)); - register_code(hextokeycode((hi & 0x0F))); - unregister_code(hextokeycode((hi & 0x0F))); - register_code(hextokeycode((lo & 0xF0) >> 4)); - unregister_code(hextokeycode((lo & 0xF0) >> 4)); - register_code(hextokeycode((lo & 0x0F))); - unregister_code(hextokeycode((lo & 0x0F))); - - unregister_code(KC_LCTL); - unregister_code(KC_LSFT); - break; - case UC_MODE_OSX: - break; - }} -}} - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) {{ - if (!record->event.pressed) {{ - return MACRO_NONE; - }} - // MACRODOWN only works in this function - switch(id) {{ - case UM: - unicode_mode = (unicode_mode + 1) % 2; - break; -{macro_cases} -{unicode_macro_cases} - default: - break; - }} - return MACRO_NONE; -}}; -""" - - -UNICODE_MACRO_TEMPLATE = """ -case {macro_id}: - unicode_action_function(0x{hi:02x}, 0x{lo:02x}); - break; -""".strip() - - -def unicode_macro_cases(config): - for macro_id, uc_hex in config['unicode_macros'].items(): - hi = int(uc_hex, 16) >> 8 - lo = int(uc_hex, 16) & 0xFF - unimacro_keys = ", ".join( - "T({})".format( - "KP_" + digit if digit.isdigit() else digit - ) for digit in uc_hex - ) - yield UNICODE_MACRO_TEMPLATE.format( - macro_id=macro_id, hi=hi, lo=lo - ) - - -def iter_keymap_lines(keymap, row_indents=None): - col_widths = {} - col = 0 - # first pass, figure out the column widths - prev_row_index = None - for code, row_index in keymap.values(): - if row_index != prev_row_index: - col = 0 - if row_indents: - col = row_indents[row_index] - col_widths[col] = max(len(code), col_widths.get(col, 0)) - prev_row_index = row_index - col += 1 - - # second pass, yield the cell values - col = 0 - prev_row_index = None - for key_index in sorted(keymap): - code, row_index = keymap[key_index] - if row_index != prev_row_index: - col = 0 - yield "\n" - if row_indents: - for indent_col in range(row_indents[row_index]): - pad = " " * (col_widths[indent_col] - 4) - yield (" /*-*/" + pad) - col = row_indents[row_index] - else: - yield pad - yield " {}".format(code) - if key_index < len(keymap) - 1: - yield "," - # This will be yielded on the next iteration when - # we know that we're not at the end of a line. - pad = " " * (col_widths[col] - len(code)) - prev_row_index = row_index - col += 1 - - -def iter_keymap_parts(config, keymaps): - # includes - for include_path in config['keymaps_includes']: - yield '#include "{}"\n'.format(include_path) - - yield "\n" - - # definitions - for i, macro_id in enumerate(sorted(config['macro_ids'])): - yield "#define {} {}\n".format(macro_id, i) - - yield "\n" - - for i, layer_name in enumerate(config['layer_lines']): - yield '#define L{0:<3} {0:<5} // {1}\n'.format(i, layer_name) - - yield "\n" - - # keymaps - yield "const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {\n" - - for i, layer_name in enumerate(config['layer_lines']): - # comment - layer_lines = config['layer_lines'][layer_name] - prefixed_lines = " * " + " * ".join(layer_lines) - yield "/*\n{} */\n".format(prefixed_lines) - - # keymap codes - keymap = keymaps[layer_name] - row_indents = ROW_INDENTS.get(config['layout']) - keymap_lines = "".join(iter_keymap_lines(keymap, row_indents)) - yield "[L{0}] = KEYMAP({1}\n),\n".format(i, keymap_lines) - - yield "};\n\n" - - # no idea what this is for - yield "const uint16_t PROGMEM fn_actions[] = {};\n" - - # macros - yield MACROCODE.format( - macro_cases="", - unicode_macro_cases="\n".join(unicode_macro_cases(config)), - ) - - # TODO: dynamically create blinking lights - yield USERCODE - - -def main(argv=sys.argv[1:]): - if not argv or '-h' in argv or '--help' in argv: - print(__doc__) - return 0 - - in_path = os.path.abspath(argv[0]) - if not os.path.exists(in_path): - print("No such file '{}'".format(in_path)) - return 1 - - if len(argv) > 1: - out_path = os.path.abspath(argv[1]) - else: - dirname = os.path.dirname(in_path) - out_path = os.path.join(dirname, "keymap.c") - - config = parse_config(in_path) - valid_keys = parse_valid_keys(config, out_path) - keymaps = parse_keymaps(config, valid_keys) - - with io.open(out_path, mode="w", encoding="utf-8") as fh: - for part in iter_keymap_parts(config, keymaps): - fh.write(part) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/keyboards/ergodox80/ergodox80/util/readme.md b/keyboards/ergodox80/ergodox80/util/readme.md deleted file mode 100644 index 26c5e5d99..000000000 --- a/keyboards/ergodox80/ergodox80/util/readme.md +++ /dev/null @@ -1,3 +0,0 @@ -# ErgoDox EZ Utilities - -The Python script in this directory, by [mbarkhau](https://github.com/mbarkhau) allows you to write out a basic ErgoDox EZ keymap using Markdown notation, and then transpile it to C, which you can then compile. It's experimental, but if you're not comfortable using C, it's a nice option. diff --git a/keyboards/ergodox80/keymaps/default/keymap.c b/keyboards/ergodox80/keymaps/default/keymap.c deleted file mode 100644 index 2da2c5b0e..000000000 --- a/keyboards/ergodox80/keymaps/default/keymap.c +++ /dev/null @@ -1,183 +0,0 @@ -#include "ergodox80.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | 1 | 2 | Home | | PgUp | 3 | 4 | - * |------|------|------| |------|--------|------| - * | Space| BkSp | End | | PgDn | Tab |Enter | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = KEYMAP( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_1, KC_2, KC_HOME, - KC_SPC,KC_BSPC,KC_END, - // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP,KC_3, KC_4, - KC_PGDN,KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * |------|------|------| |------|------|------| - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, - KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,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, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+----------. - * | | | | | | | | - * |------|------|------| |------|------|----------| - * | | | | | | |BrwserBack| - * `--------------------' `------------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - 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_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -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) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - -}; diff --git a/keyboards/ergodox80/readme.md b/keyboards/ergodox80/readme.md deleted file mode 100644 index b5c09f922..000000000 --- a/keyboards/ergodox80/readme.md +++ /dev/null @@ -1,6 +0,0 @@ -# Ergodox 80 key support - -This is based on the ergodox-ez qmk firmware but is for ergodoxes with 80 keys. - - - diff --git a/keyboards/ergodox80/rules.mk b/keyboards/ergodox80/rules.mk deleted file mode 100644 index ac63d4eff..000000000 --- a/keyboards/ergodox80/rules.mk +++ /dev/null @@ -1,28 +0,0 @@ -#---------------------------------------------------------------------------- -# On command line: -# -# make = Make software. -# -# make clean = Clean out built project files. -# -# That's pretty much all you need. To compile, always go make clean, -# followed by make. -# -# For advanced users only: -# make teensy = Download the hex file to the device, using teensy_loader_cli. -# (must have teensy_loader_cli installed). -# -#---------------------------------------------------------------------------- -# Build Options -# comment out to disable the options. -# -BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= no # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -CUSTOM_MATRIX ?= yes # Custom matrix file for the ErgoDox EZ -SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -MIDI_ENABLE ?= no # MIDI controls -UNICODE_ENABLE ?= yes # Unicode -- cgit v1.2.3 From 558f3ec1eb325caf706efc15e2fab26121aba442 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 6 Sep 2016 23:19:01 -0500 Subject: Use keyboard config for nkro (#7) * removing nkro references - wip * changed NKRO to be defined by keymap_config --- keyboards/planck/keymaps/pvc/Makefile | 4 ++-- keyboards/planck/keymaps/pvc/keymap.c | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/pvc/Makefile b/keyboards/planck/keymaps/pvc/Makefile index 0b2f060de..19c3abc6c 100644 --- a/keyboards/planck/keymaps/pvc/Makefile +++ b/keyboards/planck/keymaps/pvc/Makefile @@ -1,9 +1,9 @@ # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = no # Console for debug(+400) diff --git a/keyboards/planck/keymaps/pvc/keymap.c b/keyboards/planck/keymaps/pvc/keymap.c index 8ff40f377..23aedfc99 100644 --- a/keyboards/planck/keymaps/pvc/keymap.c +++ b/keyboards/planck/keymaps/pvc/keymap.c @@ -83,6 +83,7 @@ enum keyboard_macros { #define SC_ACLS LALT(KC_F4) #define SC_CCLS LCTL(KC_F4) +#define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 #define _______ KC_TRNS @@ -206,7 +207,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [LAYER_ADJUST] = { { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MU_TOG , AU_TOG }, { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, + { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , TG_NKRO, M_MOUSE, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } }, @@ -236,7 +237,7 @@ void persistant_default_layer_set(uint16_t default_layer) } const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), + [0] = ACTION_MODS_ONESHOT(MOD_RSFT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -- cgit v1.2.3 From 54214b3abcae2189341d124c29336b911d88da41 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Wed, 7 Sep 2016 13:29:29 -0400 Subject: Borrowed joint Shift/Enter idea from sgoodwin mapping --- keyboards/planck/keymaps/cbbrowne/keymap.c | 2 +- keyboards/planck/keymaps/cbbrowne/readme.md | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 63566f862..898f6f0e0 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,7 +84,7 @@ enum macro_id { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QW] = { /* Qwerty */ {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_ENT}, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, 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_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 5af688bb1..51979f630 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -77,3 +77,4 @@ doing sundry experimentation: * The jeebak keymap seems to have some neat ideas: - Number layer which is aggressive about having numbers in several places - Touch layer seems interesting + * Trying out sgoodwin's "hold Enter down to get Shift" \ No newline at end of file -- cgit v1.2.3 From e5396ca9e5ccb714a757b6559c9f7e95bf372e3f Mon Sep 17 00:00:00 2001 From: Nathan Sharfi Date: Wed, 7 Sep 2016 18:23:01 -0700 Subject: zweihander: rename to Makefile --- keyboards/ergodox/keymaps/zweihander-osx/Makefile | 2 ++ keyboards/ergodox/keymaps/zweihander-osx/makefile.mk | 2 -- 2 files changed, 2 insertions(+), 2 deletions(-) create mode 100644 keyboards/ergodox/keymaps/zweihander-osx/Makefile delete mode 100644 keyboards/ergodox/keymaps/zweihander-osx/makefile.mk (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/zweihander-osx/Makefile b/keyboards/ergodox/keymaps/zweihander-osx/Makefile new file mode 100644 index 000000000..6e3d088a4 --- /dev/null +++ b/keyboards/ergodox/keymaps/zweihander-osx/Makefile @@ -0,0 +1,2 @@ +# Don’t do a tricolor wave when the computer is shut down in Windows +SLEEP_LED_ENABLE = no diff --git a/keyboards/ergodox/keymaps/zweihander-osx/makefile.mk b/keyboards/ergodox/keymaps/zweihander-osx/makefile.mk deleted file mode 100644 index 6e3d088a4..000000000 --- a/keyboards/ergodox/keymaps/zweihander-osx/makefile.mk +++ /dev/null @@ -1,2 +0,0 @@ -# Don’t do a tricolor wave when the computer is shut down in Windows -SLEEP_LED_ENABLE = no -- cgit v1.2.3 From 273a6cc688ef4c8f7964d8c62147c8697db42cde Mon Sep 17 00:00:00 2001 From: Nathan Sharfi Date: Wed, 7 Sep 2016 20:28:31 -0700 Subject: =?UTF-8?q?-=20Make=20thumb-accessible=20=E2=8C=A5=20and=20?= =?UTF-8?q?=E2=8C=83=20into=20right-=E2=8C=A5=20and=20right-=E2=8C=83=20-?= =?UTF-8?q?=20remove=20media-space=20and=20media-shift-space;=20put=20a=20?= =?UTF-8?q?play/pause=20key=20at=20media-m=20instead=20-=20add=20print=20s?= =?UTF-8?q?creen,=20scroll=20lock,=20and=20pause/break=20to=20the=20media?= =?UTF-8?q?=20layer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit And in the readme: - don't say we don't have any Windows-specific keys - add mnemonics for thumb-alt and thumb-ctrl positioning --- keyboards/ergodox/keymaps/zweihander-osx/keymap.c | 14 +++++++------- keyboards/ergodox/keymaps/zweihander-osx/readme.markdown | 8 +++++--- 2 files changed, 12 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/zweihander-osx/keymap.c b/keyboards/ergodox/keymaps/zweihander-osx/keymap.c index d6d66fd55..725a73e34 100644 --- a/keyboards/ergodox/keymaps/zweihander-osx/keymap.c +++ b/keyboards/ergodox/keymaps/zweihander-osx/keymap.c @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,------|------|------| |------+--------+------. * | | | PgUp | | PgDn | | | * | | ⇥ |------| |------| ⇥ |Enter | - * | | | L⌥ | | L⌃ | | | + * | | | R⌥ | | R⌃ | | | * `--------------------' `----------------------' */ // If it accepts an argument (i.e, is a function), it doesn't need KC_. @@ -46,7 +46,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_LCTL, KC_LALT, KC_LGUI,KC_LEFT,KC_RGHT, KC_GRV, KC_QUOT, KC_PGUP, - KC_SPC,KC_TAB ,KC_LALT, + KC_SPC,KC_TAB ,KC_RALT, // right hand TG(SYMB), KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, MO(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, @@ -55,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_SPC , KC_ESC, KC_BSPC, KC_PGDN, - KC_LCTL, KC_TAB, KC_ENT + KC_RCTL, KC_TAB, KC_ENT ), /* Keymap 1: Symbol Layer * @@ -102,13 +102,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 2: Media keys * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F14 | F15 | | | | | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power | + * | | F14 | F15 |PrtScr|SclLck| Pause| | | ⌘Q | ⌘W | ⌘⇧` | ⌘` | | | Power | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | PgUp |⌘S⌘⇥⌘R| Term | | | | ⌘] | ⌥⌘↑ | ↑ | ⌥⌘↓ | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | |Safari| PgDn | | |------| |------| ⌘[ | ← | ↓ | → | | ⏯ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | |BBEdit| | | |L⇧+Spc| Spc | ⏮ | ⏭ | | | + * | | | | | |BBEdit| | | | | ⏯ | ⏮ | ⏭ | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * | | | | | | |VolUp |VolDn | Mute | | | * `----------------------------------' `----------------------------------' @@ -122,7 +122,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ // MEDIA AND MOUSE [MDIA] = KEYMAP( - KC_TRNS, KC_F14 , KC_F15 , KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, /* F14 dims screen, F15 brightens */ + KC_TRNS, KC_F14 , KC_F15 , KC_PSCR, KC_SLCK, KC_PAUS, KC_TRNS, /* F14 dims screen, F15 brightens */ KC_TRNS, KC_TRNS, KC_TRNS, KC_PGUP, M(SGWF), M(TMNL), KC_TRNS, KC_TRNS, KC_TRNS, M(SAFA), KC_PGDN, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(BBED), KC_TRNS, @@ -134,7 +134,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { LGUI(KC_Q), LGUI(KC_W), LGUI(LSFT(KC_GRV)), LGUI(KC_GRV), KC_TRNS, KC_TRNS, KC_PWR , KC_TRNS, LGUI(KC_RBRC), LGUI(LALT(KC_UP)), KC_UP , LGUI(LALT(KC_DOWN)), KC_TRNS, KC_TRNS, LGUI(KC_LBRC), KC_LEFT, KC_DOWN, KC_RGHT, KC_TRNS, KC_MPLY, - KC_TRNS, LSFT(KC_SPC), KC_SPC , KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MPLY, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END , diff --git a/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown b/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown index 3b7f52941..5125a12ee 100644 --- a/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown +++ b/keyboards/ergodox/keymaps/zweihander-osx/readme.markdown @@ -7,7 +7,7 @@ This layout is tuned for people who… ## use OS X -This layout doesn’t make any concessions for Windows use. While it should work fine in Windows, I’m not about to devote precious keyboard space to Windows-specific shortcuts. +While this layout should work fine in Windows, it’s not tuned for it. No sane person who primarily uses Windows would put this many Windows keys on a keyboard layout. ## mouse left-handed while doing other things with the right hand @@ -21,8 +21,6 @@ I tend to have my mouse in my left hand, but I like to use my other hand to make - Go Up and Close Just-Left Folder (⌥⌘↑) - Cycle through open windows in current application (⌘\` and ⌘⇧\`) - Cycle through tabs in current window (⌥⇥ and ⌥⇧⇥) -- Space (page down in browsers; Quick Look in the Finder) -- Shift-Space (page up in web browsers) Because moving letter-by-letter is way slower than moving word-by-word, I added Option (⌥) to the bottommost button on the left side. This key can be held easily while holding ; (activate media layer) and pressing J and L to move left and right by word. @@ -34,11 +32,15 @@ I wanted to preserve the feel of a number of shortcuts that involve pressing lot - Empty Trash Without Asking for Confirmation (⇧⌥⌘⌫) - Shut Down Without Asking for Confirmation (⇧⌥⌘ power) +⇧⌥⌘⌫, when you press the backspace on the right half of the keyboard, is much more satisfying than if you curl your left hand into a claw to press all the keys on the left. Try both; you’ll agree. + ## use Emacs-style shortcuts I press C-a, C-e, and C-k all the time. It’s difficult to press these key combinations with the control key on the bottom left and I’m too quick on the draw for the control function on the / key to work reliably, so the bottommost thumb button on the right side is another control key. +Having trouble remembering which thumb key is alt and which is ctrl? It’s like on the lower right of a normal keyboard — leftmost is alt, rightmost is ctrl. + ## use spreadsheets -- cgit v1.2.3 From fe2aed0d1c8d1535c160755b76186972071aed02 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 7 Sep 2016 23:50:58 -0500 Subject: Added User Print - A "light" console out option (#8) User print disables the normal print messages in the body of QMK/TMK code and is meant as a lightweight alternative to NOPRINT. Use it when you only want to do a spot of debugging but lack flash resources for allowing all of the codebase to print (and store their wasteful strings). --- keyboards/planck/keymaps/pvc/Makefile | 2 +- keyboards/planck/keymaps/pvc/config.h | 12 ++++++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/pvc/Makefile b/keyboards/planck/keymaps/pvc/Makefile index 19c3abc6c..b2ff961fa 100644 --- a/keyboards/planck/keymaps/pvc/Makefile +++ b/keyboards/planck/keymaps/pvc/Makefile @@ -6,7 +6,7 @@ BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/planck/keymaps/pvc/config.h b/keyboards/planck/keymaps/pvc/config.h index 1113372b0..1004c8b99 100644 --- a/keyboards/planck/keymaps/pvc/config.h +++ b/keyboards/planck/keymaps/pvc/config.h @@ -68,10 +68,18 @@ along with this program. If not, see . */ /* disable debug print */ -//#define NO_DEBUG +#ifndef NO_DEBUG +# define NO_DEBUG +#endif /* disable print */ -//#define NO_PRINT +// #ifndef NO_PRINT +// # define NO_PRINT +// #endif + +/* Only print user print statements */ +#define USER_PRINT + /* disable action features */ //#define NO_ACTION_LAYER -- cgit v1.2.3 From 740b4bbe463545c3547c41def88fa30abbc734fc Mon Sep 17 00:00:00 2001 From: Roman Zolotarev Date: Thu, 8 Sep 2016 21:12:34 +0800 Subject: Fix typo --- keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md index a86061285..4fa1814fb 100644 --- a/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md +++ b/keyboards/ergodox/keymaps/romanzolotarev-norman-osx/readme.md @@ -20,7 +20,7 @@ It is `CTL_T(KC_ESC)` and it works this way: ## How to activate N-rollover -- Hold left `SHIFT` and right `SHIRT` and then tap `N`. +- Hold left `SHIFT` and right `SHIFT` and then tap `N`. ## How to make and flash on OS X -- cgit v1.2.3 From 98e43f995d845d44976e4c4f86addb996ab79acc Mon Sep 17 00:00:00 2001 From: tong92 Date: Thu, 8 Sep 2016 23:37:13 +0900 Subject: add tong92 keymap --- keyboards/planck/keymaps/tong92/Makefile | 62 +++++++++++++ keyboards/planck/keymaps/tong92/keymap.c | 146 ++++++++++++++++++++++++++++++ keyboards/planck/keymaps/tong92/readme.md | 66 ++++++++++++++ 3 files changed, 274 insertions(+) create mode 100644 keyboards/planck/keymaps/tong92/Makefile create mode 100644 keyboards/planck/keymaps/tong92/keymap.c create mode 100644 keyboards/planck/keymaps/tong92/readme.md (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/tong92/Makefile b/keyboards/planck/keymaps/tong92/Makefile new file mode 100644 index 000000000..e6608e74c --- /dev/null +++ b/keyboards/planck/keymaps/tong92/Makefile @@ -0,0 +1,62 @@ +#---------------------------------------------------------------------------- +# On command line: +# +# make all = Make software. +# +# make clean = Clean out built project files. +# +# make coff = Convert ELF to AVR COFF. +# +# make extcoff = Convert ELF to AVR Extended COFF. +# +# make program = Download the hex file to the device. +# Please customize your programmer settings(PROGRAM_CMD) +# +# make teensy = Download the hex file to the device, using teensy_loader_cli. +# (must have teensy_loader_cli installed). +# +# make dfu = Download the hex file to the device, using dfu-programmer (must +# have dfu-programmer installed). +# +# make flip = Download the hex file to the device, using Atmel FLIP (must +# have Atmel FLIP installed). +# +# make dfu-ee = Download the eeprom file to the device, using dfu-programmer +# (must have dfu-programmer installed). +# +# make flip-ee = Download the eeprom file to the device, using Atmel FLIP +# (must have Atmel FLIP installed). +# +# make debug = Start either simulavr or avarice as specified for debugging, +# with avr-gdb or avr-insight as the front end for debugging. +# +# make filename.s = Just compile filename.c into the assembler code only. +# +# make filename.i = Create a preprocessed source file for use in submitting +# bug reports to the GCC project. +# +# To rebuild project do "make clean" then "make all". +#---------------------------------------------------------------------------- +# Build Options +# change to "no" to disable the options, or define them in the makefile.mk in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = no # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = no # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. + +# Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/planck/keymaps/tong92/keymap.c b/keyboards/planck/keymaps/tong92/keymap.c new file mode 100644 index 000000000..2be28fb4f --- /dev/null +++ b/keyboards/planck/keymaps/tong92/keymap.c @@ -0,0 +1,146 @@ +//Author: tong92 + +#include "planck.h" +#ifdef BACKLIGHT_ENABLE + #include "backlight.h" +#endif + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO +#define LOWER M(1) +#define RAISE M(2) +#define GO_DEFT M(99) +# + +//MIT Layout +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* 0: Qwerty layer (Default) +* ,-----------------------------------------------------------------------. +* |Tab | q | w | e | r | t | y | u | i | o | p | BS | +* |-----------------------------------------------------------------------| +* |Ctrl | a | s | d | f | g | h | j | k | l | ; |enter| +* |-----------------------------------------------------------------------| +* |Shift| z | x | c | v | b | n | m | , | . | / |Shift| +* |-----------------------------------------------------------------------| +* | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt | +* `-----------------------------------------------------------------------' +*/ +[0] ={ +{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_LCTL,KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN,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), KC_RCTL,KC_LGUI,KC_LALT,LOWER,KC_SPC,KC_SPC,RAISE,KC_QUOT,KC_LBRC,KC_RBRC,KC_RALT} +}, +/* 1: Lower layer +* ,-----------------------------------------------------------------------. +* | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS | +* |-----------------------------------------------------------------------| +* | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ | +* |-----------------------------------------------------------------------| +* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| +* |-----------------------------------------------------------------------| +* | | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT| +* `-----------------------------------------------------------------------' +*/ +[1] ={ +{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS,KC_PLUS,KC_LBRC,KC_RBRC,KC_BSLS }, +{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11,KC_F12,_______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN }, +{XXXXXXX,_______,_______,_______,_______,KC_SPC,KC_SPC,_______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT} +}, +/* 2: Upper layer +* ,-----------------------------------------------------------------------. +* | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS | +* |-----------------------------------------------------------------------| +* | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | | +* |-----------------------------------------------------------------------| +* | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| +* |-----------------------------------------------------------------------| +* | | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT| +* `-----------------------------------------------------------------------' +*/ +[2] ={ +{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_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS,KC_EQL, KC_LCBR,KC_RCBR,KC_PIPE }, +{_______,KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______,KC_HOME,KC_PGUP,KC_UP ,KC_PGDN }, +{XXXXXXX,_______,_______,_______,_______,KC_SPC, KC_SPC, _______,KC_END, KC_LEFT,KC_DOWN,KC_RIGHT} +}, +/* 4: fn layer (Window shortcuts) +* ,-----------------------------------------------------------------------. +* | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL | +* |-----------------------------------------------------------------------| +* | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | | +* |-----------------------------------------------------------------------| +* | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | | +* |-----------------------------------------------------------------------| +* | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED | +* `-----------------------------------------------------------------------' +*/ +[4] ={ +{KC_ESC ,LALT(KC_F4) ,LGUI(KC_UP) ,XXXXXXX ,XXXXXXX ,S(KC_CAPS) ,XXXXXXX,KC_PGUP,KC_UP,KC_PGDN,KC_PSCR,KC_DELT}, +{_______,LGUI(KC_LEFT) ,LGUI(KC_DOWN) ,LGUI(KC_RIGHT) ,XXXXXXX ,LALT(KC_CAPS),KC_CAPS,KC_LEFT,KC_DOWN,KC_RIGHT,XXXXXXX,XXXXXXX}, +{_______,LGUI(LSFT(KC_LEFT)),LGUI(LSFT(KC_RIGHT)),XXXXXXX ,XXXXXXX ,LCTL(KC_CAPS),KC_SLCK,KC_HOME,XXXXXXX,KC_END,XXXXXXX,XXXXXXX}, +{KC_TRNS,LGUI(LCTL(KC_LEFT)),LGUI(LCTL(KC_RIGHT)),LGUI(LCTL(KC_F4)),LCTL(LALT(KC_DELT)),LGUI(KC_SPC),LGUI(KC_SPC),XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,M(0)} +}, +/* 10: mouse layer +* ,-----------------------------------------------------------------------. +* | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET| +* |-----------------------------------------------------------------------| +* | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | | +* |-----------------------------------------------------------------------| +* | | | | | | | |M_AC0|M_AC1|M_AC2| | | +* |-----------------------------------------------------------------------| +* | | | | | | GO_DEFT | | | | | | +* `-----------------------------------------------------------------------' +*/ +[10] ={ +{XXXXXXX,XXXXXXX,XXXXXXX,KC_MS_U,XXXXXXX,XXXXXXX,XXXXXXX,KC_WH_L,KC_WH_U,KC_WH_R,XXXXXXX,RESET}, +{XXXXXXX,XXXXXXX,KC_MS_L,KC_MS_D,KC_MS_R,XXXXXXX,XXXXXXX,KC_BTN1,KC_WH_D,KC_BTN2,XXXXXXX,XXXXXXX}, +{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,KC_ACL0,KC_ACL1,KC_ACL2,XXXXXXX,XXXXXXX}, +{XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,GO_DEFT,GO_DEFT,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX,XXXXXXX} +} + +}; +//Layout END + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) { + case 0: + if (record->event.pressed) { + #ifdef BACKLIGHT_ENABLE + backlight_step(); + #endif + } + break; + case 1: + if (record->event.pressed) { + layer_on(1); + update_tri_layer(1, 2, 10); + } else { + layer_off(1); + update_tri_layer(1, 2, 10); + } + break; + case 2: + if (record->event.pressed) { + layer_on(2); + update_tri_layer(1, 2, 10); + } else { + layer_off(2); + update_tri_layer(1, 2, 10); + } + break; + case 99: + if (record->event.pressed) { + layer_off(10); + layer_off(1); + layer_off(2); + layer_on(0); + update_tri_layer(0 ,1 ,2); + } + break; + } + return MACRO_NONE; +}; \ No newline at end of file diff --git a/keyboards/planck/keymaps/tong92/readme.md b/keyboards/planck/keymaps/tong92/readme.md new file mode 100644 index 000000000..328d005f6 --- /dev/null +++ b/keyboards/planck/keymaps/tong92/readme.md @@ -0,0 +1,66 @@ +# The Tong92 Layout +- MIT Layout +- my keymap for WIndow User +- Lower && Upper Hold -> Mouse Layer +- Mouse Layer : space -> Default Layer +- No Audio + +## 1. Default Layer - Qwerty + + ,-----------------------------------------------------------------------. + |Tab | q | w | e | r | t | y | u | i | o | p | BS | + |-----------------------------------------------------------------------| + |Ctrl | a | s | d | f | g | h | j | k | l | ; |enter| + |-----------------------------------------------------------------------| + |Shift| z | x | c | v | b | n | m | , | . | / |Shift| + |-----------------------------------------------------------------------| + | Fn |Ctrl | Win | Alt |Lower| Space |Upper| ' | [ | ] | Alt | + `-----------------------------------------------------------------------' + +## 2. Lower Layer + + ,-----------------------------------------------------------------------. + | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | BS | + |-----------------------------------------------------------------------| + | | F1 | F2 | F3 | F4 | F5 | F6 | - | + | [ | ] | \ | + |-----------------------------------------------------------------------| + | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| + |-----------------------------------------------------------------------| + | | | | | | SPACE |mouse| END | LEFT| DOWN|RIGHT| + `-----------------------------------------------------------------------' + +## 3. Upper Layer + + ,-----------------------------------------------------------------------. + | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | BS | + |-----------------------------------------------------------------------| + | | F1 | F2 | F3 | F4 | F5 | F6 | _ | = | { | } | | | + |-----------------------------------------------------------------------| + | | F7 | F8 | F9 | F10 | F11 | F12 | | HOME| PgUp| UP | PgDo| + |-----------------------------------------------------------------------| + | | | | |mouse| SPACE | | END | LEFT| DOWN|RIGHT| + `-----------------------------------------------------------------------' + +## 4. Fn Layer - Window Shortcuts + + ,-----------------------------------------------------------------------. + | ESC |WinOf|WinUp| | |Sh+Ca| | PgUp| UP | PgDo|PrtSc| DEL | + |-----------------------------------------------------------------------| + | |WinLe|WinDo|WinRi| |Al+Ca|CapsL| LEFT| DOWN|RIGHT| | | + |-----------------------------------------------------------------------| + | |WinLW|WinRW| | |Ct+Ca|ScroL| HOME| | END | | | + |-----------------------------------------------------------------------| + | |DeskL|DeskR|DeskX|Task | ChangeLang| | | | | LED | + `-----------------------------------------------------------------------' + +## 5. Mouse Layer + + ,-----------------------------------------------------------------------. + | | | |Mo_Up| | | |M_WhL|M_WhU|M_WhR| |RESET| + |-----------------------------------------------------------------------| + | | |Mo_Le|Mo_Do|Mo_Ri| | |M_Bt1|M_WhD|M_Bt2| | | + |-----------------------------------------------------------------------| + | | | | | | | |M_AC0|M_AC1|M_AC2| | | + |-----------------------------------------------------------------------| + | | | | | |GO_DEFAULT | | | | | | + `-----------------------------------------------------------------------' \ No newline at end of file -- cgit v1.2.3 From b83f76e1b070236344837cc6838852daa08e6436 Mon Sep 17 00:00:00 2001 From: profet23 Date: Thu, 8 Sep 2016 23:34:55 -0400 Subject: Changing keymap name to "profet_80" --- .../ergodox/ez/keymaps/default_80/ergodox80.png | Bin 20663 -> 0 bytes keyboards/ergodox/ez/keymaps/default_80/keymap.c | 183 --------------------- keyboards/ergodox/ez/keymaps/default_80/readme.md | 10 -- .../ergodox/ez/keymaps/profet_80/ergodox80.png | Bin 0 -> 20663 bytes keyboards/ergodox/ez/keymaps/profet_80/keymap.c | 183 +++++++++++++++++++++ keyboards/ergodox/ez/keymaps/profet_80/readme.md | 10 ++ 6 files changed, 193 insertions(+), 193 deletions(-) delete mode 100644 keyboards/ergodox/ez/keymaps/default_80/ergodox80.png delete mode 100644 keyboards/ergodox/ez/keymaps/default_80/keymap.c delete mode 100644 keyboards/ergodox/ez/keymaps/default_80/readme.md create mode 100644 keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png create mode 100644 keyboards/ergodox/ez/keymaps/profet_80/keymap.c create mode 100644 keyboards/ergodox/ez/keymaps/profet_80/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png b/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png deleted file mode 100644 index 66b9752eb..000000000 Binary files a/keyboards/ergodox/ez/keymaps/default_80/ergodox80.png and /dev/null differ diff --git a/keyboards/ergodox/ez/keymaps/default_80/keymap.c b/keyboards/ergodox/ez/keymaps/default_80/keymap.c deleted file mode 100644 index 505ff2972..000000000 --- a/keyboards/ergodox/ez/keymaps/default_80/keymap.c +++ /dev/null @@ -1,183 +0,0 @@ -#include "ergodox.h" -#include "debug.h" -#include "action_layer.h" -#include "version.h" - -#define BASE 0 // default layer -#define SYMB 1 // symbols -#define MDIA 2 // media keys - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Keymap 0: Basic layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | - * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | App | LGui | | Alt |Ctrl/Esc| - * ,------|------|------| |------+--------+------. - * | 1 | 2 | Home | | PgUp | 3 | 4 | - * |------|------|------| |------|--------|------| - * | Space| BkSp | End | | PgDn | Tab |Enter | - * `--------------------' `----------------------' - */ -// If it accepts an argument (i.e, is a function), it doesn't need KC_. -// Otherwise, it needs KC_* -[BASE] = KEYMAP_80( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, - KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), - KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - ALT_T(KC_APP), KC_LGUI, - KC_1, KC_2, KC_HOME, - KC_SPC,KC_BSPC,KC_END, - // right hand - KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP,KC_3, KC_4, - KC_PGDN,KC_TAB, KC_ENT - ), -/* Keymap 1: Symbol Layer - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+------. - * | | | | | | | | - * |------|------|------| |------|------|------| - * | | | | | | | | - * `--------------------' `--------------------' - */ -// SYMBOLS -[SYMB] = KEYMAP_80( - // left hand - M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, - KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,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, - // right hand - KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, - KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, - KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, - KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, - KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS -), -/* Keymap 2: Media and mouse keys - * - * ,--------------------------------------------------. ,--------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | | | MsUp | | | | | | | | | | | | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | - * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | | | | | | | | | | | Prev | Next | | | - * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | - * `----------------------------------' `----------------------------------' - * ,-------------. ,-------------. - * | | | | | | - * ,------|------|------| |------+------+----------. - * | | | | | | | | - * |------|------|------| |------|------|----------| - * | | | | | | |BrwserBack| - * `--------------------' `------------------------' - */ -// MEDIA AND MOUSE -[MDIA] = KEYMAP_80( - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - // right hand - 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_MPLY, - KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, - KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_TRNS, - KC_TRNS, KC_TRNS, KC_WBAK -), -}; - -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - -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) { - SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); - } - break; - } - return MACRO_NONE; -}; - -// Runs just one time when the keyboard initializes. -void matrix_init_user(void) { - -}; - -// Runs constantly in the background, in a loop. -void matrix_scan_user(void) { - - uint8_t layer = biton32(layer_state); - - ergodox_board_led_off(); - ergodox_right_led_1_off(); - ergodox_right_led_2_off(); - ergodox_right_led_3_off(); - switch (layer) { - // TODO: Make this relevant to the ErgoDox EZ. - case 1: - ergodox_right_led_1_on(); - break; - case 2: - ergodox_right_led_2_on(); - break; - default: - // none - break; - } - -}; diff --git a/keyboards/ergodox/ez/keymaps/default_80/readme.md b/keyboards/ergodox/ez/keymaps/default_80/readme.md deleted file mode 100644 index b6bbb86d2..000000000 --- a/keyboards/ergodox/ez/keymaps/default_80/readme.md +++ /dev/null @@ -1,10 +0,0 @@ -# ErgoDox 80 Default Configuration - -This is based on the default Ergodox EZ keymap. -The difference is that this keymap supports 80 key layouts. -If you own an 80 key Ergodox, use this as an example to get your desired keymap. - -**NOTE:** This layout is not physically supported by the Ergodox EZ. - - -![Default80](ergodox80.png) diff --git a/keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png b/keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png new file mode 100644 index 000000000..66b9752eb Binary files /dev/null and b/keyboards/ergodox/ez/keymaps/profet_80/ergodox80.png differ diff --git a/keyboards/ergodox/ez/keymaps/profet_80/keymap.c b/keyboards/ergodox/ez/keymaps/profet_80/keymap.c new file mode 100644 index 000000000..505ff2972 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/profet_80/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | 1 | 2 | Home | | PgUp | 3 | 4 | + * |------|------|------| |------|--------|------| + * | Space| BkSp | End | | PgDn | Tab |Enter | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP_80( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_1, KC_2, KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP,KC_3, KC_4, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * |------|------|------| |------|------|------| + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP_80( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,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, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+----------. + * | | | | | | | | + * |------|------|------| |------|------|----------| + * | | | | | | |BrwserBack| + * `--------------------' `------------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP_80( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + // right hand + 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_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +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) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/ez/keymaps/profet_80/readme.md b/keyboards/ergodox/ez/keymaps/profet_80/readme.md new file mode 100644 index 000000000..b6bbb86d2 --- /dev/null +++ b/keyboards/ergodox/ez/keymaps/profet_80/readme.md @@ -0,0 +1,10 @@ +# ErgoDox 80 Default Configuration + +This is based on the default Ergodox EZ keymap. +The difference is that this keymap supports 80 key layouts. +If you own an 80 key Ergodox, use this as an example to get your desired keymap. + +**NOTE:** This layout is not physically supported by the Ergodox EZ. + + +![Default80](ergodox80.png) -- cgit v1.2.3 From 9c2015ea7f23a69c1c585b1b366df5cbfd3e93c7 Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 8 Sep 2016 23:20:17 -0500 Subject: first commit of Absenth's Ergodox Firmware --- .../ergodox/keymaps/absenth/absenth_highres.png | Bin 0 -> 1463041 bytes keyboards/ergodox/keymaps/absenth/keymap.c | 183 +++++++++++++++++++++ keyboards/ergodox/keymaps/absenth/readme.md | 8 + 3 files changed, 191 insertions(+) create mode 100644 keyboards/ergodox/keymaps/absenth/absenth_highres.png create mode 100644 keyboards/ergodox/keymaps/absenth/keymap.c create mode 100644 keyboards/ergodox/keymaps/absenth/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/absenth/absenth_highres.png b/keyboards/ergodox/keymaps/absenth/absenth_highres.png new file mode 100644 index 000000000..c07aa8803 Binary files /dev/null and b/keyboards/ergodox/keymaps/absenth/absenth_highres.png differ diff --git a/keyboards/ergodox/keymaps/absenth/keymap.c b/keyboards/ergodox/keymaps/absenth/keymap.c new file mode 100644 index 000000000..30f747419 --- /dev/null +++ b/keyboards/ergodox/keymaps/absenth/keymap.c @@ -0,0 +1,183 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "version.h" + +#define BASE 0 // default layer +#define SYMB 1 // symbols +#define MDIA 2 // media keys + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | = | 1 | 2 | 3 | 4 | 5 | LEFT | | RIGHT| 6 | 7 | 8 | 9 | 0 | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| + * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | App | LGui | | Alt |Ctrl/Esc| + * ,------|------|------| |------+--------+------. + * | | | Home | | PgUp | | | + * | Space|Backsp|------| |------| Tab |Enter | + * | |ace | End | | PgDn | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, + KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), + KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, + ALT_T(KC_APP), KC_LGUI, + KC_HOME, + KC_SPC,KC_BSPC,KC_END, + // right hand + KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, + KC_LALT, CTL_T(KC_ESC), + KC_PGUP, + KC_PGDN,KC_TAB, KC_ENT + ), +/* Keymap 1: Symbol Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |Version | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | . | 0 | = | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[SYMB] = KEYMAP( + // left hand + M(0), KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, + KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, + KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_TRNS,KC_TRNS,KC_TRNS, + // right hand + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, + KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, + KC_DOWN, KC_4, KC_5, KC_6, KC_PLUS, KC_TRNS, + KC_TRNS, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS, KC_TRNS, + KC_TRNS,KC_DOT, KC_0, KC_EQL, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* Keymap 2: Media and mouse keys + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | MsUp | | | | | | | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | | | | Prev | Next | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | Lclk | Rclk | |VolUp |VolDn | Mute | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | |Brwser| + * | | |------| |------| |Back | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[MDIA] = KEYMAP( + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MS_U, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_MS_L, KC_MS_D, KC_MS_R, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_BTN1, KC_BTN2, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_BTN1, KC_BTN2, KC_TRNS, + // right hand + 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_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_MPLY, + KC_TRNS, KC_TRNS, KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, + KC_VOLU, KC_VOLD, KC_MUTE, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_WBAK +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) +}; + +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) { + SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; diff --git a/keyboards/ergodox/keymaps/absenth/readme.md b/keyboards/ergodox/keymaps/absenth/readme.md new file mode 100644 index 000000000..35d0aad46 --- /dev/null +++ b/keyboards/ergodox/keymaps/absenth/readme.md @@ -0,0 +1,8 @@ +# ErgoDox EZ Absenth Configuration + +## Changelog + +* Sept. 8, 2016 (V0.1): + * Made A key double as MEDIA Layer change when you hold it. Added mouse buttons to the large thumb buttons on the left side on the Media Layer. Added vi/vim style arrow keys on HJKL on media layer. + +![Absenth](absenth_highres.png) -- cgit v1.2.3 From 52121cee7a9b26a6450db33ec34c8e4c8895aafc Mon Sep 17 00:00:00 2001 From: Lars Date: Thu, 8 Sep 2016 23:32:11 -0500 Subject: Updated Image Header --- .../ergodox/keymaps/absenth/absenth_highres.png | Bin 1463041 -> 1429453 bytes 1 file changed, 0 insertions(+), 0 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/absenth/absenth_highres.png b/keyboards/ergodox/keymaps/absenth/absenth_highres.png index c07aa8803..a0596b281 100644 Binary files a/keyboards/ergodox/keymaps/absenth/absenth_highres.png and b/keyboards/ergodox/keymaps/absenth/absenth_highres.png differ -- cgit v1.2.3 From a9e56186e00c000892e2d1a6567627466e611f16 Mon Sep 17 00:00:00 2001 From: Daniel Bordak Date: Sat, 10 Sep 2016 12:16:38 -0400 Subject: Fix typo --- keyboards/atreus/rules.mk | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/rules.mk b/keyboards/atreus/rules.mk index d71f50bb2..3a00993bd 100644 --- a/keyboards/atreus/rules.mk +++ b/keyboards/atreus/rules.mk @@ -2,11 +2,11 @@ ifdef TEENSY2 OPT_DEFS += -DATREUS_TEENSY2 - ATRUES_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex + ATREUS_UPLOAD_COMMAND = teensy_loader_cli -w -mmcu=$(MCU) $(TARGET).hex else OPT_DEFS += -DATREUS_ASTAR OPT_DEFS += -DCATERINA_BOOTLOADER - ATRUES_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ + ATREUS_UPLOAD_COMMAND = while [ ! -r $(USB) ]; do sleep 1; done; \ avrdude -p $(MCU) -c avr109 -U flash:w:$(TARGET).hex -P $(USB) endif @@ -79,4 +79,4 @@ UNICODE_ENABLE ?= YES # Unicode USB ?= /dev/cu.usbmodem1411 upload: build - $(ATRUES_UPLOAD_COMMAND) \ No newline at end of file + $(ATREUS_UPLOAD_COMMAND) -- cgit v1.2.3 From 70b4fc808db716ab2b6c659a1e43702c435bfbef Mon Sep 17 00:00:00 2001 From: shela Date: Sun, 11 Sep 2016 02:29:32 +0900 Subject: fix variable value of rules.mk --- keyboards/hhkb/rules.mk | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index b43b5e23f..e6fc7260e 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -58,19 +58,19 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512 # Build Options # comment out to disable the options. # -BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) -EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) -CONSOLE_ENABLE ?= yes # Console for debug(+400) -COMMAND_ENABLE ?= yes # Commands for debug and configuration -CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB +BOOTMAGIC_ENABLE ?= yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= yes # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE # SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend -# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +# NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work # BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality -# MIDI_ENABLE ?= YES # MIDI controls -# UNICODE_ENABLE ?= YES # Unicode -# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID +# MIDI_ENABLE ?= yes # MIDI controls +# UNICODE_ENABLE ?= yes # Unicode +# BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID ifneq (, $(findstring yes, $(HHKB_JP))) OPT_DEFS += -DHHKB_JP -- cgit v1.2.3 From 054108d1d1702a8a51913f67f14733bbf1eebd1a Mon Sep 17 00:00:00 2001 From: Daniel Bordak Date: Sat, 10 Sep 2016 13:25:13 -0400 Subject: Update to new default keymap --- keyboards/atreus/keymaps/classic/keymap.c | 48 +++++++++++++++++++++++++++++++ keyboards/atreus/keymaps/default/keymap.c | 22 ++++++++++---- 2 files changed, 65 insertions(+), 5 deletions(-) create mode 100644 keyboards/atreus/keymaps/classic/keymap.c (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/classic/keymap.c b/keyboards/atreus/keymaps/classic/keymap.c new file mode 100644 index 000000000..6ca0b2077 --- /dev/null +++ b/keyboards/atreus/keymaps/classic/keymap.c @@ -0,0 +1,48 @@ +#include "atreus.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QW 0 +#define _RS 1 +#define _LW 2 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[_QW] = { /* Qwerty */ + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P }, + {KC_A, KC_S, KC_D, KC_F, KC_G, KC_TRNS, KC_H, KC_J, KC_K, KC_L, KC_SCLN }, + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, + {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT } +}, +[_RS] = { /* [> RAISE <] */ + {KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, + {KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS}, + {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL} +}, +[_LW] = { /* [> LOWER <] */ + {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, + {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, + {KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET} +}}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/atreus/keymaps/default/keymap.c b/keyboards/atreus/keymaps/default/keymap.c index 1c4280ff5..04ad66fed 100644 --- a/keyboards/atreus/keymaps/default/keymap.c +++ b/keyboards/atreus/keymaps/default/keymap.c @@ -18,17 +18,29 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH }, {KC_ESC, KC_TAB, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, MO(_RS), KC_MINS, KC_QUOT, KC_ENT } }, +/* + * ! @ up { } || pgup 7 8 9 * + * # left down right $ || pgdn 4 5 6 + + * [ ] ( ) & || ` 1 2 3 \ + * lower insert super shift bksp ctrl || alt space fn . 0 = + */ [_RS] = { /* [> RAISE <] */ - {KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, - {KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, - {KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_LALT, KC_AMPR, KC_1, KC_2, KC_3, KC_BSLS}, + {KC_EXLM, KC_AT, KC_UP, KC_LCBR, KC_RCBR, KC_TRNS, KC_PGUP, KC_7, KC_8, KC_9, KC_ASTR}, + {KC_HASH, KC_LEFT, KC_DOWN, KC_RGHT, KC_DLR, KC_TRNS, KC_PGDN, KC_4, KC_5, KC_6, KC_PLUS}, + {KC_LBRC, KC_RBRC, KC_LPRN, KC_RPRN, KC_AMPR, KC_LALT, KC_GRV, KC_1, KC_2, KC_3, KC_BSLS}, {TG(_LW), KC_INS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, KC_TRNS, KC_DOT, KC_0, KC_EQL} }, +/* + * insert home up end pgup || up F7 F8 F9 F10 + * del left down right pgdn || down F4 F5 F6 F11 + * volup reset || F1 F2 F3 F12 + * voldn super shift bksp ctrl || alt space L0 prtsc scroll pause + */ [_LW] = { /* [> LOWER <] */ {KC_INS, KC_HOME, KC_UP, KC_END, KC_PGUP, KC_TRNS, KC_UP, KC_F7, KC_F8, KC_F9, KC_F10}, {KC_DELT, KC_LEFT, KC_DOWN, KC_RGHT, KC_DOWN, KC_TRNS, KC_DOWN, KC_F4, KC_F5, KC_F6, KC_F11}, - {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, - {KC_TRNS, KC_TRNS, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_TRNS, KC_TRNS, RESET} + {KC_TRNS, KC_VOLU, KC_TRNS, KC_TRNS, RESET, KC_LALT, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F12}, + {KC_TRNS, KC_VOLD, KC_LGUI, KC_LSFT, KC_BSPC, KC_LCTL, KC_SPC, DF(_QW), KC_PSCR, KC_SLCK, KC_PAUS} }}; const uint16_t PROGMEM fn_actions[] = { -- cgit v1.2.3 From 475d0b23f6139b14d6eac12c9a584e6b1fb7c569 Mon Sep 17 00:00:00 2001 From: Daniel Bordak Date: Sat, 10 Sep 2016 12:19:16 -0400 Subject: Add PCBDOWN --- keyboards/atreus/config.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'keyboards') diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index 624d90188..51162cde3 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -37,7 +37,11 @@ along with this program. If not, see . // COLS: Left to right, ROWS: Top to bottom #if defined(ATREUS_ASTAR) # define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#if defined(PCBDOWN) +# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#else # define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +#endif # define UNUSED_PINS #elif defined(ATREUS_TEENSY2) # define MATRIX_ROW_PINS { D0, D1, D2, D3 } -- cgit v1.2.3 From 2a8536f00fb7e3a547fb5b626279e2e391e556d5 Mon Sep 17 00:00:00 2001 From: shela Date: Sun, 11 Sep 2016 02:46:06 +0900 Subject: Variables in Makefile are ignored in rules.mk --- keyboards/hhkb/keymaps/jp/Makefile | 2 +- keyboards/hhkb/keymaps/rdg_jp/Makefile | 2 +- keyboards/hhkb/rules.mk | 4 ---- 3 files changed, 2 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/jp/Makefile b/keyboards/hhkb/keymaps/jp/Makefile index 92986292a..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/jp/Makefile +++ b/keyboards/hhkb/keymaps/jp/Makefile @@ -1 +1 @@ -HHKB_JP=yes +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/keymaps/rdg_jp/Makefile b/keyboards/hhkb/keymaps/rdg_jp/Makefile index 92986292a..a7f700f01 100644 --- a/keyboards/hhkb/keymaps/rdg_jp/Makefile +++ b/keyboards/hhkb/keymaps/rdg_jp/Makefile @@ -1 +1 @@ -HHKB_JP=yes +OPT_DEFS += -DHHKB_JP diff --git a/keyboards/hhkb/rules.mk b/keyboards/hhkb/rules.mk index e6fc7260e..a46271f02 100644 --- a/keyboards/hhkb/rules.mk +++ b/keyboards/hhkb/rules.mk @@ -72,10 +72,6 @@ CUSTOM_MATRIX ?= yes # Custom matrix file for the HHKB # UNICODE_ENABLE ?= yes # Unicode # BLUETOOTH_ENABLE ?= yes # Enable Bluetooth with the Adafruit EZ-Key HID -ifneq (, $(findstring yes, $(HHKB_JP))) - OPT_DEFS += -DHHKB_JP -endif - debug-on: EXTRAFLAGS += -DDEBUG -DDEBUG_ACTION debug-on: all -- cgit v1.2.3 From 1aeb59335f2fe67613df25308a630ca453975ac0 Mon Sep 17 00:00:00 2001 From: Didier Loiseau Date: Sun, 11 Sep 2016 02:19:55 +0200 Subject: Fixed compilation issues after the merge --- keyboards/ergodox/keymaps/bepo_csa/keymap.c | 527 ++++++++++++++++++++++++++++ 1 file changed, 527 insertions(+) create mode 100644 keyboards/ergodox/keymaps/bepo_csa/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/bepo_csa/keymap.c b/keyboards/ergodox/keymaps/bepo_csa/keymap.c new file mode 100644 index 000000000..495242adb --- /dev/null +++ b/keyboards/ergodox/keymaps/bepo_csa/keymap.c @@ -0,0 +1,527 @@ +/* TypeMatrix-2030-like keymap */ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" +#include "action_util.h" +#include "led.h" +#include "keymap_extras/keymap_bepo.h" +#include "keymap_extras/keymap_canadian_multilingual.h" + +enum layers { + LR_BASE, // default layer + LR_CSA, // BÉPO over Canadian Multilingual (CSA) + LR_CSA_SFT, // shifted BÉPO over CSA + LR_CSA_AGR, // altgr-ed BÉPO over CSA + LR_CSA_AGR_SFT, // altgr-shifted BÉPO over CSA + LR_NUMR, // numeric layer + LR_FN, // fn layer +}; + +#define IS_CA_MULT_ENABLED() (layer_state & (1 << LR_CSA)) + +enum macros { + // Characters that do not exist in CSA and must be implemented based on unicode support + // Note: these are intentionally declared first to be used as indexes in spec_chars below + UC_NDSH, // – + UC_MDSH, // — + UC_ELPS, // … + END_UC, // indicates the last unicode character macro + // other macros + M_CSA_SFT, // toggle shift on CSA + M_CSA_AGR_SFT, // toggle shift on LR_CSA_AGR (goes to LR_CSA_AGR_SFT) + M_CSA_SFT_AGR, // toggle AltGr on LR_CSA_SFT (goes to LR_CSA_AGR_SFT) + // macros for characters that need to be un-shifted in LR_CA_MULT_SHIFT + M_1, + M_2, + M_3, + M_4, + M_5, + M_6, + M_7, + M_8, + M_9, + M_0, + M_DEGR, + M_SCLN, + M_GRV, + M_NBSP, + // macros for characters that don't have a simple key combination in LR_CA_MULT_ALTGR + M_CRC, + // other layer macros + M_DBL0, // double 0 + M_FNLR, // fn layer + M_NMAL, // num+alt +}; + +#define CSA(name) M(M_CSA_##name) // calls a CSA macro + +const uint16_t unicode_chars[] = { + [UC_NDSH] = L'–', + [UC_MDSH] = L'—', + [UC_ELPS] = L'…', +}; + +/* shortcut for unicode character macros */ +#define MUC(name) M(UC_##name) // calls a unicode macro + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Basic layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z | + * |--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| + * | = | A | U | I | E | , |------| |------| C | T | S | R | N | M | + * |--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| + * | LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl| + * `----------------------------------' `----------------------------------' + * ,--------------. ,-------------. + * | Esc | num | | Left |Right | + * ,------+-------+------| |------+------+------. + * | | | PgUp | | Up | | | + * |Space | Home |------| |------| End |Space | + * | | | PgDn | | Down | | | + * `---------------------' `--------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[LR_BASE] = KEYMAP( // layer 0 : default + // left hand + BP_DLR, KC_1, KC_2, KC_3, KC_4, KC_5, KC_DELT, + KC_TAB, BP_B, BP_ECUT, BP_P, BP_O, BP_EGRV, KC_BSPC, + BP_EQL, BP_A, BP_U, BP_I, BP_E, BP_COMM, + KC_LSFT, BP_AGRV, BP_Y, BP_X, BP_DOT, BP_K, KC_ENT, + KC_LCTL, M(M_FNLR), KC_LGUI, M(M_NMAL), KC_LALT, + + KC_ESC, TG(LR_NUMR), + KC_PGUP, + KC_SPC, KC_HOME, KC_PGDN, + + // right hand + KC_DELT, KC_6, KC_7, KC_8, KC_9, KC_0, BP_W, + KC_BSPC, BP_DCRC, BP_V, BP_D, BP_L, BP_J, BP_Z, + BP_C, BP_T, BP_S, BP_R, BP_N, BP_M, + KC_ENT, BP_APOS, BP_Q, BP_G, BP_H, BP_F, KC_RSFT, + BP_ALGR, BP_PERC, KC_APP, BP_CCED, KC_RCTL, + + KC_LEFT, KC_RGHT, + KC_UP, + KC_DOWN, KC_END, KC_SPC + ), +/** + * Same as default but for use with Canadian Multilingual on OS side + */ +[LR_CSA] = KEYMAP( + // left hand + KC_DLR, CSA_DQOT, CSA_LGIL, CSA_RGIL, KC_LPRN, KC_RPRN, KC_TRNS, + KC_TRNS, KC_B, CSA_ECUT, KC_P, KC_O, CSA_EGRV, KC_TRNS, + KC_EQL, KC_A, KC_U, KC_I, KC_E, KC_COMM, + CSA(SFT), CSA_AGRV, KC_Y, KC_X, KC_DOT, KC_K, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, KC_AT, KC_PLUS, KC_MINS, CSA_SLSH, KC_ASTR, KC_W, + KC_TRNS, CSA_DCRC, KC_V, KC_D, KC_L, KC_J, KC_Z, + KC_C, KC_T, KC_S, KC_R, KC_N, KC_M, + KC_TRNS, CSA_APOS, KC_Q, KC_G, KC_H, KC_F, CSA(SFT), + MO(LR_CSA_AGR), KC_PERC, KC_TRNS, CSA_CCED, KC_LCTL, // RCTL has a special behaviour in CSA so use LCTL + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS + ), +/* Shifted BÉPO over Canadian Multilingual + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | # | 1 | 2 | 3 | 4 | 5 | | | | 6 | 7 | 8 | 9 | 0 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | | | | ! | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ° | | | | | ; |------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | : | | | | | ? | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | ` | | | | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_SFT] = KEYMAP( + // left hand + KC_HASH, M(M_1), M(M_2), M(M_3), M(M_4), M(M_5), KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + M(M_DEGR),KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, M(M_SCLN), + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_COLN, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + M(M_NBSP), KC_TRNS, KC_TRNS, + + // right hand + KC_TRNS, M(M_6), M(M_7), M(M_8), M(M_9), M(M_0), KC_TRNS, + KC_TRNS, KC_EXLM, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, CSA_QEST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + CSA(SFT_AGR), M(M_GRV), KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, M(M_NBSP) + ), +/* AltGr-ed BÉPO over Canadian Multilingual + * "////" indicates that the key is disabled (unsupported bépo character) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | – | — | < | > | [ | ] | | | | ^ | ± | //// | ÷ | × | dead ˘ | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | |dead '| & | œ |dead `| | | | ¡ |dead ˇ| ð | //// | ij | ////// | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ////// | æ | ù |dead "| € | ̛’ |------| |------| © | þ | ß | ® |dead ~| dead ¯ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | \ | { | } | … | ~ | | | | ¿ |dead °| μ | //// |dead ˛| | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | //// | |dead ¸| | + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | _ | |------| |------| | _ | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_AGR] = KEYMAP( + // left hand + MUC(NDSH), MUC(MDSH), CSA_LESS, CSA_GRTR, CSA_LBRC, CSA_RBRC, KC_TRNS, + KC_TRNS, CSA_PIPE, CSA_DACT, KC_AMPR, CSA_OE, CSA_DGRV, KC_TRNS, + KC_NO, CSA_AE, CSA_UGRV, CSA_DTRM, CSA_EURO, CSA_RQOT, + CSA(AGR_SFT), CSA_BSLS, CSA_LCBR, CSA_RCBR, MUC(ELPS), CSA_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_UNDS, CSA(AGR_SFT), KC_TRNS, + + // right hand + KC_TRNS, M(M_CRC), CSA_PSMS, KC_NO, CSA_DVSN, CSA_TIMS, CSA_DBRV, + KC_TRNS, CSA_IXLM, CSA_DCAR, CSA_ETH, KC_NO, CSA_IJ, KC_NO, + CSA_CPRT, CSA_THRN, CSA_SRPS, CSA_RTM, CSA_DTLD, CSA_DMCR, + KC_TRNS, CSA_IQST, CSA_DRNG, CSA_MU, KC_NO, CSA_DOGO, CSA(AGR_SFT), + KC_TRNS, KC_NO, KC_TRNS, CSA_DCED, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_UNDS + ), +/* AltGr-shifted BÉPO over Canadian Multilingual + * "////" indicates that the key is disabled (unsupported bépo character or unused in bépo) + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ¶ | //// | “ | ” | //// | //// | | | | //// | ¬ | ¼ | ½ | ¾ | ////// | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | ¦ | ˝ | § | Œ | ` | | | | //// | //// | Ð | //// | IJ | ////// | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | ////// | Æ | Ù |dead-˙| //// | //// |------| |------| //// | Þ | ẞ | ™ | //// | º | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | //// | ‘ | ’ | //// | //// | | | | //// | //// | //// | //// | ª | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +[LR_CSA_AGR_SFT] = KEYMAP( + // left hand + CSA_PARG, KC_NO, CSA_LDQT, CSA_RDQT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, CSA_BPIP, CSA_DDCT, CSA_SECT, S(CSA_OE), M(M_GRV), KC_TRNS, + KC_NO, S(CSA_AE), S(CSA_UGRV), CSA_DDTA, KC_NO, KC_NO, + CSA(AGR_SFT), KC_NO, CSA_LQOT, CSA_RQOT, KC_NO, KC_NO, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_TRNS, + + // right hand + KC_TRNS, KC_NO, CSA_NEGT, CSA_1QRT, CSA_1HLF, CSA_3QRT, KC_NO, + KC_TRNS, KC_NO, KC_NO, S(CSA_ETH), KC_NO, S(CSA_IJ), KC_NO, + KC_NO, S(CSA_THRN), S(CSA_SRPS), CSA_TM, KC_NO, CSA_ORDO, + KC_TRNS, KC_NO, KC_NO, KC_NO, KC_NO, CSA_ORDA, CSA(AGR_SFT), + CSA(SFT_AGR), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, CSA(AGR_SFT), KC_TRNS + ), +/* Numeric Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | 0 | 00 | . |Etr/Ctl| + * `----------------------------------' `-----------------------------------' + * ,-------------. ,-------------. + * | | | |n.lock|c.lock| + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | | |------| |------| | | + * | | | | | | | | + * `--------------------' `--------------------' + */ +// SYMBOLS +[LR_NUMR] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, 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, + + // right hand + KC_TRNS, KC_F6, KC_F7, KC_TAB, KC_PSLS, KC_PAST, KC_PMNS, + KC_TRNS, KC_TRNS, KC_HOME, KC_P7, KC_P8, KC_P9, KC_PPLS, + KC_UP, KC_END, KC_P4, KC_P5, KC_P6, KC_PPLS, + KC_LEFT, KC_DOWN, KC_RGHT, KC_P1, KC_P2, KC_P3, KC_PENT, + KC_TRNS, KC_P0, M(M_DBL0),KC_PDOT, CTL_T(KC_PENT), + + KC_NLCK, KC_CAPS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS +), +/* fn layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * |~CA-mult| | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | |VolUp | | | | | | | | Pause | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | RESET | | | Calc | Mail |Browsr|------| |------| | | | | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | | App | cut | copy |paste | Mute |VolDn | | | | | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * | | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | Next | | | | | + * | Mute | play |------| |------| | | + * | | | Prev | | | | | + * `--------------------' `--------------------' + */ +// MEDIA AND MOUSE +[LR_FN] = KEYMAP( + TG(LR_CSA), KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_INS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_VOLU, + RESET, KC_TRNS, KC_TRNS, KC_CALC, KC_MAIL, KC_WHOM, + KC_TRNS, KC_APP, S(KC_DELT), LCTL(KC_INS),S(KC_INS), KC_MUTE, KC_VOLD, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + + KC_TRNS, KC_TRNS, + KC_MPRV, + KC_MUTE, KC_MPLY, KC_MNXT, + + // right hand + KC_INS, KC_EJCT, KC_PWR, KC_SLEP, KC_WAKE, KC_PSCR, KC_SLCK, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_PAUS, + 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 +), +}; + +const uint16_t PROGMEM fn_actions[] = { +}; + +void hold_shift(void) { + register_code(KC_LSHIFT); +} + +void release_shift(void) { + unregister_code(KC_LSHIFT); +} + +uint16_t hextokeycode(int hex) { + if (hex == 0x0) { + return KC_P0; + } else if (hex < 0xA) { + return KC_P1 + (hex - 0x1); + } else { + return KC_A + (hex - 0xA); + } +} + +void send_unicode(uint16_t unicode) +{ + // For more info on how this works per OS, see here: https://en.wikipedia.org/wiki/Unicode_input#Hexadecimal_code_input + // Implemented for Windows: + // Pressing ALT followed by + followed by the unicode code point in hex. + // Requires registry key HKEY_CURRENT_USER\Control Panel\Input Method\EnableHexNumpad set to String 1 + register_code(KC_LALT); + register_code(KC_PPLS); + unregister_code(KC_PPLS); + + for (int i = 12; i >= 0; i -= 4) { + register_code(hextokeycode((unicode >> i) & 0xF)); + unregister_code(hextokeycode((unicode >> i) & 0xF)); + } + + unregister_code(KC_LALT); +} + +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 ... END_UC: + if (record->event.pressed) { + send_unicode(unicode_chars[id]); + } + break; + case M_CSA_SFT: + // BÉPO over CSA: toggle shift layer + layer_invert(LR_CSA_SFT); + if (record->event.pressed) { + hold_shift(); + } else { + release_shift(); + } + break; + case M_CSA_SFT_AGR: + // BÉPO over CSA: from shift layer, momentary altgr+shift layer + layer_invert(LR_CSA_AGR); + layer_invert(LR_CSA_AGR_SFT); + if (record->event.pressed) { + // shift not needed for LR_CSA_AGR_SFT + release_shift(); + } else { + // back to shift layer + hold_shift(); + } + break; + case M_CSA_AGR_SFT: + // BÉPO over CSA: from altgr layer, momentary altgr+shift layer + layer_invert(LR_CSA_SFT); + layer_invert(LR_CSA_AGR_SFT); + break; + case M_1 ... M_0: + case M_DEGR: + case M_SCLN: + case M_GRV: + case M_NBSP: + // macros of the shift layer that require to release shift + if (record->event.pressed) { + release_shift(); + switch (id) { + case M_1 ... M_0: + register_code(KC_1 + (id - M_1)); + break; + case M_DEGR: + return MACRO(DOWN(CSA_ALTGR), D(SCLN), END); + case M_SCLN: + return MACRO(D(SCLN), END); + case M_GRV: + return MACRO(I(75), DOWN(CSA_ALTGR), TYPE(CSA_DCRC), UP(CSA_ALTGR), T(SPACE), END); + case M_NBSP: + // use weak mod such that pressing another key will not be affected + add_weak_mods(MOD_BIT(CSA_ALTGR)); + return MACRO(D(SPACE), END); + } + } else { + hold_shift(); + switch (id) { + case M_1 ... M_0: + unregister_code(KC_1 + (id - M_1)); + break; + case M_DEGR: + return MACRO(UP(CSA_ALTGR), U(SCLN), END); + case M_SCLN: + return MACRO(U(SCLN), END); + case M_NBSP: + del_weak_mods(MOD_BIT(CSA_ALTGR)); + return MACRO(U(SPACE), END); + } + } + break; + case M_CRC: + if (record->event.pressed) { + return MACRO(I(75), TYPE(CSA_DCRC), T(SPACE), END); + } + break; + case M_DBL0: + if (record->event.pressed) { + return MACRO( I(25), T(P0), T(P0), END ); + } + break; + case M_FNLR: + layer_invert(LR_NUMR); + layer_invert(LR_FN); + break; + case M_NMAL: + layer_invert(LR_NUMR); + if (record->event.pressed) { + register_code(KC_LALT); + } else { + unregister_code(KC_LALT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + // led 1: numeric layer + if (layer_state & (1 << LR_NUMR)) { + ergodox_right_led_1_on(); + } + // led 2: BÉPO over Canadian Multilingual + if (IS_CA_MULT_ENABLED()) { + ergodox_right_led_2_on(); + } + // led 3: caps lock + if (host_keyboard_leds() & (1< Date: Sun, 11 Sep 2016 22:03:34 +0200 Subject: Added readme.md for bepo_csa --- keyboards/ergodox/keymaps/bepo_csa/readme.md | 162 +++++++++++++++++++++++++++ 1 file changed, 162 insertions(+) create mode 100644 keyboards/ergodox/keymaps/bepo_csa/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/bepo_csa/readme.md b/keyboards/ergodox/keymaps/bepo_csa/readme.md new file mode 100644 index 000000000..d4975b226 --- /dev/null +++ b/keyboards/ergodox/keymaps/bepo_csa/readme.md @@ -0,0 +1,162 @@ +# BÉPO Keymap with firmware-remapping for software CSA layout + +This is a keymap intended to be used with the [BÉPO layout](http://bepo.fr), a French ergonomic layout designed by following Dvorak's principles. + +The particularity of this keymap is that it supports using the [Canadian Multilingual Standard layout](https://en.wikipedia.org/wiki/QWERTY#Canadian_Multilingual_Standard) (also known as _ACNOR keyboard_ or _CSA keyboard_, see also the [French page](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) which contains more details) on the OS side, by enabling the _CSA_ layer. This is especially useful for operating systems that natively provide CSA, but not BÉPO, like Windows. The CSA layout was chosen because it is probably the standard layout that provides the best character set coverage. + +This keymap is based on the [tm2030](../tm2030/) keymap, whose goal was to have a [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) inspired layout for the ErgoDox EZ. + +As this keyboard is intended for French people, the rest of this page will be in French. + +# Keymap BÉPO avec support en firmware pour utilisation avec la disposition CSA en software + +Cette keymap a été conçue pour être utilisée avec la [disposition BÉPO](http://bepo.fr), la disposition francophone, ergonomique et libre basée sure les principes de Dvorak. + +La particularité de cette keymap est qu'elle supporte l'utilisation du [clavier canadien multilingue standard](https://fr.wikipedia.org/wiki/QWERTY#Clavier_canadien_multilingue_standard) (aussi appelé _clavier ACNOR_ ou _clavier CSA_) du côté du système d'exploitation, en activant la couche _CSA_. Ceci s'avère particulièrement utile pour les systèmes d'exploitations qui fournissent nativement le CSA, mais pas le BÉPO, comme Windows. Le clavier CSA a été choisi comme base car c'est probablement la disposition standard qui fournit la meilleure couverture en termes de caractères disponibles. + +Cette keymap est basée sur la keymap [tm2030](../tm2030/), dont le but est de fournir une disposition inspirée du [TypeMatrix™ 2030](http://typematrix.com/2030/features.php) pour l'ErgoDox EZ. + +## Couche de base +C'est la couche par défaut, proche du TypeMatrix, avec les différences suivantes: +- La ligne du haut (les touches `F`) et la colonne de droite sont retirées, les touches correspondantes étant déplacées ailleurs. +- Les touches situés en bas à gauche sont redisposées dans cet ordre: `Ctrl`, `fn`, `Gui`, `num+Alt`, `Alt` +- Les touches `shuffle` (`Alt+Tab`) et `desktop` ne sont pas supportés +- `W` est déplacé à la place de `=` +- `=` est déplacé sous `Tab` (au lieu d'avoir un grand `Shift`) +- `%` et `Ç` sont déplacés à la place de `Home` et `End` respectivement +- Les flèches ainsi que `PgUp`/`PgDown`/`Home`/`End` sont déplacées sur les pouces + +À noter que pour `W` et `Ç`, le but a été de ne pas les déplacer trop par rapport à la disposition BÉPO _standard_, afin de pouvoir repasser facilement sur un TypeMatrix ou un clavier traditionnel. + + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| $ | " | « | » | ( | ) | Del | | Del | @ | + | - | / | * | W | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| Tab | B | É | P | O | È |Backsp| |Backsp| ^ | V | D | L | J | Z | +|--------+------+------+------+------+------|ace | |ace |------+------+------+------+------+--------| +| = | A | U | I | E | , |------| |------| C | T | S | R | N | M | +|--------+------+------+------+------+------|Enter | |Enter |------+------+------+------+------+--------| +| LShift | À | Y | X | . | K | | | | ' | Q | G | H | F | RShift | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + |LCtrl | fn | LGui |numAlt| LAlt | |Alt Gr| % | App | Ç | RCtrl| + `----------------------------------' `----------------------------------' + ,--------------. ,-------------. + | Esc | num | | Left |Right | + ,------+-------+------| |------+------+------. + | | | PgUp | | Up | | | + |Space | Home |------| |------| End |Space | + | | | PgDn | | Down | | | + `---------------------' `--------------------' +``` + +### Changer de couche + +- Utilisez `num` pour activer/désactiver [la couche numérique](#couche-numérique) +- Maintenez `fn` pour activer temporairement [les couches numériques et Fn](#couche-fn) +- Maintenez `numAlt` pour activer temporairement la couche numérique combinée avec `Alt` (facilite l'utilisation des raccourcis tels que `Alt`+`F4`) + +### Diodes +Les diodes de l'ErgoDox EZ (côté droit) sont utilisées de la façon suivante : + +- diode de gauche (rouge) : indique l'activation de [la couche numérique](#couche-numérique) +- diode du milieu (verte) : indique l'activation du [mode CSA](#couche-csa) +- diode de droite (bleue) : indique le verrouillage majuscules + +## Couche CSA +La couche _CSA_ est la même que la couche de base, pour une utilisation avec un clavier Canadien Multilingue configuré dans le système d'exploitation. + +Pour l'activer, appuyez sur `fn`+`$`. La [diode](#diodes) verte indique que la couche CSA est activée. + +### Limitations +Seuls les caractères présents dans le clavier CSA sont parfaitement supportés. De manière générale, il s'agit des caractères suivants : + +- toute la couche de base +- tous les caractères accessibles en `Shift` +- tous les caractères de la main gauche accessibles en `AltGr` à l'exception du `≠` +- environ la moitié des caractères de la main droite accessibles en `AltGr` et la moitié des caractères accessibles en `AltGr`+`Shift` (consultez [le fichier source](keymap.c) pour voir les caractères supportés) + +En particulier, les caractères suivants sont émulés via le support Unicode (Windows seulement): + +- le tiret cadratin (tiret long) : — +- le tiret demi-cadratin (demi tiret) : – +- les points de suspension : … + +L'implémentation actuelle ne fonctionne pas dans toutes les applications, en particulier les applications MS Office. + +Il est probable que l'utilisation de la couche CSA ne fonctionne pas correctement dans certains jeux vidéos. + +Cette fonctionnalité a été conçue et testée essentiellment pour Windows (7). + +### Détails techniques +Techniquement, la couche CSA est en réalité composée de 4 couches servant à émuler la couche de base, les appuis sur `Shift` ou `Alt` et la combinaison des deux. + +Le changement de couches se fait par des macros afin d'activer ou désactiver plusieurs couches et la touche `Shift` en même temps. + +Certains caractères sont également implémentés par des macros, notamment ceux de la couche `Shift` qui n'ont pas besoin de cette touche en CSA, comme les chiffres. + +Les caractères Unicode se basent sur une implémentation spécifique et non celle fournie dans QMK — il faudrait sans doute migrer le code. Notez la façon dont ces caractères sont déclarés tels quels dans [le code source](keymap.c) (tableau `unicode_char`). + +## Couche numérique +Couche numérique proche du TM lorsqu'on active `num`, avec les différences suivantes : + +- Le clavier numérique est déplacés de 1 vers le haut et vers la droite. +- Les flèches sont décalées de 1 vers la gauche. +- Fournit l'accès aux touches `F1` à `F12`, `caps-lock` et `num-lock`. + +La couche numérique est indiquée par la [diode](#diodes) de gauche (rouge). Caps-lock est indiqué par la diode de droite (bleue). + +La touche `numAlt` de [la couche de base](#couche-de-base) permet d'activer la couche numérique et la touche `Alt` simultanément, afin de faciliter les raccourcis claviers comme `Alt`+`F4`. + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| | F1 | F2 | F3 | F4 | F5 | | | | | | Tab | / | * | - | +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | F6 | F7 | F8 | F9 | F10 | | | | | Home | 7 | 8 | 9 | + | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | F11 | F12 | | | |------| |------| Up | End | 4 | 5 | 6 | + | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | | | | | | | | Left | Down | Right| 1 | 2 | 3 |KpEnter | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | 0 | 00 | . |Etr/Ctl| + `----------------------------------' `-----------------------------------' + ,-------------. ,-------------. + | | | |n.lock|c.lock| + ,------|------|------| |------+------+------. + | | | | | | | | + | | |------| |------| | | + | | | | | | | | + `--------------------' `--------------------' +``` + +## Couche Fn +Activée simultanément avec la couche numérique lorsque l'on maintient la touche `fn`. Comme sur le TM, elle fournit l'accès aux fonctionnalités suivantes : + +- `couper`, `copier` et `coller` — attention: ne pas utiliser dans l'explorateur de fichiers. +- monter/baisser/couper le volume — seulement accessible en main gauche, contrairement au TM. +- piste précédente/suivante +- calculatrice, e-mail et page d'accueil du navigateur web +- `insert`, `power`, `sleep`, `wake`, `print screen`, `scroll-lock` et `pause` +- ~CSA: (dés)activation de [la couche CSA](#couche-csa) sur `$` +- RESET: rechargement du firmware avec Teensy-Loader (pour les développeurs) + +``` +,--------------------------------------------------. ,--------------------------------------------------. +| ~CSA | | | | | |Insert| |Insert|Eject |Power |Sleep | Wake |PrtScr|ScrollLk| +|--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| +| | | | | | |VolUp | | | | | | | | Pause | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| RESET | | | Calc | Mail |Browsr|------| |------| | | | | | | +|--------+------+------+------+------+------| | | |------+------+------+------+------+--------| +| | App | cut | copy |paste | Mute |VolDn | | | | | | | | | +`--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + | | | | | | | | | | | | + `----------------------------------' `----------------------------------' + ,-------------. ,-------------. + | | | | | | + ,------|------|------| |------+------+------. + | | | Next | | | | | + | Mute | play |------| |------| | | + | | | Prev | | | | | + `--------------------' `--------------------' +``` \ No newline at end of file -- cgit v1.2.3 From 6a7ef59629dcb6cb388649002242abdab344424b Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Mon, 12 Sep 2016 13:24:22 -0400 Subject: Ongoing experiment; have a special layer for RESET --- keyboards/planck/keymaps/cbbrowne/keymap.c | 44 +++++++++++++++++++++++++++-- keyboards/planck/keymaps/cbbrowne/readme.md | 23 +++++++++++++-- 2 files changed, 61 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 898f6f0e0..1bfd142e9 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -69,6 +69,7 @@ enum layers { _LW, /* Lower layer, where top line has symbols !@#$%^&*() */ _RS, /* Raised layer, where top line has digits 1234567890 */ _KP, /* Key pad */ + _ADJUST, /* Special Adjust layer coming via tri-placement */ }; enum macro_id { @@ -76,9 +77,14 @@ enum macro_id { M_USERNAME, M_RANDDIGIT, M_RANDLETTER, - M_VERSION + M_VERSION, + MACRO_UPPER, + MACRO_LOWER, }; +#define M_LOWER M(MACRO_LOWER) +#define M_UPPER M(MACRO_UPPER) + /* Note that Planck has dimensions 4 rows x 12 columns */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -86,7 +92,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, 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_QUOT }, - {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, [_RS] = { /* RAISE */ @@ -106,7 +112,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QW), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} -} +}, + +[_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ + { M(M_LED), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } +} }; /* What is fn_actions actually used for??? */ @@ -171,6 +184,31 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) unregister_code (KC_A + rval); } break; + case MACRO_UPPER: + if (record->event.pressed) + { + layer_on(_RS); + update_tri_layer(_LW, _RS, _ADJUST); + } + else + { + layer_off(_RS); + update_tri_layer(_LW, _RS, _ADJUST); + } + break; + case MACRO_LOWER: + if (record->event.pressed) + { + layer_on(_LW); + update_tri_layer(_LW, _RS, _ADJUST); + } + else + { + layer_off(_LW); + update_tri_layer(_LW, _RS, _ADJUST); + } + break; + } return MACRO_NONE; }; diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 51979f630..e9e423ed9 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -24,7 +24,8 @@ doing sundry experimentation: - Key [2][2] aka "a" uses a random number generator to select a digit 0-9 at random - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number - * Minor use of Space Cadet Shift; my SHIFT key has switched to KC_LSP0, so that when I just hit SHIFT, I get a left parens: ( which is great for Lisping. I don't have a Right Shift, so I don't get an autoclose; I think I'll live with that until a Planck successor with more lines of keys :-) + * Trying out sgoodwin's "hold Enter down to get Shift" + 2. Some code structure ideas --------------------------------------------------- @@ -57,12 +58,29 @@ doing sundry experimentation: and shift ESC off the first column so KC_LCTL and KC_LALT can be on the first column. * I needed to swap ' and ENTER + +4. Unuseful experiments +--------------------------------------------------------- + +I have tried some things out that didn't turn out particularly well. +I'll note some of these for posterity, hopefully helpful in not doing +unwise things again... + * I tried added Workman alongside Dvorak and Colemak - Boy, oh boy, these don't help!!! - I have done 30 years of learning of Emacs key mappings, and these alternative keyboards massively mess me up -4. TODO + * Space Cadet Shift; switching L_SHIFT to KC_LSP0, so that when I + just hit SHIFT, I get a left parens. In principle, this is great + for Lisping. + - Unfortunately, there are times when mouse interfaces use SHIFT + to allow selecting multiple items, and this really interferes + with that + + + +5. TODO --------------------------------------------------------- * I use tmux quite a lot; the mollat keymap seems to have some @@ -77,4 +95,3 @@ doing sundry experimentation: * The jeebak keymap seems to have some neat ideas: - Number layer which is aggressive about having numbers in several places - Touch layer seems interesting - * Trying out sgoodwin's "hold Enter down to get Shift" \ No newline at end of file -- cgit v1.2.3 From af4c25c4753b2d212dd46090f8fc6e322b1d7537 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Mon, 12 Sep 2016 15:20:51 -0500 Subject: My Atreus Layout --- keyboards/atreus/keymaps/erlandsona/keymap.c | 61 ++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 keyboards/atreus/keymaps/erlandsona/keymap.c (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c new file mode 100644 index 000000000..f1555fb1d --- /dev/null +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -0,0 +1,61 @@ +// this is the style you want to emulate. +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, + +#include "atreus.h" + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define BASE 0 +#define NUMS 1 +#define MOUS 2 + +// Some quick aliases, just to make it look pretty +#define _______ KC_TRNS +#define XXXXXXX KC_NO + + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[BASE] = KEYMAP( /* Qwerty */ + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_RSFT , + KC_LCTL, KC_LALT, KC_LSFT, KC_LGUI, KC_BSPC, KC_ESC , KC_ENT, KC_SPC, F(NUMS), KC_QUOT, KC_SLSH, KC_RALT), + +[NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ + KC_GRV , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_1 , KC_2 , KC_3 , KC_4 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + KC_DOT , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, XXXXXXX, KC_BSLS, _______), + +[MOUS] = KEYMAP( /* Mouse and Media Keys */ + KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, + KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, + _______, _______ , _______, _______, _______, _______ , KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) +}; + + +// I prefer this layer switching strategy to the TG and MO functions. +// so that I can get out of mouse mode just by tapping/holding my base layer FN key. +const uint16_t PROGMEM fn_actions[] = { + [BASE] = ACTION_LAYER_OFF(2, 1), // switch back to layer 0 + [NUMS] = ACTION_LAYER_MOMENTARY(1), // to Fn overlay + [MOUS] = ACTION_LAYER_ON(2, 1) // switch to layer 2 +}; + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; -- cgit v1.2.3 From 0c3aede09e131243017dfb89638795e7cd25c969 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Mon, 12 Sep 2016 18:23:24 -0500 Subject: Latest making use of overloaded modifiers... --- keyboards/atreus/keymaps/erlandsona/keymap.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index f1555fb1d..6ca8aaed9 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -18,22 +18,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - KC_Z , KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , KC_RSFT , - KC_LCTL, KC_LALT, KC_LSFT, KC_LGUI, KC_BSPC, KC_ESC , KC_ENT, KC_SPC, F(NUMS), KC_QUOT, KC_SLSH, KC_RALT), + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_SLSH), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_QUOT, KC_RALT , KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_MINS, KC_EQL , KC_LBRC, - KC_TAB , KC_1 , KC_2 , KC_3 , KC_4 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - KC_DOT , XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, XXXXXXX, KC_BSLS, _______), + KC_GRV , KC_7 , KC_8 , KC_9 , KC_0 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_4 , KC_5 , KC_6 , KC_DLR, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______, KC_1 , KC_2 , KC_3 , KC_DOT, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL, F(MOUS), _______, _______, _______, _______, _______, _______), [MOUS] = KEYMAP( /* Mouse and Media Keys */ - KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, - KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, - KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, - _______, _______ , _______, _______, _______, _______ , KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) + KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, + KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, + _______, _______ , _______, _______, _______, _______, KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) }; -- cgit v1.2.3 From cf17eb0f4360fca9ad3910c9cdf0d0ef5155b026 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Mon, 12 Sep 2016 18:36:41 -0500 Subject: Get rid of sleep button... --- keyboards/atreus/keymaps/erlandsona/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 6ca8aaed9..83871219e 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -33,7 +33,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, - _______, _______ , _______, _______, _______, _______, KC_SLEP, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) + _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) }; -- cgit v1.2.3 From e9a093451ea13b18b5dc60d427244efeba593da5 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Mon, 12 Sep 2016 19:54:52 -0500 Subject: Clean up atomic keymap (#9) * Added keyboard help macros * Fixing Atomic PVC keymap / adding print help --- keyboards/atomic/keymaps/pvc/Makefile | 2 +- keyboards/atomic/keymaps/pvc/config.h | 11 +- keyboards/atomic/keymaps/pvc/keymap.c | 458 ++++++++++++++++++---------------- keyboards/planck/keymaps/pvc/keymap.c | 106 ++++++-- 4 files changed, 336 insertions(+), 241 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atomic/keymaps/pvc/Makefile b/keyboards/atomic/keymaps/pvc/Makefile index 278407e6c..ebd75e313 100644 --- a/keyboards/atomic/keymaps/pvc/Makefile +++ b/keyboards/atomic/keymaps/pvc/Makefile @@ -1,7 +1,7 @@ BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = no # Console for debug(+400) +CONSOLE_ENABLE = yes # Console for debug(+400) COMMAND_ENABLE = yes # Commands for debug and configuration NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality diff --git a/keyboards/atomic/keymaps/pvc/config.h b/keyboards/atomic/keymaps/pvc/config.h index 70353323b..18a7253f2 100644 --- a/keyboards/atomic/keymaps/pvc/config.h +++ b/keyboards/atomic/keymaps/pvc/config.h @@ -150,10 +150,17 @@ along with this program. If not, see . */ /* disable debug print */ -//#define NO_DEBUG +#ifndef NO_DEBUG +# define NO_DEBUG +#endif /* disable print */ -//#define NO_PRINT +// #ifndef NO_PRINT +// # define NO_PRINT +// #endif + +/* Only print user print statements */ +#define USER_PRINT /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/atomic/keymaps/pvc/keymap.c b/keyboards/atomic/keymaps/pvc/keymap.c index b02e89d2c..d10bfe3bf 100644 --- a/keyboards/atomic/keymaps/pvc/keymap.c +++ b/keyboards/atomic/keymaps/pvc/keymap.c @@ -2,48 +2,59 @@ #include "action_layer.h" #include "eeconfig.h" #include "led.h" +#include "mousekey.h" #ifdef AUDIO_ENABLE #include "audio.h" #include "song_list.h" #endif -#define LAYER_QWERTY 0 -#define LAYER_COLEMAK 1 -#define LAYER_DVORAK 2 -#define LAYER_UPPER 3 -#define LAYER_LOWER 4 -#define LAYER_FUNCTION 5 -#define LAYER_MOUSE 6 -#define LAYER_ADJUST 7 - -#define MACRO_QWERTY 0 -#define MACRO_COLEMAK 1 -#define MACRO_DVORAK 2 -#define MACRO_UPPER 3 -#define MACRO_LOWER 4 -#define MACRO_FUNCTION 5 -#define MACRO_MOUSE 6 -#define MACRO_TIMBRE_1 7 -#define MACRO_TIMBRE_2 8 -#define MACRO_TIMBRE_3 9 -#define MACRO_TIMBRE_4 10 -#define MACRO_TEMPO_U 11 -#define MACRO_TEMPO_D 12 -#define MACRO_TONE_DEFAULT 13 -#define MACRO_MUSIC_TOGGLE 14 -#define MACRO_AUDIO_TOGGLE 16 -#define MACRO_INC_VOICE 18 -#define MACRO_DEC_VOICE 19 -#define MACRO_BACKLIGHT 20 -#define MACRO_BREATH_TOGGLE 21 -#define MACRO_BREATH_SPEED_INC 23 -#define MACRO_BREATH_SPEED_DEC 24 -#define MACRO_BREATH_DEFAULT 25 +enum keyboard_layers { + LAYER_QWERTY = 0, + LAYER_UPPER, + LAYER_LOWER, + LAYER_FUNCTION, + LAYER_MOUSE, + LAYER_ADJUST, +}; +enum keyboard_macros { + MACRO_QWERTY = 0, + MACRO_UPPER, + MACRO_LOWER, + MACRO_FUNCTION, + MACRO_MOUSE, + MACRO_TIMBRE_1, + MACRO_TIMBRE_2, + MACRO_TIMBRE_3, + MACRO_TIMBRE_4, + MACRO_TEMPO_U, + MACRO_TEMPO_D, + MACRO_TONE_DEFAULT, + MACRO_MUSIC_TOGGLE, + MACRO_AUDIO_TOGGLE, + MACRO_INC_VOICE, + MACRO_DEC_VOICE, + MACRO_BACKLIGHT, + MACRO_BREATH_TOGGLE, + MACRO_BREATH_SPEED_INC, + MACRO_BREATH_SPEED_DEC, + MACRO_BREATH_DEFAULT, + MACRO_MOUSE_MOVE_UL, + MACRO_MOUSE_MOVE_UR, + MACRO_MOUSE_MOVE_DL, + MACRO_MOUSE_MOVE_DR, + MACRO_HELP_1, + MACRO_HELP_2, + MACRO_HELP_3, + MACRO_HELP_4, + MACRO_HELP_5, + MACRO_HELP_6, + MACRO_HELP_7, + MACRO_HELP_8, + MACRO_HELP_9, +}; #define M_QWRTY M(MACRO_QWERTY) -#define M_COLMK M(MACRO_COLEMAK) -#define M_DVORK M(MACRO_DVORAK) #define M_UPPER M(MACRO_UPPER) #define M_LOWER M(MACRO_LOWER) #define M_FUNCT M(MACRO_FUNCTION) @@ -60,6 +71,19 @@ #define M_BSPDU M(MACRO_BREATH_SPEED_INC) #define M_BSPDD M(MACRO_BREATH_SPEED_DEC) #define M_BDFLT M(MACRO_BREATH_DEFAULT) +#define M_MS_UL M(MACRO_MOUSE_MOVE_UL) +#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) +#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) +#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) +#define M_HELP1 M(MACRO_HELP_1) +#define M_HELP2 M(MACRO_HELP_2) +#define M_HELP3 M(MACRO_HELP_3) +#define M_HELP4 M(MACRO_HELP_4) +#define M_HELP5 M(MACRO_HELP_5) +#define M_HELP6 M(MACRO_HELP_6) +#define M_HELP7 M(MACRO_HELP_7) +#define M_HELP8 M(MACRO_HELP_8) +#define M_HELP9 M(MACRO_HELP_9) #define VC_UP M(MACRO_INC_VOICE) @@ -77,6 +101,7 @@ #define SC_ACLS LALT(KC_F4) #define SC_CCLS LCTL(KC_F4) +#define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 #define _______ KC_TRNS @@ -86,169 +111,126 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* QWERTY - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_QWERTY] = { // QWERTY - { 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_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_DEL }, - { 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_ENT, KC_PGUP }, - { 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_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - - /* COLEMAK - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_COLEMAK] = { // COLEMAK - { 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_BSPC }, - { 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_BSLS, KC_DEL }, - { KC_BSPC, 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_ENT, KC_PGUP }, - { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, +/* LAYER = LAYER_QWERTY + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | BACKSP . BACKSP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | CAP LK | A | S | D | F | G | H | J | K | L | ; | ' | ENTER . ENTER | PG UP | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT . RSHIFT | UP | PG DN | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | LCTRL | LWIN | FN | LALT | UPPER | SPACE . SPACE | LOWER | OSHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_QWERTY] = { + { 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_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_DEL }, + { 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_ENT , KC_PGUP }, + { 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_RSFT, KC_UP , KC_PGDN }, + { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC , KC_SPC , M_LOWER, OS_SHFT, KC_RALT, KC_APP , KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT } }, - -/* DVORAK - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | TAB | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | DEL | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAPS | A | O | E | U | I | D | H | T | N | S | - | XXXXXX . ENTER | PG UP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_DVORAK] = { // DVORAK - { 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_BSPC, KC_BSPC }, - { 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_BSLS, KC_DEL }, - { KC_CAPS, 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_ENT, KC_PGUP }, - { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, - { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, - }, - -/* UPPER - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | PRINT | BR TOG | BR SP+ | BR SP- | BR RST | XXXXXX | XXXXXX | NUM LK | / | * | | NUM LK | SCR LK | XXXXXX . PAUSE | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | XXXXXX . | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | 0 | | RALT | . | ENTER | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_UPPER] = { // UPPER - { KC_PSCR, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PAUS }, - { _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, - { KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, ________________, KC_HOME }, - { _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, ________________, _______, KC_END }, - { _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ }, - }, - -/* LOWER - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . BACKSP | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | | $ | { | [ | ( | % | # | ) | ] | } | @ | | | | INS | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | | ^ | * | + | - | / | \ | _ | ' | " | ` | | XXXXXX . | HOME | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | | | & | ! | ~ | ; | : | = | < | > | ? | XXXXXX . | | END | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | | | | | | | | | | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_LOWER] = { // LOWER - { _______, 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_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, _______, _______, _______, KC_INS }, - { _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, _______, ________________, KC_HOME }, - { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL, KC_LT, KC_GT, KC_QUES, ________________, _______, KC_END }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, - -/* FUNCTION - * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. - * | NUM LK | | | | | | | | | | | | | XXXXXX . | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| - * | SCR LK | F13 | F14 | F15 | F16 | | | | | | | | | | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| - * | CAP LK | F17 | F18 | F19 | F20 | | | | | | | | XXXXXX . | | - * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| - * | | F21 | F22 | F23 | F24 | | | | | | | XXXXXX . | VOL UP | MUTE | - * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| - * | | | | | | PLAY/PAUSE | | | | | | PTRACK | VOL DN | NTRACK | - * '--------------------------------------------------------------------------------------------------------------------------------------' - */ - - [LAYER_FUNCTION] = { // FUNCTION - { KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, - { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, XXXXXXX }, - { _______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_VOLU, KC_MUTE }, - { _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }, - }, - -#ifdef MOUSEKEY_ENABLE - - [LAYER_MOUSE] = { // MOUSE - { _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, - { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, - { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U }, - { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_MS_U, KC_WH_D }, - { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, - }, - -#endif - - [LAYER_ADJUST] = { // ADJUST - { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, _______, MU_TOG, AU_TOG, ________________ }, - { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, - { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, ________________, MUV_IN, _______ }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, MUV_DE, _______ }, - }, - - -/* - [LAYER_EMPTY] = { // LAYER - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, - { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, _______ }, - { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, - }, +/* LAYER = LAYER_UPPER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | NUM LK | KP / | KP * | KP - | XXXXXX | XXXXXX | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | PAUSE | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP ENT | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP ENT | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' */ - +[LAYER_UPPER] = { + { KC_PSCR, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, XXXXXXX, XXXXXXX, _______, _______ }, + { KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, + { _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, KC_HOME }, + { _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, KC_END }, + { _______, _______, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ } +}, +/* LAYER = LAYER_LOWER + .--------------------------------------------------------------------------------------------------------------------------------------. + | PRINT | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | ______ . ______ | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | ______ | INS | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ . ______ | HOME | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ . ______ | ______ | END | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | ______ | ______ | ______ | ______ | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_LOWER] = { + { KC_PSCR, 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_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, KC_INS }, + { _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, KC_HOME }, + { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, KC_END }, + { _______, _______, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, _______, _______, _______, _______ } +}, +/* LAYER = LAYER_FUNCTION + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F13 | F14 | F15 | F16 | NUM LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | F17 | F18 | F19 | F20 | SCR LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | F21 | F22 | F23 | F24 | CAP LK | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | ______ . ______ | VOL UP | MUTE | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | FN | ______ | ______ | PLAY . PLAY | ______ | ______ | ______ | ______ | ______ | PREV | VOL DN | NEXT | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_FUNCTION] = { + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, KC_F13 , KC_F14 , KC_F15 , KC_F16 , KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , KC_SLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { _______, KC_F21 , KC_F22 , KC_F23 , KC_F24 , KC_CAPS, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, _______, KC_VOLU, KC_MUTE }, + { _______, _______, M_FUNCT, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT } +}, +/* LAYER = LAYER_MOUSE + .--------------------------------------------------------------------------------------------------------------------------------------. + | ESC | MS AC0 | MS AC1 | MS AC2 | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS UL | MS U | MS UR | XXXXXX | XXXXXX | XXXXXX | MS WHL | MS WHR | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | MS BT5 | MS BT4 | MS BT3 | MS BT2 | XXXXXX | XXXXXX | MS L | XXXXXX | MS R | XXXXXX | XXXXXX | XXXXXX . XXXXXX | MS WHU | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | MS DL | MS D | MS DR | XXXXXX | ______ . ______ | MS U | MS WHD | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | ______ | ______ | ______ | ______ | ______ | MS BT1 . MS BT1 | ______ | ______ | ______ | ______ | ______ | MS L | MS D | MS R | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_MOUSE] = { + { KC_ESC , KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_UL, KC_MS_U, M_MS_UR, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_L, KC_WH_R }, + { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, KC_MS_L, XXXXXXX, KC_MS_R, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_U }, + { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_MS_DL, KC_MS_D, M_MS_DR, XXXXXXX, _______, _______, KC_MS_U, KC_WH_D }, + { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R } +}, +/* LAYER = LAYER_ADJUST + .--------------------------------------------------------------------------------------------------------------------------------------. + | XXXXXX | HELP 1 | HELP 2 | HELP 3 | HELP 4 | HELP 5 | HELP 6 | HELP 7 | HELP 8 | HELP 9 | XXXXXX | MUSIC | AUDIO | XXXXXX . XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | BRTOG | BRSPD+ | BRSPD- | BRDFLT | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | QWERTY | XXXXXX | XXXXXX | BACKLT | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX . XXXXXX | VOICE+ | XXXXXX | + |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | TEMPO- | VOICE- | TEMPO+ | + '--------------------------------------------------------------------------------------------------------------------------------------' +*/ +[LAYER_ADJUST] = { + { XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, M_HELP5, M_HELP6, M_HELP7, M_HELP8, M_HELP9, XXXXXXX, MU_TOG , AU_TOG , XXXXXXX, XXXXXXX }, + { XXXXXXX, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, + { XXXXXXX, M_QWRTY, XXXXXXX, XXXXXXX, M_BACKL, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, MUV_IN , XXXXXXX }, + { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TMPO_DN, MUV_DE , TMPO_UP } +}, }; #ifdef AUDIO_ENABLE @@ -290,61 +272,101 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) switch(id) { - case MACRO_BREATH_TOGGLE: + case MACRO_HELP_1: if (record->event.pressed) { - breathing_toggle(); + uprintf("1"); } break; - case MACRO_BREATH_SPEED_INC: + case MACRO_HELP_2: if (record->event.pressed) { - breathing_speed_inc(1); + uprintf("2"); } break; - case MACRO_BREATH_SPEED_DEC: + case MACRO_HELP_3: if (record->event.pressed) { - breathing_speed_dec(1); + uprintf("3"); } break; - case MACRO_BREATH_DEFAULT: + case MACRO_HELP_4: if (record->event.pressed) { - breathing_defaults(); + uprintf("4"); } break; - case MACRO_QWERTY: + case MACRO_HELP_5: if (record->event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) { - persistant_default_layer_set(1UL<event.pressed) + { + uprintf("8"); + } + break; + + case MACRO_HELP_9: + if (record->event.pressed) + { + uprintf("9"); + } + break; + + case MACRO_BREATH_TOGGLE: + if (record->event.pressed) + { + breathing_toggle(); + } + break; + + case MACRO_BREATH_SPEED_INC: + if (record->event.pressed) + { + breathing_speed_inc(1); + } + break; + + case MACRO_BREATH_SPEED_DEC: + if (record->event.pressed) + { + breathing_speed_dec(1); + } + break; + + case MACRO_BREATH_DEFAULT: + if (record->event.pressed) + { + breathing_defaults(); + } + break; + + case MACRO_QWERTY: + if (record->event.pressed) + { + persistant_default_layer_set(1UL<event.pressed) + { + uprintf("1"); + } + break; + + case MACRO_HELP_2: + if (record->event.pressed) + { + uprintf("2"); + } + break; + + case MACRO_HELP_3: + if (record->event.pressed) + { + uprintf("3"); + } + break; + + case MACRO_HELP_4: + if (record->event.pressed) + { + uprintf("4"); + } + break; + + case MACRO_HELP_5: + if (record->event.pressed) + { + uprintf("5"); + } + break; + + case MACRO_HELP_6: + if (record->event.pressed) + { + uprintf("6"); + } + break; + + case MACRO_HELP_7: + if (record->event.pressed) + { + uprintf("7"); + } + break; + + case MACRO_HELP_8: + if (record->event.pressed) + { + uprintf("8"); + } + break; + + case MACRO_HELP_9: + if (record->event.pressed) + { + uprintf("9"); + } + break; + case MACRO_BREATH_TOGGLE: if (record->event.pressed) { -- cgit v1.2.3 From cb1ac2a3edf637a3e2ecb53f0627212d1f5abb08 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Mon, 12 Sep 2016 20:20:31 -0500 Subject: Fixed NO_PRINT / USER_PRINT conflict warning. --- keyboards/atomic/keymaps/pvc/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/atomic/keymaps/pvc/Makefile b/keyboards/atomic/keymaps/pvc/Makefile index ebd75e313..c7c04485f 100644 --- a/keyboards/atomic/keymaps/pvc/Makefile +++ b/keyboards/atomic/keymaps/pvc/Makefile @@ -1,4 +1,4 @@ -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) MOUSEKEY_ENABLE = yes # Mouse keys(+4700) EXTRAKEY_ENABLE = yes # Audio control and System control(+450) CONSOLE_ENABLE = yes # Console for debug(+400) -- cgit v1.2.3 From 6098704145c95f7854e0696e6137332e8e12faf8 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Tue, 13 Sep 2016 09:54:18 -0500 Subject: Small update --- keyboards/atreus/keymaps/erlandsona/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 83871219e..9e11ac048 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -18,10 +18,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_SLSH), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_QUOT, KC_RALT , KC_BSLS ), + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ KC_GRV , KC_7 , KC_8 , KC_9 , KC_0 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, @@ -32,7 +32,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [MOUS] = KEYMAP( /* Mouse and Media Keys */ KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, KC_VOLD, KC_ACL0 , KC_ACL1, KC_ACL2, KC_VOLU, KC_MS_L, KC_MS_D, KC_MS_U, KC_MS_R, KC_F3, - KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_L, KC_WH_U, KC_WH_D, KC_WH_R, KC_F2, + KC_MUTE, KC_MPRV , KC_MPLY, KC_MNXT, KC_MUTE, KC_WH_R, KC_WH_U, KC_WH_D, KC_WH_L, KC_F2, _______, _______ , _______, _______, _______, _______, _______, KC_BTN1, F(BASE), RESET , KC_F12 , KC_F1) }; -- cgit v1.2.3 From 3668b295200c53e7131551bc906264ecc54e6b04 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Tue, 13 Sep 2016 11:16:53 -0500 Subject: Shorten TAPPING_TERM for better responsiveness of overloaded keys... --- keyboards/atreus/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'keyboards') diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index 51162cde3..a59eee18e 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -49,6 +49,9 @@ along with this program. If not, see . # define UNUSED_PINS #endif +/* Make Overloaded Keys switch faster */ +#define TAPPING_TERM 175 + /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW -- cgit v1.2.3 From 344929e0675f9857503b0dd2cd307984a57d61aa Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 15:48:50 -0400 Subject: Give layers longer names --- keyboards/planck/keymaps/cbbrowne/keymap.c | 40 +++++++++++++++--------------- 1 file changed, 20 insertions(+), 20 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 1bfd142e9..85f8e3472 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -65,10 +65,10 @@ */ enum layers { - _QW = 0, /* Qwerty mapping */ - _LW, /* Lower layer, where top line has symbols !@#$%^&*() */ - _RS, /* Raised layer, where top line has digits 1234567890 */ - _KP, /* Key pad */ + _QWERTY = 0, /* Qwerty mapping */ + _LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */ + _RAISE, /* Raised layer, where top line has digits 1234567890 */ + KEYPAD, /* Key pad */ _ADJUST, /* Special Adjust layer coming via tri-placement */ }; @@ -88,30 +88,30 @@ enum macro_id { /* Note that Planck has dimensions 4 rows x 12 columns */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[_QW] = { /* Qwerty */ +[_QWERTY] = { /* Qwerty */ {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, 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_QUOT }, {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, -[_RS] = { /* RAISE */ +[_RAISE] = { /* RAISE */ {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_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, DF(_QW), DF(_KP), DF(_KP), RESET, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, -[_LW] = { /* LOWER */ +[_LOWER] = { /* LOWER */ {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_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, DF(_QW), DF(_KP), DF(_KP), RESET, _______}, - {_______, DF(_KP), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, + {_______, DF(KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, -[_KP] = { /* Key Pad */ +[KEYPAD] = { /* Key Pad */ {KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, - {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QW), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} + {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QWERTY), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} }, [_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ @@ -187,25 +187,25 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case MACRO_UPPER: if (record->event.pressed) { - layer_on(_RS); - update_tri_layer(_LW, _RS, _ADJUST); + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_RS); - update_tri_layer(_LW, _RS, _ADJUST); + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; case MACRO_LOWER: if (record->event.pressed) { - layer_on(_LW); - update_tri_layer(_LW, _RS, _ADJUST); + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } else { - layer_off(_LW); - update_tri_layer(_LW, _RS, _ADJUST); + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); } break; -- cgit v1.2.3 From fdeaf1d9f8c87a0266066799fd14b808f6debe29 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 15:49:46 -0400 Subject: Give layers longer names --- keyboards/planck/keymaps/cbbrowne/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 85f8e3472..8051721cd 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -68,7 +68,7 @@ enum layers { _QWERTY = 0, /* Qwerty mapping */ _LOWER, /* Lower layer, where top line has symbols !@#$%^&*() */ _RAISE, /* Raised layer, where top line has digits 1234567890 */ - KEYPAD, /* Key pad */ + _KEYPAD, /* Key pad */ _ADJUST, /* Special Adjust layer coming via tri-placement */ }; @@ -98,16 +98,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_RAISE] = { /* RAISE */ {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_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, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_LOWER] = { /* LOWER */ {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_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, DF(_QWERTY), DF(KEYPAD), DF(KEYPAD), RESET, _______}, - {_______, DF(KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, + {_______, DF(_KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, -[KEYPAD] = { /* Key Pad */ +[_KEYPAD] = { /* Key Pad */ {KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, -- cgit v1.2.3 From 5be2795ca1b8c3e555fb7fb3a2d7fca69d2db9b4 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 16:17:51 -0400 Subject: C macros for my favorite complex keystrokes --- keyboards/planck/keymaps/cbbrowne/keymap.c | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 8051721cd..fafc47e1d 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -84,6 +84,13 @@ enum macro_id { #define M_LOWER M(MACRO_LOWER) #define M_UPPER M(MACRO_UPPER) +#define ROT_LED M(M_LED) /* Rotate LED */ +#define QWERTY DF(_QWERTY) /* Switch to QWERTY layout */ +#define KEYPAD DF(_KEYPAD) /* Switch to keypad */ +#define USERNAME M(M_USERNAME) /* shortcut for username */ +#define RANDDIG M(M_RANDDIGIT) +#define RANDALP M(M_RANDLETTER) + /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -92,32 +99,32 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, 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_QUOT }, - {KC_TAB, M(M_LED), KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, ROT_LED, KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, [_RAISE] = { /* RAISE */ {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_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, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_LOWER] = { /* LOWER */ {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_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, DF(_QWERTY), DF(_KEYPAD), DF(_KEYPAD), RESET, _______}, - {_______, DF(_KEYPAD), _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} + {_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, QWERTY, KEYPAD, KEYPAD, RESET, _______}, + {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} }, [_KEYPAD] = { /* Key Pad */ - {KC_ESC, M(M_USERNAME), M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, - {KC_LCTL, M(M_RANDDIGIT), KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, - {KC_LSFT, M(M_RANDLETTER), KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, - {BL_STEP, M(M_LED), KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, DF(_QWERTY), KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} + {KC_ESC, USERNAME, M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, + {KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, + {KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, + {BL_STEP, ROT_LED, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} }, [_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ - { M(M_LED), _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, - {_______, _______, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, + { ROT_LED, USERNAME, M(M_VERSION), _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } } }; -- cgit v1.2.3 From 5d643bb7ee8375a354693f19a6e9eae44f825532 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Tue, 13 Sep 2016 16:29:01 -0400 Subject: Got Right SHIFT + Right CTRL --- keyboards/planck/keymaps/cbbrowne/keymap.c | 6 ++++-- keyboards/planck/keymaps/cbbrowne/readme.md | 7 ++++++- 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index fafc47e1d..d6f8a6ed4 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -90,6 +90,8 @@ enum macro_id { #define USERNAME M(M_USERNAME) /* shortcut for username */ #define RANDDIG M(M_RANDDIGIT) #define RANDALP M(M_RANDLETTER) +#define CTLENTER MT(MOD_RCTL, KC_ENT) +#define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -97,8 +99,8 @@ enum macro_id { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_QWERTY] = { /* Qwerty */ {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, MT(MOD_RSFT, 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_QUOT }, + {KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE }, {KC_TAB, ROT_LED, KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index e9e423ed9..272e042a0 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -25,7 +25,12 @@ doing sundry experimentation: - Key [3][2] aka "z" uses a random number generator to select a letter a-z at random - Key [1][3] aka "e" spits out the keymap version number * Trying out sgoodwin's "hold Enter down to get Shift" - + - Liking this Quite Well Enough... + - Applied this to both Shift and Quote + * I have added an alternate ADJUST layer that is activated via update_tri_layer() + - e.g. - LOWER+RAISE simultaneously + - This seems entirely more useful for handling my "special keys" + like the random numbers, user name, and such, than the keypad layer 2. Some code structure ideas --------------------------------------------------- -- cgit v1.2.3 From 9c574b493c3d098d2c4f2475dfc1564a182acce0 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 13 Sep 2016 22:05:10 -0500 Subject: Changed Docs, Moved RetroRefit to Handwired --- keyboards/arrow_pad/readme.md | 113 ++++++++++++++++++- keyboards/handwired/retro_refit/Makefile | 3 + keyboards/handwired/retro_refit/config.h | 123 +++++++++++++++++++++ .../handwired/retro_refit/keymaps/default/keymap.c | 33 ++++++ keyboards/handwired/retro_refit/readme.md | 60 ++++++++++ keyboards/handwired/retro_refit/retro_refit.c | 47 ++++++++ keyboards/handwired/retro_refit/retro_refit.h | 38 +++++++ keyboards/handwired/retro_refit/rules.mk | 68 ++++++++++++ keyboards/retro_refit/Makefile | 3 - keyboards/retro_refit/config.h | 123 --------------------- keyboards/retro_refit/keymaps/default/keymap.c | 33 ------ keyboards/retro_refit/readme.md | 26 ----- keyboards/retro_refit/retro_refit.c | 47 -------- keyboards/retro_refit/retro_refit.h | 38 ------- keyboards/retro_refit/rules.mk | 68 ------------ keyboards/vision_division/readme.md | 6 + 16 files changed, 488 insertions(+), 341 deletions(-) create mode 100644 keyboards/handwired/retro_refit/Makefile create mode 100644 keyboards/handwired/retro_refit/config.h create mode 100644 keyboards/handwired/retro_refit/keymaps/default/keymap.c create mode 100644 keyboards/handwired/retro_refit/readme.md create mode 100644 keyboards/handwired/retro_refit/retro_refit.c create mode 100644 keyboards/handwired/retro_refit/retro_refit.h create mode 100644 keyboards/handwired/retro_refit/rules.mk delete mode 100644 keyboards/retro_refit/Makefile delete mode 100644 keyboards/retro_refit/config.h delete mode 100644 keyboards/retro_refit/keymaps/default/keymap.c delete mode 100644 keyboards/retro_refit/readme.md delete mode 100644 keyboards/retro_refit/retro_refit.c delete mode 100644 keyboards/retro_refit/retro_refit.h delete mode 100644 keyboards/retro_refit/rules.mk (limited to 'keyboards') diff --git a/keyboards/arrow_pad/readme.md b/keyboards/arrow_pad/readme.md index 2e9a64f2e..d0d172272 100644 --- a/keyboards/arrow_pad/readme.md +++ b/keyboards/arrow_pad/readme.md @@ -1,13 +1,120 @@ arrow_pad keyboard firmware ====================== +## Keyboard Info + +The ArrowPad is a wired conversion that can be made to any stand-alone keypad. It uses two main layers - a standard numpad, and a more advanced arrow cluster navigator. + +The first 24-key ArrowPad was handwired, but the PCB was wired as listed below. + +``` + pin + (Silkscreen Name if different) - + + +Note: +U2 pin 2 is the Num Lock LED and is active low. + +U2 pin 1 +Clear (Num Lock) - 1 +Enter - 2 +Esc (ESC) - 2 + + +U2 pin 3 +- - 1 + +U2 pin 4 +7 - 2 +8 - 2 +9 - 2 + +U2 pin 5 +* - 2 +Delete (BACK SPACE) - 2 + +U2 pin 6 +1 - 2 +0 - 2 +. - 2 +, - 2 + +U2 pin 7 +4 - 2 +5 - 2 +6 - 2 + +U2 pin 8 +Tab - 2 += (/) - 2 + +U2 pin 13 +Delete (BACK SPACE) - 1 +9 - 1 +6 - 1 +3 - 1 +. - 1 + +U2 pin 14 +Tab - 1 +8 - 1 +5 - 1 +2 - 1 +0 - 1 + +U2 pin 15 +Esc (ESC) - 1 += (/) - 1 +/ (*) - 1 +7 - 1 +4 - 1 +1 - 1 ++ - 1 + +U2 pin 16 +Enter - 1 +* (<--) - 1 +, - 1 + +U2 pin 17 +Fn (#NAME?) - 1 +- - 2 +Clear (Num Lock) - 2 + +U2 pin 18 +Fn (#NAME?) - 2 +* (<--) - 2 ++ - 2 +3 - 2 +2 - 2 +``` + +More info can be found on [GeekHack](https://geekhack.org/index.php?topic=73632.msg1802497#msg1802497) + +The second ArrowPad was a conversion from a 21-key Genovation keypad. It used a 2 row x 11 column matrix. + +``` +#define KEYMAP( \ + KM_ESC, KM_TAB, KM_BSL, KM_ARR, \ + KM_NUM, KM_FSL, KM_AST, KM_MIN, \ + KM___7, KM___8, KM___9, ___PLS, \ + KM___4, KM___5, KM___6, KM_PLS, \ + KM___1, KM___2, KM___3, ___ENT, \ + KM___0, _____0, KM_DOT, KM_ENT \ +) { \ + { KM_ESC, KM_TAB, KM_BSL, KM_ARR, KM___7, KM___8, KM___9, KM_PLS, KM___1, KM___2, KM___3, }, \ + { KM_NUM, KM_FSL, KM_AST, KM_MIN, KM___4, KM___5, KM___6, KM_ENT, KC_NO, KM___0, KM_DOT, }, \ +} +``` + + ## Quantum MK Firmware For the full Quantum feature list, see [the parent readme.md](/readme.md). ## Building -Download or clone the whole firmware and navigate to the keyboards/arrow_pad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. +Download or clone the whole firmware and navigate to the keyboards/arrow_pad folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. Depending on which keymap you would like to use, you will have to compile slightly differently. @@ -20,7 +127,7 @@ Several version of keymap are available in advance but you are recommended to de To build the firmware binary hex file with a keymap just do `make` with a keymap like this: ``` -$ make [default|jack|] +$ make [default|pad_21|pad_24|] ``` -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. diff --git a/keyboards/handwired/retro_refit/Makefile b/keyboards/handwired/retro_refit/Makefile new file mode 100644 index 000000000..191c6bb66 --- /dev/null +++ b/keyboards/handwired/retro_refit/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../../Makefile +endif \ No newline at end of file diff --git a/keyboards/handwired/retro_refit/config.h b/keyboards/handwired/retro_refit/config.h new file mode 100644 index 000000000..f2194e550 --- /dev/null +++ b/keyboards/handwired/retro_refit/config.h @@ -0,0 +1,123 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Nobody +#define PRODUCT retro_refit +#define DESCRIPTION Retro Refit + +/* key matrix size */ +#define MATRIX_ROWS 11 +#define MATRIX_COLS 8 + +// See note in retro_refit.h for an explanation of how this matrix is wired up +#define MATRIX_ROW_PINS { D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } +#define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D3, C7, D5 } +#define UNUSED_PINS + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 0 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + + +/* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ +#define FORCE_NKRO + +/* + * Magic key options + * These options allow the magic key functionality to be changed. This is useful + * if your keyboard/keypad is missing keys and you want magic key support. + */ + +/* key combination for magic key command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* control how magic key switches layers */ +//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true +//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false + +/* remap magic keys */ +//#define MAGIC_KEY_HELP1 H +//#define MAGIC_KEY_HELP2 SLASH +//#define MAGIC_KEY_DEBUG D +//#define MAGIC_KEY_DEBUG_MATRIX X +//#define MAGIC_KEY_DEBUG_KBD K +//#define MAGIC_KEY_DEBUG_MOUSE M +//#define MAGIC_KEY_VERSION V +//#define MAGIC_KEY_STATUS S +//#define MAGIC_KEY_CONSOLE C +//#define MAGIC_KEY_LAYER0_ALT1 ESC +//#define MAGIC_KEY_LAYER0_ALT2 GRAVE +//#define MAGIC_KEY_LAYER0 0 +//#define MAGIC_KEY_LAYER1 1 +//#define MAGIC_KEY_LAYER2 2 +//#define MAGIC_KEY_LAYER3 3 +//#define MAGIC_KEY_LAYER4 4 +//#define MAGIC_KEY_LAYER5 5 +//#define MAGIC_KEY_LAYER6 6 +//#define MAGIC_KEY_LAYER7 7 +//#define MAGIC_KEY_LAYER8 8 +//#define MAGIC_KEY_LAYER9 9 +//#define MAGIC_KEY_BOOTLOADER PAUSE +#define MAGIC_KEY_LOCK BSLS +//#define MAGIC_KEY_EEPROM E +//#define MAGIC_KEY_NKRO N +//#define MAGIC_KEY_SLEEP_LED Z + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/handwired/retro_refit/keymaps/default/keymap.c b/keyboards/handwired/retro_refit/keymaps/default/keymap.c new file mode 100644 index 000000000..405402d5e --- /dev/null +++ b/keyboards/handwired/retro_refit/keymaps/default/keymap.c @@ -0,0 +1,33 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "retro_refit.h" + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[0] = + KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \ + GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \ + TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \ + BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \ + LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \ + LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/handwired/retro_refit/readme.md b/keyboards/handwired/retro_refit/readme.md new file mode 100644 index 000000000..9f10edf9f --- /dev/null +++ b/keyboards/handwired/retro_refit/readme.md @@ -0,0 +1,60 @@ +retro_refit keyboard firmware +====================== + +## Keyboard Info + +The retro refit keyboard used a Teensy to replace the original controller on a 386 "laptop". + +http://imgur.com/a/08Fyj + +This keyboard uses a KEYMAP macro that is a great example of using a non-standard row-column matrix. The keyboard in question had 11 rows and 8 columns, but the rows were not all horizontal, and the columns were not all vertical. For example, row 2 contained "Print Screen", "N", "M", ",", ".", "/", "Right Shift", and"Left Alt". Column 0 contained "F6", "7", "O", "'", "Q", "D", "B", "Left Alt", "Up Arrow", and "Down Arrow". + +The macro makes programming the keys easier and in a more straight-forward manner because it realigns the keys into a 6x15 sensible keyboard layout instead of the obtuse 11x8 matrix. Each Kxy corrisponds to a key in row x column y. + +``` +#define KEYMAP( \ + K77, K05, K04, K03, K02, K01, K00, KA7, KA6, KA5, KA4, KA3, KA2, K11, K94, \ + K27, K76, K75, K74, K73, K72, K71, K70, K67, K66, K65, K64, K63, K62, KA1, \ + K61, K60, K57, K56, K55, K54, K53, K52, K51, K50, K47, K46, K45, K97, \ + K43, K42, K41, K40, K37, K36, K35, K34, K33, K32, K31, K30, K44, K87, \ + K26, K24, K23, K22, K21, K20, K17, K16, K15, K14, K13, K12, KA0, K91, \ + K10, K06, K25, K07, K86, K85, K95, K90, K93 \ +) { \ +{ KC_##K00, KC_##K01, KC_##K02, KC_##K03, KC_##K04, KC_##K05, KC_##K06, KC_##K07, }, \ +{ KC_##K10, KC_##K11, KC_##K12, KC_##K13, KC_##K14, KC_##K15, KC_##K16, KC_##K17, }, \ +{ KC_##K20, KC_##K21, KC_##K22, KC_##K23, KC_##K24, KC_##K25, KC_##K26, KC_##K27, }, \ +{ KC_##K30, KC_##K31, KC_##K32, KC_##K33, KC_##K34, KC_##K35, KC_##K36, KC_##K37, }, \ +{ KC_##K40, KC_##K41, KC_##K42, KC_##K43, KC_##K44, KC_##K45, KC_##K46, KC_##K47, }, \ +{ KC_##K50, KC_##K51, KC_##K52, KC_##K53, KC_##K54, KC_##K55, KC_##K56, KC_##K57, }, \ +{ KC_##K60, KC_##K61, KC_##K62, KC_##K63, KC_##K64, KC_##K65, KC_##K66, KC_##K67, }, \ +{ KC_##K70, KC_##K71, KC_##K72, KC_##K73, KC_##K74, KC_##K75, KC_##K76, KC_##K77, }, \ +{ KC_NO, KC_NO, KC_NO, KC_NO, KC_NO, KC_##K85, KC_##K86, KC_##K87, }, \ +{ KC_##K90, KC_##K91, KC_NO, KC_##K93, KC_##K94, KC_##K95, KC_NO, KC_##K97, }, \ +{ KC_##KA0, KC_##KA1, KC_##KA2, KC_##KA3, KC_##KA4, KC_##KA5, KC_##KA6, KC_##KA7, } \ +} +``` + + +## Quantum MK Firmware + +For the full Quantum feature list, see [the parent readme.md](/readme.md). + +## Building + +Download or clone the whole firmware and navigate to the keyboards/retro_refit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. + +Depending on which keymap you would like to use, you will have to compile slightly differently. + +### Default +To build with the default keymap, simply run `make default`. + +### Other Keymaps +Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. + +To build the firmware binary hex file with a keymap just do `make` with a keymap like this: + +``` +$ make [default|jack|] +``` + +Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/handwired/retro_refit/retro_refit.c b/keyboards/handwired/retro_refit/retro_refit.c new file mode 100644 index 000000000..3d610eba3 --- /dev/null +++ b/keyboards/handwired/retro_refit/retro_refit.c @@ -0,0 +1,47 @@ +#include "retro_refit.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + + // Disable status LED on KB, enable status LED on Teensy (KB_STATUS = !TEENSY_STATUS) + DDRD |= (1<<6); + PORTD |= (1<<6); + + matrix_init_user(); +}; + +void led_set_kb(uint8_t usb_led) { + // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here + + if (usb_led & (1< - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x6060 -#define DEVICE_VER 0x0001 -#define MANUFACTURER Nobody -#define PRODUCT retro_refit -#define DESCRIPTION Retro Refit - -/* key matrix size */ -#define MATRIX_ROWS 11 -#define MATRIX_COLS 8 - -// See note in retro_refit.h for an explanation of how this matrix is wired up -#define MATRIX_ROW_PINS { D4, D7, B4, B5, B6, F7, F6, F5, F4, F1, F0 } -#define MATRIX_COL_PINS { B0, B1, B2, B3, D2, D3, C7, D5 } -#define UNUSED_PINS - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 0 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCING_DELAY 5 - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - - -/* Force NKRO Mode - If forced on, must be disabled via magic key (default = LShift+RShift+N) */ -#define FORCE_NKRO - -/* - * Magic key options - * These options allow the magic key functionality to be changed. This is useful - * if your keyboard/keypad is missing keys and you want magic key support. - */ - -/* key combination for magic key command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ -) - -/* control how magic key switches layers */ -//#define MAGIC_KEY_SWITCH_LAYER_WITH_FKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_NKEYS true -//#define MAGIC_KEY_SWITCH_LAYER_WITH_CUSTOM false - -/* remap magic keys */ -//#define MAGIC_KEY_HELP1 H -//#define MAGIC_KEY_HELP2 SLASH -//#define MAGIC_KEY_DEBUG D -//#define MAGIC_KEY_DEBUG_MATRIX X -//#define MAGIC_KEY_DEBUG_KBD K -//#define MAGIC_KEY_DEBUG_MOUSE M -//#define MAGIC_KEY_VERSION V -//#define MAGIC_KEY_STATUS S -//#define MAGIC_KEY_CONSOLE C -//#define MAGIC_KEY_LAYER0_ALT1 ESC -//#define MAGIC_KEY_LAYER0_ALT2 GRAVE -//#define MAGIC_KEY_LAYER0 0 -//#define MAGIC_KEY_LAYER1 1 -//#define MAGIC_KEY_LAYER2 2 -//#define MAGIC_KEY_LAYER3 3 -//#define MAGIC_KEY_LAYER4 4 -//#define MAGIC_KEY_LAYER5 5 -//#define MAGIC_KEY_LAYER6 6 -//#define MAGIC_KEY_LAYER7 7 -//#define MAGIC_KEY_LAYER8 8 -//#define MAGIC_KEY_LAYER9 9 -//#define MAGIC_KEY_BOOTLOADER PAUSE -#define MAGIC_KEY_LOCK BSLS -//#define MAGIC_KEY_EEPROM E -//#define MAGIC_KEY_NKRO N -//#define MAGIC_KEY_SLEEP_LED Z - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -//#define NO_DEBUG - -/* disable print */ -//#define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION - -#endif diff --git a/keyboards/retro_refit/keymaps/default/keymap.c b/keyboards/retro_refit/keymaps/default/keymap.c deleted file mode 100644 index 405402d5e..000000000 --- a/keyboards/retro_refit/keymaps/default/keymap.c +++ /dev/null @@ -1,33 +0,0 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -#include "retro_refit.h" - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -[0] = - KEYMAP( ESC, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NLCK, SLCK, PSCR, PAUS, \ - GRV, 1, 2, 3, 4, 5, 6, 7, 8, 9, 0, MINS, EQL, BSPC, HOME, \ - TAB, Q, W, E, R, T, Y, U, I, O, P, LBRC, RBRC, PGUP, \ - BSLS, A, S, D, F, G, H, J, K, L, SCLN, QUOT, ENT, PGDN, \ - LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, RSFT, UP, END, \ - LCTL, LGUI, LALT, SPC, INS, DEL, LEFT, DOWN, RGHT), -}; - -const uint16_t PROGMEM fn_actions[] = { - -}; - -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); - } else { - unregister_code(KC_RSFT); - } - break; - } - return MACRO_NONE; -}; diff --git a/keyboards/retro_refit/readme.md b/keyboards/retro_refit/readme.md deleted file mode 100644 index 77df861ce..000000000 --- a/keyboards/retro_refit/readme.md +++ /dev/null @@ -1,26 +0,0 @@ -retro_refit keyboard firmware -====================== - -## Quantum MK Firmware - -For the full Quantum feature list, see [the parent readme.md](/readme.md). - -## Building - -Download or clone the whole firmware and navigate to the keyboards/retro_refit folder. Once your dev env is setup, you'll be able to type `make` to generate your .hex - you can then use the Teensy Loader to program your .hex file. - -Depending on which keymap you would like to use, you will have to compile slightly differently. - -### Default -To build with the default keymap, simply run `make default`. - -### Other Keymaps -Several version of keymap are available in advance but you are recommended to define your favorite layout yourself. To define your own keymap create file named `.c` and see keymap document (you can find in top readme.md) and existent keymap files. - -To build the firmware binary hex file with a keymap just do `make` with a keymap like this: - -``` -$ make [default|jack|] -``` - -Keymaps follow the format **__\.c__** and are stored in the `keymaps` folder. \ No newline at end of file diff --git a/keyboards/retro_refit/retro_refit.c b/keyboards/retro_refit/retro_refit.c deleted file mode 100644 index 3d610eba3..000000000 --- a/keyboards/retro_refit/retro_refit.c +++ /dev/null @@ -1,47 +0,0 @@ -#include "retro_refit.h" -#include "led.h" - -void matrix_init_kb(void) { - // put your keyboard start-up code here - // runs once when the firmware starts up - - // Disable status LED on KB, enable status LED on Teensy (KB_STATUS = !TEENSY_STATUS) - DDRD |= (1<<6); - PORTD |= (1<<6); - - matrix_init_user(); -}; - -void led_set_kb(uint8_t usb_led) { - // put your keyboard LED indicator (ex: Caps Lock LED) toggling code here - - if (usb_led & (1< Date: Wed, 14 Sep 2016 09:39:16 -0500 Subject: Copy config overrides to my keymap directory... --- keyboards/atreus/config.h | 3 - keyboards/atreus/keymaps/erlandsona/config.h | 101 +++++++++++++++++++++++++++ 2 files changed, 101 insertions(+), 3 deletions(-) create mode 100644 keyboards/atreus/keymaps/erlandsona/config.h (limited to 'keyboards') diff --git a/keyboards/atreus/config.h b/keyboards/atreus/config.h index a59eee18e..51162cde3 100644 --- a/keyboards/atreus/config.h +++ b/keyboards/atreus/config.h @@ -49,9 +49,6 @@ along with this program. If not, see . # define UNUSED_PINS #endif -/* Make Overloaded Keys switch faster */ -#define TAPPING_TERM 175 - /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION COL2ROW diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h new file mode 100644 index 000000000..6f0d258f5 --- /dev/null +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -0,0 +1,101 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + + + + +/* Make Overloaded Keys switch faster */ +#define TAPPING_TERM 175 + + + + +/* USB Device descriptor parameter */ + +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Technomancy +#define PRODUCT Atreus +#define DESCRIPTION q.m.k. keyboard firmware for Atreus + +/* key matrix size */ +#define MATRIX_ROWS 4 +#define MATRIX_COLS 11 + +// Change this to how you wired your keyboard +// COLS: Left to right, ROWS: Top to bottom +#if defined(ATREUS_ASTAR) +# define MATRIX_ROW_PINS { D0, D1, D3, D2 } +#if defined(PCBDOWN) +# define MATRIX_COL_PINS { B7, D6, F7, F6, B6, D4, E6, B4, B5, C6, D7 } +#else +# define MATRIX_COL_PINS { D7, C6, B5, B4, E6, D4, B6, F6, F7, D6, B7 } +#endif +# define UNUSED_PINS +#elif defined(ATREUS_TEENSY2) +# define MATRIX_ROW_PINS { D0, D1, D2, D3 } +# define MATRIX_COL_PINS { F6, F5, F4, B7, B6, B5, B4, B3, B2, B1, B0 } +# define UNUSED_PINS +#endif + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +//#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif -- cgit v1.2.3 From 8a01bbc42286a60bcbca2fe9e09298fb9116811a Mon Sep 17 00:00:00 2001 From: "Lars R. Noldan" Date: Wed, 14 Sep 2016 11:54:13 -0500 Subject: Adding Space Cadet, And Correcting Ascii Keymap --- .../ergodox/keymaps/absenth/absenth_highres.png | Bin 1429453 -> 1463041 bytes keyboards/ergodox/keymaps/absenth/keymap.c | 12 ++++++------ keyboards/ergodox/keymaps/absenth/readme.md | 3 +++ 3 files changed, 9 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/absenth/absenth_highres.png b/keyboards/ergodox/keymaps/absenth/absenth_highres.png index a0596b281..c07aa8803 100644 Binary files a/keyboards/ergodox/keymaps/absenth/absenth_highres.png and b/keyboards/ergodox/keymaps/absenth/absenth_highres.png differ diff --git a/keyboards/ergodox/keymaps/absenth/keymap.c b/keyboards/ergodox/keymaps/absenth/keymap.c index 30f747419..ded668e13 100644 --- a/keyboards/ergodox/keymaps/absenth/keymap.c +++ b/keyboards/ergodox/keymaps/absenth/keymap.c @@ -15,9 +15,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | Del | Q | W | E | R | T | L1 | | L1 | Y | U | I | O | P | \ | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | BkSp | A | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | + * | BkSp | A/L2 | S | D | F | G |------| |------| H | J | K | L |; / L2|' / Cmd | * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| - * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | + * | LS/PO |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RS/PC | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | * `----------------------------------' `----------------------------------' @@ -36,7 +36,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LEFT, KC_DELT, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(SYMB), KC_BSPC, LT(MDIA, KC_A), KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_LSPO, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, ALT_T(KC_APP), KC_LGUI, KC_HOME, @@ -45,7 +45,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_RGHT, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, TG(SYMB), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),GUI_T(KC_QUOT), - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSPC, KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, KC_LALT, CTL_T(KC_ESC), KC_PGUP, @@ -100,7 +100,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| * | | | | MsUp | | | | | | | | | | | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | |MsLeft|MsDown|MsRght| |------| |------| | | | | | Play | + * | | |MsLeft|MsDown|MsRght| |------| |------| left | down | up | down | | Play | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | | | | | | | | | | | Prev | Next | | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -110,7 +110,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | | | | | | * ,------|------|------| |------+------+------. * | | | | | | |Brwser| - * | | |------| |------| |Back | + * | Lclk | Rclk |------| |------| |Back | * | | | | | | | | * `--------------------' `--------------------' */ diff --git a/keyboards/ergodox/keymaps/absenth/readme.md b/keyboards/ergodox/keymaps/absenth/readme.md index 35d0aad46..0c04bf417 100644 --- a/keyboards/ergodox/keymaps/absenth/readme.md +++ b/keyboards/ergodox/keymaps/absenth/readme.md @@ -2,6 +2,9 @@ ## Changelog + +* Sept. 14, 2016 (V0.2): + * Added Space Cadet to Left and Right Shift. Pressing Left shift with no other key adds an "(" and pressing Right shift with no other key adds an ")" * Sept. 8, 2016 (V0.1): * Made A key double as MEDIA Layer change when you hold it. Added mouse buttons to the large thumb buttons on the left side on the Media Layer. Added vi/vim style arrow keys on HJKL on media layer. -- cgit v1.2.3 From 24e8d01dc93c7367fbc58b79955b7c4ef6899c61 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Thu, 15 Sep 2016 11:28:12 -0400 Subject: Move ALT... --- keyboards/planck/keymaps/cbbrowne/keymap.c | 3 ++- keyboards/planck/keymaps/cbbrowne/readme.md | 19 +++++++++++++++---- 2 files changed, 17 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index d6f8a6ed4..26a99a4e7 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -92,6 +92,7 @@ enum macro_id { #define RANDALP M(M_RANDLETTER) #define CTLENTER MT(MOD_RCTL, KC_ENT) #define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) +#define ALTRIGHT MT(MOD_LALT, KC_RGHT) /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -101,7 +102,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {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_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, CTLENTER}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH, SHIFTQUOTE }, - {KC_TAB, ROT_LED, KC_LALT, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT} + {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, M_UPPER, KC_LEFT, KC_DOWN, KC_UP, ALTRIGHT} /* Note that KC_SPC is recorded TWICE, so that either matrix position can activate it */ }, [_RAISE] = { /* RAISE */ diff --git a/keyboards/planck/keymaps/cbbrowne/readme.md b/keyboards/planck/keymaps/cbbrowne/readme.md index 272e042a0..184142e0c 100644 --- a/keyboards/planck/keymaps/cbbrowne/readme.md +++ b/keyboards/planck/keymaps/cbbrowne/readme.md @@ -27,10 +27,23 @@ doing sundry experimentation: * Trying out sgoodwin's "hold Enter down to get Shift" - Liking this Quite Well Enough... - Applied this to both Shift and Quote + - It seems likely that Alt should get a right-hand-side, akin to this... + - Alt needs to move, and get a RHS + - Hence ALTRIGHT, and shifted ROT_LED over + - Emacs likes this!!! :-) + - I'm suspicious that I'll want to shift ROT_LED another location over, + so some modifier can replace the OS/KC_LGUI key * I have added an alternate ADJUST layer that is activated via update_tri_layer() - e.g. - LOWER+RAISE simultaneously - This seems entirely more useful for handling my "special keys" like the random numbers, user name, and such, than the keypad layer + * The _ADJUST layer provides a good place to have RESET + - But this isn't strictly enough; I want RESET somewhat accessible from + main layer lest an error hide that layer + - I never use the OS/KC_LGUI key (that's Command on MacOS, Windows + Key on Windows), so that's a good place to have it as a chord of + some sort + 2. Some code structure ideas --------------------------------------------------- @@ -49,8 +62,8 @@ doing sundry experimentation: only need to fit 4 symbols onto each line, rather than 12. I used enums to manage layer IDs and macro IDs so that I don't need - to care (beyond "start at 0", and arguably that's not needed) about - their values. + to care (beyond "start at 0", and arguably even that's not needed) + about their values. 3. Things I did not like about the default mapping --------------------------------------------------------- @@ -83,8 +96,6 @@ unwise things again... to allow selecting multiple items, and this really interferes with that - - 5. TODO --------------------------------------------------------- -- cgit v1.2.3 From e50f15e36019fa39798bbe4e001fe7d2c94c88e7 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Thu, 15 Sep 2016 10:58:28 -0500 Subject: Add IGNORE_MOD_TAP_INTERRUPT to fix overloaded mod keys sending mod on diads... --- keyboards/atreus/keymaps/erlandsona/config.h | 11 +++++++---- keyboards/atreus/keymaps/erlandsona/keymap.c | 16 ++++++++-------- 2 files changed, 15 insertions(+), 12 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index 6f0d258f5..bf09bf23a 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -21,13 +21,16 @@ along with this program. If not, see . #include "config_common.h" - - /* Make Overloaded Keys switch faster */ #define TAPPING_TERM 175 - - +/* this makes it possible to do rolling combos (zx) + * with keys that convert to other keys on hold + * (z becomes ctrl when you hold it, + * and when this option isn't enabled, + * z rapidly followed by x actually sends Ctrl-x. That's bad.) + */ +#define IGNORE_MOD_TAP_INTERRUPT /* USB Device descriptor parameter */ diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 9e11ac048..7807eb224 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -18,16 +18,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ - KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , - SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), - KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, ALT_T(KC_ESC), CTL_T(KC_ENT), KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), + KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , + ALT_T(KC_A), KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), + KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_7 , KC_8 , KC_9 , KC_0 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, - KC_TAB , KC_4 , KC_5 , KC_6 , KC_DLR, KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - _______, KC_1 , KC_2 , KC_3 , KC_DOT, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______, _______, _______, _______, KC_DEL, F(MOUS), _______, _______, _______, _______, _______, _______), + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + ALT_T(KC_TAB), KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______ , KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______ , _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), [MOUS] = KEYMAP( /* Mouse and Media Keys */ KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, -- cgit v1.2.3 From ac6125cbea0ef2cfb9e8c79b89659128f60f0853 Mon Sep 17 00:00:00 2001 From: Austin Erlandson Date: Thu, 15 Sep 2016 11:19:54 -0500 Subject: Revert because the IGNORE_MOD_TAP_INTERRUPT flag didn't feel right. --- keyboards/atreus/keymaps/erlandsona/config.h | 10 +--------- keyboards/atreus/keymaps/erlandsona/keymap.c | 10 +++++----- 2 files changed, 6 insertions(+), 14 deletions(-) (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/erlandsona/config.h b/keyboards/atreus/keymaps/erlandsona/config.h index bf09bf23a..d9eb1903e 100644 --- a/keyboards/atreus/keymaps/erlandsona/config.h +++ b/keyboards/atreus/keymaps/erlandsona/config.h @@ -22,15 +22,7 @@ along with this program. If not, see . /* Make Overloaded Keys switch faster */ -#define TAPPING_TERM 175 - -/* this makes it possible to do rolling combos (zx) - * with keys that convert to other keys on hold - * (z becomes ctrl when you hold it, - * and when this option isn't enabled, - * z rapidly followed by x actually sends Ctrl-x. That's bad.) - */ -#define IGNORE_MOD_TAP_INTERRUPT +#define TAPPING_TERM 150 /* USB Device descriptor parameter */ diff --git a/keyboards/atreus/keymaps/erlandsona/keymap.c b/keyboards/atreus/keymaps/erlandsona/keymap.c index 7807eb224..32c8826e0 100644 --- a/keyboards/atreus/keymaps/erlandsona/keymap.c +++ b/keyboards/atreus/keymaps/erlandsona/keymap.c @@ -19,15 +19,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [BASE] = KEYMAP( /* Qwerty */ KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , - ALT_T(KC_A), KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , + KC_A , KC_S , KC_D , KC_F , KC_G , KC_H , KC_J , KC_K , KC_L , KC_SCLN , SFT_T(KC_Z), KC_X , KC_C , KC_V , KC_B , KC_N , KC_M , KC_COMM, KC_DOT , SFT_T(KC_QUOT), KC_LCTL , KC_LALT, KC_LALT, KC_LGUI, KC_BSPC, KC_ESC, KC_ENT, KC_SPC, F(NUMS), KC_RALT, KC_SLSH, KC_BSLS ), [NUMS] = KEYMAP( /* Numbers / Arrows / Symbols */ - KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, - ALT_T(KC_TAB), KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, - _______ , KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, - _______ , _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), + KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_LPRN, KC_RPRN, KC_MINS, KC_EQL , KC_LBRC, + KC_TAB , KC_5 , KC_6 , KC_7 , KC_8 , KC_LEFT, KC_DOWN, KC_UP , KC_RGHT, KC_RBRC, + _______, KC_9 , KC_0 , KC_DOT , KC_COMM, KC_HOME, KC_PGDN, KC_PGUP, KC_END , _______, + _______, _______, _______, _______, KC_DEL , F(MOUS), _______, _______, _______, _______, _______, _______), [MOUS] = KEYMAP( /* Mouse and Media Keys */ KC_SLCK, KC_PAUSE, KC_F11 , KC_F10 , KC_F9 , KC_F8 , KC_F7 , KC_F6 , KC_F5 , KC_F4, -- cgit v1.2.3 From cc7604d11670cf3155d53f0019557b249b1192c0 Mon Sep 17 00:00:00 2001 From: cbbrowne Date: Fri, 16 Sep 2016 17:15:33 -0400 Subject: Add breathing, as initial implementation with the RAISE/LOWER keys. And throw in extra macros to shorten keymaps --- keyboards/planck/keymaps/cbbrowne/config.h | 5 +++-- keyboards/planck/keymaps/cbbrowne/keymap.c | 17 +++++++++++++---- 2 files changed, 16 insertions(+), 6 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/cbbrowne/config.h b/keyboards/planck/keymaps/cbbrowne/config.h index 58cd2cc5b..1e04ba61d 100644 --- a/keyboards/planck/keymaps/cbbrowne/config.h +++ b/keyboards/planck/keymaps/cbbrowne/config.h @@ -3,6 +3,9 @@ #include "../../config.h" +#define LEADER_TIMEOUT 300 +#define BACKLIGHT_BREATHING + /* cbbrowne user configuration */ #define randadd 53 @@ -16,5 +19,3 @@ #endif - - diff --git a/keyboards/planck/keymaps/cbbrowne/keymap.c b/keyboards/planck/keymaps/cbbrowne/keymap.c index 26a99a4e7..7f1601af7 100644 --- a/keyboards/planck/keymaps/cbbrowne/keymap.c +++ b/keyboards/planck/keymaps/cbbrowne/keymap.c @@ -93,6 +93,7 @@ enum macro_id { #define CTLENTER MT(MOD_RCTL, KC_ENT) #define SHIFTQUOTE MT(MOD_RSFT, KC_QUOT) #define ALTRIGHT MT(MOD_LALT, KC_RGHT) +#define MVERSION M(M_VERSION) /* Note that Planck has dimensions 4 rows x 12 columns */ @@ -116,16 +117,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, 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, QWERTY, KEYPAD, KEYPAD, RESET, _______}, {_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY} -}, + }, [_KEYPAD] = { /* Key Pad */ - {KC_ESC, USERNAME, M(M_VERSION), KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, + {KC_ESC, USERNAME, MVERSION, KC_F10, KC_F11, KC_F12, KC_PGUP, KC_KP_ENTER, KC_7, KC_8, KC_9, KC_BSPC}, {KC_LCTL, RANDDIG, KC_F5, KC_F6, KC_F7, KC_F8, KC_PGDN, KC_KP_MINUS, KC_4, KC_5, KC_6, KC_PIPE}, {KC_LSFT, RANDALP, KC_F1, KC_F2, KC_F3, KC_F4, KC_DEL, KC_KP_PLUS, KC_1, KC_2, KC_3, KC_ENTER}, - {BL_STEP, ROT_LED, KC_LALT, KC_LGUI, KC_NO, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} + {KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT} }, [_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */ - { ROT_LED, USERNAME, M(M_VERSION), _______, _______, _______, _______, _______, _______, _______, _______, _______ }, + {ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, {_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, {_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ }, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ } @@ -198,6 +199,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { layer_on(_RAISE); +#ifdef BACKLIGHT_ENABLE + breathing_speed_set(2); + breathing_pulse(); +#endif update_tri_layer(_LOWER, _RAISE, _ADJUST); } else @@ -210,6 +215,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) if (record->event.pressed) { layer_on(_LOWER); +#ifdef BACKLIGHT_ENABLE + breathing_speed_set(2); + breathing_pulse(); +#endif update_tri_layer(_LOWER, _RAISE, _ADJUST); } else -- cgit v1.2.3 From 602b058b9e1ebbe043754e39007cf01427872770 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sat, 17 Sep 2016 19:40:56 +0200 Subject: - Added capslock led for KC60 keyboard (based on gitbug.com/jpec/kc60 works) --- keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c | 103 +++++++++++++++++++++ keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md | 11 +++ 2 files changed, 114 insertions(+) create mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c create mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c new file mode 100644 index 000000000..0c952327b --- /dev/null +++ b/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c @@ -0,0 +1,103 @@ +// This is the canonical layout file for the Quantum project. If you want to add another keyboard, +// this is the style you want to emulate. + +#include "kc60.h" + +#define _QWERTY 0 +#define _FNCAPS 1 +#define _FNRIGHTSHIFT 2 + +// Fillers to make layering more clear +#define ______ KC_TRNS +#define XXXXXXX KC_NO + +// Func macro definitions. +#define S_LED FUNC(0) +#define S_LEDI FUNC(1) +#define S_LEDD FUNC(2) + +// Enable these functions using FUNC(n) macro. +const uint16_t PROGMEM fn_actions[] = { + [0] = ACTION_BACKLIGHT_TOGGLE(), + [1] = ACTION_BACKLIGHT_INCREASE(), + [2] = ACTION_BACKLIGHT_DECREASE() + }; + +/* + * | | | + * | | | + * | | | + * | | | + * | | + */ + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Qwerty + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Up | FN2 | + * |-----------------------------------------------------------------------------------------+ + * | FN1 | Gui | Alt | Space | AltGr | Left | Down | Right | + * `-----------------------------------------------------------------------------------------' + */ + [0] = KEYMAP( /* Basic QWERTY */ + 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_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_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, MO(_FNRIGHTSHIFT), KC_UP, \ + LT(_FNCAPS, KC_CAPS), KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + ), + +/* Layer 1 + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | Psc | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | Led | Led-| Led+| | Mute| Vol+| Vol-| | | | Play | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | Prev | Stop | Next | + * `-----------------------------------------------------------------------------------------' + */ + [_FNCAPS] = KEYMAP( /* Layer 1 */ + ______, 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, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, KC_PSCR,______, ______, ______, ______, ______, ______, \ + ______, ______, S_LED, S_LEDI, S_LEDD,______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \ + ______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT \ + ), + +/* Layer 2 + * ,-----------------------------------------------------------------------------------------. + * | | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | | | | | | | PgUp | | + * |-----------------------------------------------------------------------------------------+ + * | | | | | | Home | PgDown| End | + * `-----------------------------------------------------------------------------------------' + */ + [_FNRIGHTSHIFT] = KEYMAP( /* Layer 2 */ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ + ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP, \ + ______, ______, ______, ______, ______, ______, KC_HOME,KC_PGDN,KC_END \ + ), +}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + // MACRODOWN only works in this function + return MACRO_NONE; +}; diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md b/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md new file mode 100644 index 000000000..c7850c37c --- /dev/null +++ b/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md @@ -0,0 +1,11 @@ +# Dbroqua HHKB like Layout + +* Online keyboard layout editor: *Coming soon* +* Online keyboard layout editor (caps layer): http://www.keyboard-layout-editor.com/#/gists/4136d4d1555d6f0d9403c21aaf50fd37 +* Online keyboard layout editor (fn2 layer): http://www.keyboard-layout-editor.com/#/gists/cf4955f73f339020dbb41c15364e7e4f + +# Programming Instructions: +Enter into programming mode and run the following command. +``` +$ sudo KEYMAP=dbroqua_hhkb_like make dfu +``` \ No newline at end of file -- cgit v1.2.3 From 3e128552d92714ff86d4378b4e3acccc62d6f132 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Sun, 18 Sep 2016 11:48:47 +0200 Subject: Update the ergodox/algernon keymap to v1.7 Overall changes =============== * The number row has been completely rearranged on both the **Base** and the **ADORE** layers. * The number/function key behavior was changed: function keys are now on the **Media**. * The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the **Base** and **ADORE** layers. * The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. * A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. ADORE ===== * `Y` and `X` have been swapped again. Media/Navigation layer ====================== * The function keys are now on this layer. * Mouse keys have been removed. * Media start/stop/prev/next have been removed. * `Print screen` has been removed. * There is only one screen lock key now. Heatmap ======= * Fixed a few issues in the finger-stats calculation. * The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. * The heatmap tool will now colorize the stats by default. * The periodic stats are now printed in a more compact format. Tools ===== * Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. * Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. * A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. Signed-off-by: Gergely Nagy --- keyboards/ergodox/keymaps/algernon/Makefile | 4 +- .../keymaps/algernon/images/adore-layer.png | Bin 93893 -> 97225 bytes .../ergodox/keymaps/algernon/images/base-layer.png | Bin 95204 -> 102142 bytes .../ergodox/keymaps/algernon/images/heatmap.png | Bin 137912 -> 139351 bytes keyboards/ergodox/keymaps/algernon/keymap.c | 381 ++++++++++----------- keyboards/ergodox/keymaps/algernon/readme.md | 76 ++-- .../algernon/tools/heatmap-layout.ADORE.json | 132 ++----- .../algernon/tools/heatmap-layout.Dvorak.json | 129 ++----- .../ergodox/keymaps/algernon/tools/hid-commands | 61 ++++ .../ergodox/keymaps/algernon/tools/layer-notify | 12 + .../keymaps/algernon/tools/log-to-heatmap.py | 184 +++++++--- .../ergodox/keymaps/algernon/tools/max-focused | 5 - .../ergodox/keymaps/algernon/tools/text-to-log.py | 107 ++++++ 13 files changed, 616 insertions(+), 475 deletions(-) create mode 100755 keyboards/ergodox/keymaps/algernon/tools/hid-commands create mode 100755 keyboards/ergodox/keymaps/algernon/tools/layer-notify delete mode 100755 keyboards/ergodox/keymaps/algernon/tools/max-focused create mode 100755 keyboards/ergodox/keymaps/algernon/tools/text-to-log.py (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/algernon/Makefile b/keyboards/ergodox/keymaps/algernon/Makefile index 7c2b3ad97..699add3dd 100644 --- a/keyboards/ergodox/keymaps/algernon/Makefile +++ b/keyboards/ergodox/keymaps/algernon/Makefile @@ -7,7 +7,7 @@ CONSOLE_ENABLE = no TAP_DANCE_ENABLE = yes KEYLOGGER_ENABLE ?= yes UCIS_ENABLE = yes -MOUSEKEY_ENABLE ?= yes +MOUSEKEY_ENABLE = no AUTOLOG_ENABLE ?= no @@ -25,6 +25,8 @@ OPT_DEFS += -DKEYLOGGER_ENABLE CONSOLE_ENABLE = yes endif +OPT_DEFS += -DUSER_PRINT + KEYMAP_VERSION = $(shell \ if [ -d "${KEYMAP_PATH}/.git" ]; then \ cd "${KEYMAP_PATH}" && git describe --abbrev=6 --dirty --always --tags --match 'v*' 2>/dev/null; \ diff --git a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png index 3d0a5fb20..b611fbc42 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/adore-layer.png and b/keyboards/ergodox/keymaps/algernon/images/adore-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/base-layer.png b/keyboards/ergodox/keymaps/algernon/images/base-layer.png index 7ea57aae3..2a981a470 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/base-layer.png and b/keyboards/ergodox/keymaps/algernon/images/base-layer.png differ diff --git a/keyboards/ergodox/keymaps/algernon/images/heatmap.png b/keyboards/ergodox/keymaps/algernon/images/heatmap.png index 356035e0a..4f55c5adf 100644 Binary files a/keyboards/ergodox/keymaps/algernon/images/heatmap.png and b/keyboards/ergodox/keymaps/algernon/images/heatmap.png differ diff --git a/keyboards/ergodox/keymaps/algernon/keymap.c b/keyboards/ergodox/keymaps/algernon/keymap.c index 9f476d8a6..248a0ed30 100644 --- a/keyboards/ergodox/keymaps/algernon/keymap.c +++ b/keyboards/ergodox/keymaps/algernon/keymap.c @@ -8,7 +8,6 @@ #include "debug.h" #include "action_layer.h" #include "action_util.h" -#include "mousekey.h" #include "timer.h" #include "keymap_plover.h" #include "eeconfig.h" @@ -36,18 +35,6 @@ enum { A_PLVR, A_MPN, - // Function / number keys - KF_1, // 1, F1 - KF_2, // 2, F2 - KF_3, // ... - KF_4, - KF_5, - KF_6, - KF_7, - KF_8, - KF_9, - KF_10, - // Application select keys APP_SLK, // Slack APP_EMCS, // Emacs @@ -55,17 +42,6 @@ enum { APP_CHRM, // Chrome APP_MSIC, // Music - // Diagonal mouse movement - A_MUL, - A_MUR, - A_MDL, - A_MDR, - - // Mouse acceleration - A_ACL0, - A_ACL1, - A_ACL2, - // Hungarian layer keys HU_AA, // Á HU_OO, // Ó @@ -76,6 +52,18 @@ enum { HU_UE, // Ü HU_OEE, // Ő HU_UEE, // Ű + + // number/symbol keys + A_1, // 1 + A_2, // 2 + A_3, // ... + A_4, + A_5, + A_6, + A_7, + A_8, + A_9, + A_0, }; /* Fn keys */ @@ -95,7 +83,9 @@ enum { CT_CLN = 0, CT_TA, CT_LBP, - CT_RBP + CT_RBP, + CT_TMUX, + CT_TPS, }; /* States & timers */ @@ -114,6 +104,8 @@ bool log_enable = false; bool time_travel = false; +static uint8_t is_adore = 0; + /* The Keymap */ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { @@ -121,13 +113,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Base Layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Next/Prev | 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | Next/Prev | 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| * | ~ | ' | , | . | P | Y | ( | | ) | F | G | C | R | L | \ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/ARROW | A | O | E | U | I |------| |------| D | H | T | N | S | = / Arrow | - * |-----------+------+------+------+------+------| : | | - |------+------+------+------+------+-----------| - * | Play/Pause| / | Q | J | K | X | | | | B | M | W | V | Z | Stop | + * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| + * | Play/Pause| / | Q | J | K | X | | | Pane | B | M | W | V | Z | Stop | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | : | | - | | | | | * `-----------------------------------' `-----------------------------------' @@ -141,22 +133,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [BASE] = KEYMAP( // left hand - M(A_MPN) ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I -,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_CLN) -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) + M(A_MPN) ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 +,KC_GRV ,KC_QUOT ,KC_COMM ,KC_DOT ,KC_P ,KC_Y ,TD(CT_LBP) +,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_U ,KC_I +,KC_MPLY ,KC_SLSH ,KC_Q ,KC_J ,KC_K ,KC_X ,TD(CT_TMUX) +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) ,F(F_ALT),F(F_GUI) ,F(F_CTRL) ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_F12 ,M(KF_6),M(KF_7) ,M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS - ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL - ,KC_MINS ,KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP - ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) + ,TD(CT_RBP),KC_F ,KC_G ,KC_C ,KC_R ,KC_L ,KC_BSLS + ,KC_D ,KC_H ,KC_T ,KC_N ,KC_S ,KC_EQL + ,TD(CT_TPS),KC_B ,KC_M ,KC_W ,KC_V ,KC_Z ,KC_MSTP + ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL ,KC_LEAD @@ -166,15 +158,15 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 1: Adore layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | Play/Pause| 1 F1 | 2 F2 | 3 F3 | 4 F4 | 5 F5 | Plvr | | F12 | 6 F6 | 7 F7 | 8 F8 | 9 F9 | 0 F10| F11 | + * | Play/Pause| 9 | 7 @ | 5 * | 3 ^ | 1 $ | F11 | | F12 | 0 % | 2 ! | 4 # | 6 & | 8 | Plover | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | `~ | Y | W | G | L | M | ( | | ) | F | H | C | P | X | \ | + * | `~ | X | W | G | L | M | ( | | ) | F | H | C | P | Y | \ | * |-----------+------+------+------+------+------| [ | | ] |------+------+------+------+------+-----------| * | Tab/Arrow | A | O | E | I | U |------| |------| D | R | T | N | S | = | - * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| - * | | Z | Q | ' | , | . | : | | - | B | K | V | J | / | | + * |-----------+------+------+------+------+------| tmux | | tmux |------+------+------+------+------+-----------| + * | | Z | Q | ' | , | . | | | pane | B | K | V | J | / | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' - * | | | | | | | | | | | | + * | | | | | : | | - | | | | | * `-----------------------------------' `-----------------------------------' * ,-------------. ,-------------. * | LAlt | GUI | | MDIA | Del | @@ -186,22 +178,22 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { */ [ADORE] = KEYMAP( // left hand - KC_MPLY ,M(KF_1) ,M(KF_2) ,M(KF_3),M(KF_4),M(KF_5),M(A_PLVR) -,KC_GRV ,KC_Y ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) -,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U -,KC_NO ,KC_Z ,KC_Q ,KC_QUOT,KC_COMM,KC_DOT ,TD(CT_CLN) -,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + KC_MPLY ,M(A_9) ,M(A_7) ,M(A_5) ,M(A_3) ,M(A_1) ,KC_F11 +,KC_GRV ,KC_X ,KC_W ,KC_G ,KC_L ,KC_M ,TD(CT_LBP) +,TD(CT_TA) ,KC_A ,KC_O ,KC_E ,KC_I ,KC_U +,KC_NO ,KC_Z ,KC_Q ,KC_QUOT ,KC_COMM ,KC_DOT ,TD(CT_TMUX) +,KC_NO ,KC_NO ,KC_NO ,KC_NO ,TD(CT_CLN) ,F(F_ALT),F(F_GUI) ,F(F_CTRL) ,KC_BSPC,F(F_SFT),KC_ESC // right hand - ,KC_F12 ,M(KF_6),M(KF_7),M(KF_8),M(KF_9) ,M(KF_10) ,KC_F11 - ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_X ,KC_BSLS - ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL - ,KC_MINS ,KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO - ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO + ,KC_F12 ,M(A_0) ,M(A_2) ,M(A_4) ,M(A_6) ,M(A_8) ,M(A_PLVR) + ,TD(CT_RBP),KC_F ,KC_H ,KC_C ,KC_P ,KC_Y ,KC_BSLS + ,KC_D ,KC_R ,KC_T ,KC_N ,KC_S ,KC_EQL + ,TD(CT_TPS),KC_B ,KC_K ,KC_V ,KC_J ,KC_SLSH ,KC_NO + ,KC_MINS ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,OSL(NMDIA),KC_DEL ,F(F_HUN) @@ -350,45 +342,45 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 5: Navigation & Media layer * * ,-----------------------------------------------------. ,-----------------------------------------------------. - * | MS Slow | | | | | |ScrLCK| |ScrLCK| | | | | | | + * | | F9 | F7 | F5 | F3 | F1 | | |ScrLCK| F10 | F2 | F4 | F6 | F8 | | * |-----------+------+------+------+------+-------------| |------+------+------+------+------+------+-----------| - * | MS Normal | | Home | Up | PgUp | | | |Scroll| |MsUpL | MsUp |MsUpR | |PrintScreen| - * |-----------+------+------+------+------+------| | | Up |------+------+------+------+------+-----------| - * | MS Fast | | Left | Down | Right| |------| |------| |MsLeft| MsDn |MsRght| | | - * |-----------+------+------+------+------+------| | |Scroll|------+------+------+------+------+-----------| - * | Play/Pause| | End | Down | PgDn | | | | Down | |MsDnL | MsDn |MsDnR | | Stop | + * | | | | | | | | | | | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | |------| |------| | | | | | | + * |-----------+------+------+------+------+------| | | |------+------+------+------+------+-----------| + * | | | | | | | | | | | | | | | | * `-----------+------+------+------+------+-------------' `-------------+------+------+------+------+-----------' * | | | | | | | | | | | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. - * | Mute | VlUp | | BASE | MClk | + * | Mute | VlUp | | BASE | | * ,------|------|------| |------+------+------. - * | | | VlDn | | Prev |Left |Right | - * | SPC | Enter|------| |------| Click| Click| - * | | | ESC | | Next | | | + * | | | VlDn | | | | | + * | | |------| |------| | | + * | | | | | | | | * `--------------------' `--------------------' */ [NMDIA] = KEYMAP( // left hand - M(A_ACL0) ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,LGUI(KC_L) -,M(A_ACL1) ,KC_NO ,KC_HOME ,KC_UP ,KC_PGUP ,KC_NO ,KC_NO -,M(A_ACL2) ,KC_NO ,KC_LEFT ,KC_DOWN ,KC_RIGHT,KC_NO -,KC_MPLY ,KC_NO ,KC_END ,KC_DOWN ,KC_PGDN ,KC_NO ,KC_NO + KC_NO ,KC_F9 ,KC_F7 ,KC_F5 ,KC_F3 ,KC_F1 ,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_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_MUTE ,KC_VOLU ,KC_VOLD - ,KC_SPC,KC_ENTER,KC_ESC + ,KC_NO ,KC_NO ,KC_TRNS // right hand - ,LGUI(KC_L),KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_WH_U ,KC_NO ,M(A_MUL),KC_MS_U ,M(A_MUR),KC_NO ,KC_PSCR - ,KC_NO ,KC_MS_L ,KC_MS_D ,KC_MS_R ,KC_NO ,KC_NO - ,KC_WH_D ,KC_NO ,M(A_MDL),KC_MS_D ,M(A_MDR),KC_NO ,KC_MSTP + ,LGUI(KC_L),KC_F10 ,KC_F2 ,KC_F4 ,KC_F6 ,KC_F8 ,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_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO ,KC_NO - ,KC_TRNS ,KC_MS_BTN3 - ,KC_MPRV - ,KC_MNXT ,KC_BTN1 ,KC_BTN2 + ,KC_TRNS ,KC_NO + ,KC_NO + ,KC_NO ,KC_NO ,KC_NO ), /* Keymap 6: Steno for Plover @@ -514,40 +506,62 @@ static macro_t *ang_do_hun (keyrecord_t *record, uint16_t accent, uint16_t hun_c return MACRO_NONE; } -static bool from_appsel; +static void ang_handle_num_row(uint8_t id, keyrecord_t *record) { + uint8_t idx = id - A_1; + uint8_t kc; + static bool shifted[10]; -static void ang_handle_kf (keyrecord_t *record, uint8_t id) -{ - uint8_t code = id - KF_1; + if (keyboard_report->mods & MOD_BIT(KC_LSFT) || + ((get_oneshot_mods() & MOD_BIT(KC_LSFT)) && !has_oneshot_mods_timed_out())) { + if (record->event.pressed) + shifted[idx] = true; + } - if (record->event.pressed) { - kf_timers[code] = timer_read (); + if (!shifted[idx]) { + kc = idx + KC_1; } else { - uint8_t kc_base; - - if (from_appsel) { - from_appsel = false; + switch (id) { + case A_8: + case A_9: + shifted[idx] = false; return; - } - if (kf_timers[code] && timer_elapsed (kf_timers[code]) > TAPPING_TERM) { - // Long press - kc_base = KC_F1; - } else { - kc_base = KC_1; + case A_7: + kc = KC_2; + break; + case A_5: + kc = KC_8; + break; + case A_3: + kc = KC_6; + break; + case A_1: + kc = KC_4; + break; + + case A_0: + kc = KC_5; + break; + case A_2: + kc = KC_1; + break; + case A_4: + kc = KC_3; + break; + case A_6: + kc = KC_7; + break; } - kf_timers[code] = 0; - code += kc_base; + } - register_code (code); - unregister_code (code); + if (record->event.pressed) { + register_code (kc); + } else { + unregister_code (kc); + shifted[idx] = false; } } -static struct { - uint8_t idx; -} m_accel_state; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { switch(id) { @@ -592,70 +606,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) case HU_UEE: return ang_do_hun (record, KC_EQL, KC_U); -#if MOUSEKEY_ENABLE - /* Mouse movement */ - case A_MUL: - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_LEFT); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_LEFT); - } - mousekey_send(); - break; - - case A_MUR: - if (record->event.pressed) { - mousekey_on(KC_MS_UP); - mousekey_on(KC_MS_RIGHT); - } else { - mousekey_off(KC_MS_UP); - mousekey_off(KC_MS_RIGHT); - } - mousekey_send(); - break; - - case A_MDL: - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_LEFT); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_LEFT); - } - mousekey_send(); - break; - - case A_MDR: - if (record->event.pressed) { - mousekey_on(KC_MS_DOWN); - mousekey_on(KC_MS_RIGHT); - } else { - mousekey_off(KC_MS_DOWN); - mousekey_off(KC_MS_RIGHT); - } - mousekey_send(); - break; - - case A_ACL0 ... A_ACL2: - if (record->event.pressed) { - uint8_t idx = id - A_ACL0; - if (m_accel_state.idx == id) { - mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0); - m_accel_state.idx = 0; - } else { - if (m_accel_state.idx) { - mousekey_off(m_accel_state.idx - A_ACL0 + KC_ACL0); - m_accel_state.idx = 0; - } - mousekey_on(KC_ACL0 + idx); - m_accel_state.idx = id; - } - } - break; -#endif - /* Plover base */ case A_PLVR: toggle_steno(record->event.pressed); @@ -667,7 +617,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) register_code (KC_LGUI); if (record->tap.count && !record->tap.interrupted) { if (record->tap.count >= 2) { - register_code (KC_W); layer_on (APPSEL); set_oneshot_layer (APPSEL, ONESHOT_START); } @@ -678,7 +627,6 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) } else { if (record->tap.count >= 2) { - unregister_code (KC_W); clear_oneshot_layer_state (ONESHOT_PRESSED); } gui_timer = timer_read (); @@ -686,43 +634,39 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) break; case APP_SLK: - from_appsel = true; - return MACRODOWN(T(S), T(L), T(A), T(C), T(K), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_slack\n"); + break; case APP_EMCS: - from_appsel = true; - return MACRODOWN(T(G), T(N), T(U), T(SPC), T(E), T(M), T(A), T(C), T(S), T(SPC), T(2), T(4), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_emacs\n"); + break; case APP_TERM: - from_appsel = true; - if (!record->event.pressed) { - register_code(KC_ESC); - unregister_code(KC_ESC); - wait_ms(TAPPING_TERM + 25); - register_code(KC_DEL); - unregister_code(KC_DEL); - } + if (record->event.pressed) + uprintf("CMD:appsel_term\n"); break; case APP_CHRM: - from_appsel = true; - return MACRODOWN(T(C), T(H), T(R), T(O), T(M), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_chrome\n"); + break; case APP_MSIC: - from_appsel = true; - return MACRODOWN(T(R), T(H), T(Y), T(T), T(H), T(M), T(B), T(O), T(X), T(ENT), END); + if (record->event.pressed) + uprintf("CMD:appsel_music\n"); + break; - /* Function keys */ - case KF_1 ... KF_10: - ang_handle_kf (record, id); + // number row and symbols + case A_1 ... A_0: + ang_handle_num_row(id, record); break; } return MACRO_NONE; }; -static uint8_t is_adore = 0; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { uint8_t dl; @@ -805,6 +749,36 @@ static void ang_tap_dance_ta_reset (qk_tap_dance_state_t *state, void *user_data layer_off (ARRW); } +static void ang_tap_dance_tmux_finished (qk_tap_dance_state_t *state, void *user_data) { + if (state->count == 1) { + register_code(KC_LALT); + register_code(KC_SPC); + unregister_code(KC_SPC); + unregister_code(KC_LALT); + } else { + register_code(KC_LCTL); + register_code(KC_A); + unregister_code(KC_A); + unregister_code(KC_LCTL); + } +} + +static void ang_tap_dance_tmux_pane_select (qk_tap_dance_state_t *state, void *user_data) { + uint8_t kc = KC_P; + + if (state->count >= 2) { + kc = KC_Z; + } + + register_code(KC_LALT); + register_code(KC_SPC); + unregister_code(KC_SPC); + unregister_code(KC_LALT); + + register_code(kc); + unregister_code(kc); +} + qk_tap_dance_action_t tap_dance_actions[] = { [CT_CLN] = ACTION_TAP_DANCE_DOUBLE (KC_COLN, KC_SCLN) ,[CT_TA] = { @@ -813,12 +787,23 @@ qk_tap_dance_action_t tap_dance_actions[] = { } ,[CT_LBP] = ACTION_TAP_DANCE_DOUBLE (KC_LBRC, KC_LPRN) ,[CT_RBP] = ACTION_TAP_DANCE_DOUBLE (KC_RBRC, KC_RPRN) + ,[CT_TMUX]= ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_finished) + ,[CT_TPS] = ACTION_TAP_DANCE_FN (ang_tap_dance_tmux_pane_select) }; // Runs constantly in the background, in a loop. void matrix_scan_user(void) { + static uint32_t prev_layer_state; uint8_t layer = biton32(layer_state); bool is_arrow = false; + static char *layer_lookup[] = {"Dvorak", "ADORE", "Arrows", "AppSel", "Hungarian", "Nav/Media", "Plover"}; + + if (layer_state != prev_layer_state) { + prev_layer_state = layer_state; + if (layer_lookup[layer]) + uprintf("LAYER: %s\n", layer_lookup[layer]); + } + if (gui_timer && timer_elapsed (gui_timer) > TAPPING_TERM) unregister_code (KC_LGUI); @@ -929,18 +914,7 @@ void matrix_scan_user(void) { } SEQ_TWO_KEYS (KC_W, KC_M) { - register_code (KC_LALT); - register_code (KC_F2); - unregister_code (KC_F2); - unregister_code (KC_LALT); - - wait_ms (1000); - - ang_tap (KC_M, KC_A, KC_X, KC_MINS, KC_F, KC_O, KC_C, KC_U, KC_S, KC_E, KC_D, KC_ENT, 0); - register_code (KC_LGUI); - register_code (KC_UP); - unregister_code (KC_UP); - unregister_code (KC_LGUI); + uprintf("CMD:wm\n"); } SEQ_ONE_KEY (KC_A) { @@ -999,8 +973,11 @@ const qk_ucis_symbol_t ucis_symbol_table[] = UCIS_TABLE bool process_record_user (uint16_t keycode, keyrecord_t *record) { #if KEYLOGGER_ENABLE if (log_enable) { - xprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, - record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak"); + uint8_t layer = biton32(layer_state); + + if ((layer == ADORE) || (layer == BASE)) + uprintf ("KL: col=%02d, row=%02d, pressed=%d, layer=%s\n", record->event.key.col, + record->event.key.row, record->event.pressed, (is_adore) ? "ADORE" : "Dvorak"); } #endif @@ -1047,8 +1024,8 @@ void qk_ucis_symbol_fallback (void) { for (uint8_t i = 0; i < qk_ucis_state.count - 1; i++) { uint8_t code; - if (qk_ucis_state.codes[i] > KF_1) - code = qk_ucis_state.codes[i] - KF_1 + KC_1; + if ((qk_ucis_state.codes[i] >= M(A_1)) && (qk_ucis_state.codes[i] <= M(A_0))) + code = qk_ucis_state.codes[i] - M(A_1) + KC_1; else code = qk_ucis_state.codes[i]; register_code(code); diff --git a/keyboards/ergodox/keymaps/algernon/readme.md b/keyboards/ergodox/keymaps/algernon/readme.md index 5e7adb332..f15b67652 100644 --- a/keyboards/ergodox/keymaps/algernon/readme.md +++ b/keyboards/ergodox/keymaps/algernon/readme.md @@ -18,12 +18,11 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs] * [Layouts](#layouts) - [Base layer](#base-layer) - [ADORE layer](#adore-layer) - - [Hungarian layer](#hungarian-layer) - - [Navigation and media layer](#navigation-and-media-layer) - [Steno layer](#steno-layer) - [LED states](#led-states) * [Tools](#tools) - [Heatmap](#heatmap) + - [Layer notification](#layer-notification) * [Special features](#special-features) - [Unicode Symbol Input](#unicode-symbol-input) * [Building](#building) @@ -39,7 +38,7 @@ Some of the things in the layout only work when one uses [Spacemacs][spacemacs] At its core, this is a Dvorak layout, with some minor changes. The more interesting parts are how certain keys behave: -* The keys on the number row double as function keys, when held for a bit longer than an usual tap. This allows me to use the function keys without having to switch layers. +* The number row is the same as in the [ADORE](#adore-layer) layer. The function keys are on the **Media** layer. * The `Shift`, `Alt`, and `Control` modifiers are one-shot. When tapped, they are considered active for the next key press only. When double tapped, they toggle on, until a third, single tap sometime later. When held, they act as expected. My usual pattern is that I use these for the next keypress only, so this behaviour is perfect. If I need them held, I'll just double-tap. * The `GUI` key is special, because when I double-tap it, it sends `GUI + w`, which pops up an application selector. It also switches to a one-shot layer, where the number row on the left half turns into app selector macros, for the most common things I usually want to switch to. Otherwise it behaves as on a normal layout. * The `ESC` key also doubles as a one-shot cancel key: if tapped while any of the one-shot modifiers are in-flight (as in, single-tapped, and not expired yet), it cancels all one-shot modifiers. It also cancels the **Hun** layer, if active. Otherwise it sends the usual keycode. @@ -57,28 +56,16 @@ At its core, this is a Dvorak layout, with some minor changes. The more interest - `LEAD d` toggles logging keypress positions to the HID console. - `LEAD t` toggles time travel. Figuring out the current `date` is left as an exercise to the reader. - `LEAD u` enters the [Unicode symbol input](#unicode-symbol-input) mode. + +The symbols on the front in the image above have the same color as the key that activates them, with the exception of the **Arrow** layer, which is just black on the front. ## ADORE layer [![ADORE layer](images/adore-layer.png)](http://www.keyboard-layout-editor.com/#/gists/45681a17453d235925b6028dd83bf12a) -While using the standard Dvorak layout, I encountered a number of inconveniences, and on this layer, I am playing with ideas to make the layout feel better. Initially, it was based on [Capewell-Dvorak][cpd], but that too, had shortcomings I was not happy with. So now this is something inbetween, with own observations thrown in. How it works out in the long run remains to be seen. +My experimental layout, that I keep tweaking. No full description here, because things are very much in flux. - [cpd]: http://www.michaelcapewell.com/projects/keyboard/layout_capewell-dvorak.htm - -Based on a week and a half of typing, the keys were rearranged, and the home row neatly spelled out **ADORE**, that gave the layout its name. - -## Hungarian layer - -[![Hungarian layer](images/hun-layer.png)](http://www.keyboard-layout-editor.com/#/gists/b160f6ec90d58c127c114c89f66e9dc9) - -On this layer, the accented characters are at the same position as their base variant. For some, which can have other diatribes, the long one is on top, short's on bottom. Tapping any of the accented characters takes us back to the base layer. - -## Navigation and media layer - -[![Navigation and media layer](images/nav-n-media-layer.png)](http://www.keyboard-layout-editor.com/#/gists/c59c453f9fe1a3238ba1494e7e5c6892) - -This layer is primarily for navigating with the cursor or the mouse, and some media things. +Note that the **HUN** layer does not work well with ADORE: it still has the same layout as on the [Base](#base-layer) layer. This will remain until ADORE becomes the default. ## Steno layer @@ -93,8 +80,8 @@ The primary purpose of the LEDs is to show the modifier status, a secondary, to For the layers, the following rules apply: * When the [ADORE layer](#adore-layer) is toggled on, LEDs will light up from left to right in a sequence, then turn off. When the layer is toggled off, the LEDs light up and turn off in the other direction. No LEDs are on while the layer is active. -* When the [Hungarian layer](#hungarian-layer) is active, the *green* and *blue* LEDs are on. -* When the [Navigation and media layer](#navigation-and-media-layer) is active, the *red* and *green* ones are on. +* When the **Hungarian** layer is active, the *green* and *blue* LEDs are on. +* When the **Media** layer is active, the *red* and *green* ones are on. * When the **ARROW** layer is active, the *red* and *blue* ones are on. * For the [Steno layer](#steno-layer), all LEDs will be turned on. @@ -129,6 +116,10 @@ The generated heatmap looks somewhat like this: ![Heatmap](images/heatmap.png) +## Layer notification + +There is a very small tool in `tools/layer-notify`, that listens to the HID console, looking for layer change events, and pops up a notification for every detected change. It is a very simple tool, mainly serving as an example. + # Building To make my workflow easier, this layout is maintained in [its own repository][algernon:ez-layout]. To build it, you will need the [QMK][qmk] firmware checked out, and this repo either checked out to something like `keyboards/ergodox_ez/algernon-master`. One way to achieve that is this: @@ -156,6 +147,43 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the # Changelog +## v1.7 + +*2016-09-18* + +### Overall changes + +* The number row has been completely rearranged on both the [Base](#base-layer) and the [ADORE](#adore-layer) layers. +* The number/function key behavior was changed: function keys are now on the **Media**. +* The `:`/`;` and `-`/`_` keys were put back to their thumb position on the bottom row, on both the [Base](#base-layer) and [ADORE](#adore-layer) layers. +* The bottom large keys on the inner side of each half now function as [tmux](http://tmux.github.io/) keys: the left to send the prefix, the right to send the `display-panes` key. The left also doubles as a GNU screen prefix key, and sends `C-a` when double tapped. +* A number of functions, such as the **AppSel** layer, now require the `hid-commands` tool to be running, with the output of `hid_listen` being piped to it. + +### ADORE + +* `Y` and `X` have been swapped again. + +### Media/Navigation layer + +* The function keys are now on this layer. +* Mouse keys have been removed. +* Media start/stop/prev/next have been removed. +* `Print screen` has been removed. +* There is only one screen lock key now. + +### Heatmap + +* Fixed a few issues in the finger-stats calculation. +* The tool now also timestamps and saves all input lines to a logfile, which it loads on start, allowing one to continue the collection after upgrading the tool. +* The heatmap tool will now colorize the stats by default. +* The periodic stats are now printed in a more compact format. + +### Tools + +* Added a new tool, `tools/layer-notify` that listens to layer change events on the HID console, and pops up a notification on layer changes. +* Another new tool, `tools/text-to-log.py` has been added that converts arbitrary text to a keylogger output, which can be fed to the heatmap generator. +* A number of features have been moved to the `tools/hid-commands` utility. These generally are OS dependent, and are easier to implement on the software side. + ## v1.6 *2016-08-24* @@ -174,7 +202,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the ### Miscellaneous changes * `LEAD u` now starts the symbolic unicode input system, instead of the OS-one. -* The mouse acceleration keys on the [Navigation and Media](#navigation-and-media-layer) layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. +* The mouse acceleration keys on the **Navigation/Media** layer have been turned into toggles: tap them once to turn them on, until tapped again. Tapping an accelerator button will turn all the others off. * When the **ARROW** layer is on, the *red* and *blue* LEDs light up now. ### Heatmap @@ -221,7 +249,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the * The `:;` key has changed behaviour: to access the `;` symbol, the key needs to be double-tapped, instead of shifted. * The `=` and `\` keys were swapped, `=` moved to the home row, on both the [base](#base-layer) and the **experimental** layers. * The arrow and navigation keys were redone, they are now more accessible, but the navigation keys require an extra tap to access. -* The **Emacs** layer is gone, replaced by a simplified [navigation and media](#navigation-and-media-layer) layer. +* The **Emacs** layer is gone, replaced by a simplified **navigation and media** layer. * `LEAD v` types the firmware version, and the keymap version. * On the **experimental** layer, the `L` and `Q`, and the `K` and `G` keys were swapped. * The [Steno](#steno-layer) layer gained a few more `#` and `*` keys, to make it easier on my fingers. @@ -240,7 +268,7 @@ The keymap default to forcing NKRO, which seems to upset Windows, and except the - `-` on the left half was replaced by `Tab`. - `Tab`'s original position is taken by a `Media Next`/`Media Prev` key. - `:` now inputs `;` when shifted. -* `ESC` cancels the [Hungarian](#hungarian-layer) layer too, not just modifiers. +* `ESC` cancels the **Hungarian** layer too, not just modifiers. ## v1.0 diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json index 4dfa877a7..502d1e6ea 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.ADORE.json @@ -13,18 +13,15 @@ [ { "x": 3.5, - "c": "#a7d0db", "fa": [ 0, 0, 2 ] }, - "#\n3\nF3", + "*\n5\nF5", { "x": 10.5, - "c": "#a7d0db", - "t": "#000000", "a": 4, "fa": [ 0, @@ -32,54 +29,44 @@ 2 ] }, - "*\n8\nF8" + "#\n4\nF4" ], [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, - "@\n2\nF2", + "@\n7\nF7", { - "x": 1, - "c": "#7adabd", - "t": "#000000" + "x": 1 }, - "$\n4\nF4", + "^\n3\nF3", { "x": 8.5 }, - "&\n7\nF7", + "!\n2\nF2", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, - "(\n9\nF9" + "&\n6\nF6" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, - "%\n5\nF5", + "$\n1\nF1", { - "c": "#f9cd31", "a": 7, - "f": 2 + "f": 3 }, - "STENO", + "F11", { "x": 4.5, "f": 3 }, "F12", { - "c": "#7adabd", "a": 4, "f": 3, "fa": [ @@ -88,19 +75,17 @@ 2 ] }, - "^\n6\nF6" + "%\n0\nF10" ], [ { "y": -0.875, - "c": "#ffb2d2", "f": 9, "a": 6, "w": 1.5 }, "\n\n", { - "t": "#0d0d0b", "f": 3, "a": 4, "fa": [ @@ -109,23 +94,21 @@ 2 ] }, - "!\n1\nF1", + " \n9\nF9", { "x": 14.5 }, - ")\n0\nF10", + " \n8\nF8", { "a": 7, "w": 1.5 }, - "F11" + "STENO" ], [ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 6 }, "G", @@ -138,15 +121,11 @@ { "y": -0.875, "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", "a": 6 }, "W", { "x": 1, - "c": "#7adabd", - "t": "#000000", "a": 6 }, "L", @@ -155,22 +134,17 @@ }, "H", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "P" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "M", { - "c": "#93c9b7", "a": 4, "fa": [0, 0, 0], "h": 1.5 @@ -182,7 +156,6 @@ }, "}\n)\n]", { - "c": "#7adabd", "a": 6 }, "F" @@ -190,24 +163,21 @@ [ { "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", "f": 3, "a": 4, "w": 1.5 }, "\n\n~\n`", { - "c": "#ffb2d2", "a": 6, "f": 3 }, - "Y", + "X", { "x": 14.5, "a": 6 }, - "X", + "Y", { "a": 4, "w": 1.5 @@ -218,8 +188,6 @@ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 6 }, "E", @@ -231,15 +199,11 @@ [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, "O", { "x": 1, - "c": "#7adabd", - "t": "#000000", "n": true }, "I", @@ -249,18 +213,14 @@ }, "R", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "N" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "U", { @@ -271,8 +231,6 @@ [ { "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", "fa": [ 6 ], @@ -308,22 +266,21 @@ { "y": -0.625, "x": 6.5, - "c": "#93c9b7", - "t": "#000000", + "a": 7, + "f": 9, "h": 1.5 }, - ";\n:", + "", { "x": 4.5, "h": 1.5 }, - "_\n-" + "" ], [ { "y": -0.75, "x": 3.5, - "c": "#a7d0db", "a": 4, "f": 3 }, @@ -339,15 +296,11 @@ { "y": -0.875, "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", "a": 6 }, "Q", { "x": 1, - "c": "#7adabd", - "t": "#000000", "a": 4 }, "<\n,", @@ -357,9 +310,7 @@ }, "K", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "J" ], @@ -367,8 +318,6 @@ { "y": -0.875, "x": 5.5, - "c": "#7adabd", - "t": "#000000", "a": 4 }, ">\n.", @@ -381,15 +330,12 @@ [ { "y": -0.875, - "c": "#ffb07b", "f": 9, "w": 1.5, "g": true }, "", { - "c": "#ffb2d2", - "t": "#0d0d0b", "a": 6, "f": 3, "g": false @@ -401,8 +347,6 @@ }, "?\n/", { - "c": "#ffb07b", - "t": "#000000", "f": 9, "g": true, "w": 1.5, @@ -414,7 +358,6 @@ { "y": -0.375, "x": 3.5, - "c": "#d9dae0", "g": true, "a": 7, "f": 3 @@ -433,18 +376,16 @@ "", { "x": 1, - "c": "#d4872a", - "g": true, + "g": false, "a": 5 }, - "", + ";\n:", { "x": 8.5 }, - "", + "_\n-", { "x": 1, - "c": "#d9dae0", "g": true, "a": 7 }, @@ -472,7 +413,6 @@ "ry": 4.25, "y": -1, "x": 1, - "c": "#f9cd31", "g": false }, "Alt", @@ -489,7 +429,6 @@ ], [ { - "c": "#d4872a", "a": 7, "f": 9, "h": 2 @@ -500,15 +439,13 @@ }, "", { - "c": "#f9cd31", "f": 3 }, "Ctrl" ], [ { - "x": 2, - "c": "#e26757" + "x": 2 }, "ESC" ], @@ -518,7 +455,6 @@ "rx": 13, "y": -1, "x": -3, - "c": "#f9cd31", "f": 2 }, "MEDIA", @@ -531,7 +467,6 @@ }, "HUN", { - "c": "#d4872a", "f": 9, "h": 2 }, @@ -545,7 +480,6 @@ [ { "x": -3, - "c": "#f9cd31", "f": 2 }, "LEAD" diff --git a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json index 1248d36af..5b4ca06c3 100644 --- a/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json +++ b/keyboards/ergodox/keymaps/algernon/tools/heatmap-layout.Dvorak.json @@ -13,18 +13,15 @@ [ { "x": 3.5, - "c": "#a7d0db", "fa": [ 0, 0, 2 ] }, - "#\n3\nF3", + "*\n5\nF5", { "x": 10.5, - "c": "#a7d0db", - "t": "#000000", "a": 4, "fa": [ 0, @@ -32,54 +29,44 @@ 2 ] }, - "*\n8\nF8" + "#\n4\nF4" ], [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, - "@\n2\nF2", + "@\n7\nF7", { - "x": 1, - "c": "#7adabd", - "t": "#000000" + "x": 1 }, - "$\n4\nF4", + "^\n3\nF3", { "x": 8.5 }, - "&\n7\nF7", + "!\n2\nF2", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, - "(\n9\nF9" + "&\n6\nF6" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, - "%\n5\nF5", + "$\n1\nF1", { - "c": "#f9cd31", "a": 7, - "f": 2 + "f": 3 }, - "STENO", + "F11", { "x": 4.5, "f": 3 }, "F12", { - "c": "#7adabd", "a": 4, "f": 3, "fa": [ @@ -88,12 +75,11 @@ 2 ] }, - "^\n6\nF6" + "%\n0\nF10" ], [ { "y": -0.875, - "c": "#ffb2d2", "f": 6, "a": 6, "w": 1.5 @@ -101,7 +87,6 @@ "\n\n", { "f": 3, - "t": "#0d0d0b", "a": 4, "fa": [ 0, @@ -110,23 +95,21 @@ ] }, - "!\n1\nF1", + " \n9\nF9", { "x": 14.5 }, - ")\n0\nF10", + " \n8\nF8", { "a": 7, "w": 1.5 }, - "F11" + "STENO" ], [ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 4 }, ">\n.", @@ -140,15 +123,11 @@ { "y": -0.875, "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b", "a": 4 }, "<\n,", { "x": 1, - "c": "#7adabd", - "t": "#000000", "a": 6 }, "P", @@ -157,22 +136,17 @@ }, "G", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "R" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "Y", { - "c": "#93c9b7", "a": 4, "h": 1.5 }, @@ -183,7 +157,6 @@ }, "}\n)\n]", { - "c": "#7adabd", "a": 6 }, "F" @@ -191,14 +164,12 @@ [ { "y": -0.875, - "c": "#ffb07b", - "t": "#0d0d0b", "f": 3, + "a": 4, "w": 1.5 }, "\n\n~\n`", { - "c": "#ffb2d2", "a": 4, "f": 3 }, @@ -218,8 +189,6 @@ { "y": -0.375, "x": 3.5, - "c": "#a7d0db", - "t": "#000000", "a": 6 }, "E", @@ -231,15 +200,11 @@ [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, "O", { "x": 1, - "c": "#7adabd", - "t": "#000000", "n": true }, "U", @@ -249,18 +214,14 @@ }, "H", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "N" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "I", { @@ -271,8 +232,6 @@ [ { "y": -0.875, - "c": "#ffb2d2", - "t": "#0d0d0b", "fa": [ 6 ], @@ -308,23 +267,22 @@ { "y": -0.625, "x": 6.5, - "c": "#93c9b7", - "t": "#000000", "a": 7, + "f": 9, "h": 1.5 }, - "(", + "", { "x": 4.5, "h": 1.5 }, - ")" + "" ], [ { "y": -0.75, "x": 3.5, - "c": "#a7d0db", + "f": 3, "a": 6 }, "J", @@ -336,15 +294,11 @@ [ { "y": -0.875, - "x": 2.5, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 2.5 }, "Q", { - "x": 1, - "c": "#7adabd", - "t": "#000000" + "x": 1 }, "K", { @@ -352,18 +306,14 @@ }, "M", { - "x": 1, - "c": "#bfbad1", - "t": "#0d0d0b" + "x": 1 }, "V" ], [ { "y": -0.875, - "x": 5.5, - "c": "#7adabd", - "t": "#000000" + "x": 5.5 }, "X", { @@ -374,14 +324,11 @@ [ { "y": -0.875, - "c": "#ffb07b", "f": 9, "w": 1.5 }, "\n\n", { - "c": "#ffb2d2", - "t": "#0d0d0b", "a": 4, "f": 3 }, @@ -392,8 +339,6 @@ }, "Z", { - "c": "#ffb07b", - "t": "#000000", "f": 9, "w": 1.5 }, @@ -403,7 +348,6 @@ { "y": -0.375, "x": 3.5, - "c": "#d9dae0", "g": true, "a": 7, "f": 3 @@ -422,7 +366,6 @@ "", { "x": 1, - "c": "#d4872a", "g": false, "a": 5 }, @@ -433,7 +376,6 @@ "_\n-", { "x": 1, - "c": "#d9dae0", "g": true, "a": 7 }, @@ -461,7 +403,6 @@ "ry": 4.25, "y": -1, "x": 1, - "c": "#f9cd31", "g": false }, "Alt", @@ -478,7 +419,6 @@ ], [ { - "c": "#d4872a", "a": 7, "f": 9, "h": 2 @@ -489,15 +429,13 @@ }, "", { - "c": "#f9cd31", "f": 3 }, "Ctrl" ], [ { - "x": 2, - "c": "#e26757" + "x": 2 }, "ESC" ], @@ -507,7 +445,6 @@ "rx": 13, "y": -1, "x": -3, - "c": "#f9cd31", "f": 2 }, "MEDIA", @@ -520,7 +457,6 @@ }, "LEAD", { - "c": "#d4872a", "f": 9, "h": 2 }, @@ -534,7 +470,6 @@ [ { "x": -3, - "c": "#f9cd31", "f": 2 }, "HUN" diff --git a/keyboards/ergodox/keymaps/algernon/tools/hid-commands b/keyboards/ergodox/keymaps/algernon/tools/hid-commands new file mode 100755 index 000000000..f3b83cf6d --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/hid-commands @@ -0,0 +1,61 @@ +#!/bin/bash +set -e + +cmd_wm () { + WIN="$(xdotool getactivewindow)" + wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz + xdotool windowsize ${WIN} 100% 100% + wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz +} + +_cmd_appsel () { + wmctrl -x -a $1 || true + xdotool key Escape +} + +cmd_appsel_music () { + wmctrl -x -a rhythmbox || wmctrl -x -a spotify || true + xdotool key Escape +} + +cmd_appsel_slack () { + _cmd_appsel slack +} + +cmd_appsel_emacs () { + _cmd_appsel emacs24 +} + +cmd_appsel_term () { + _cmd_appsel gnome-terminal +} + +cmd_appsel_chrome () { + _cmd_appsel chromium +} + +cmd_help () { + cat </dev/null 2>&1; then + cmd_${cmd} + fi +done + + diff --git a/keyboards/ergodox/keymaps/algernon/tools/layer-notify b/keyboards/ergodox/keymaps/algernon/tools/layer-notify new file mode 100755 index 000000000..627c2861e --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/layer-notify @@ -0,0 +1,12 @@ +#!/bin/sh +HL="${HID_LISTEN:-$HOME/src/ext/hid_listen/hid_listen}" + +sudo "${HL}" | grep --line-buffered LAYER: | \ +(while read line; do + case $line in + LAYER:*) + layer="$(echo $(echo $line | cut -d: -f2-))" + notify-send -i mark-location-symbolic "Switched to layer: $layer" + ;; + esac + done) diff --git a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py index 68585843b..09c737646 100755 --- a/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py +++ b/keyboards/ergodox/keymaps/algernon/tools/log-to-heatmap.py @@ -1,12 +1,15 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 import json import os import sys import re import argparse +import time from math import floor from os.path import dirname +from subprocess import Popen, PIPE, STDOUT +from blessings import Terminal class Heatmap(object): coords = [ @@ -33,7 +36,7 @@ class Heatmap(object): [ # Row 4 [20, 0], [20, 2], [19, 0], [18, 0], [19, 2], [], [], [], [], - [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], + [19, 4], [18, 2], [19, 6], [20, 4], [20, 6], [], [], [], [] ], [ # Row 5 @@ -56,11 +59,13 @@ class Heatmap(object): def set_attr(orig, new): return new - def set_bg(self, (block, n), color): + def set_bg(self, coords, color): + (block, n) = coords self.set_attr_at(block, n, "c", self.set_attr, color) #self.set_attr_at(block, n, "g", self.set_attr, False) - def set_tap_info(self, (block, n), count, cap): + def set_tap_info(self, coords, count, cap): + (block, n) = coords def _set_tap_info(o, _count, _cap): ns = 4 - o.count ("\n") return o + "\n" * ns + "%.02f%%" % (float(_count) / float(_cap) * 100) @@ -87,8 +92,8 @@ class Heatmap(object): g = (colors[idx2][1] - colors[idx1][1]) * fb + colors[idx1][1] b = (colors[idx2][2] - colors[idx1][2]) * fb + colors[idx1][2] - r, g, b = [x * 255 for x in r, g, b] - return "#%02x%02x%02x" % (r, g, b) + r, g, b = [x * 255 for x in (r, g, b)] + return "#%02x%02x%02x" % (int(r), int(g), int(b)) def __init__(self, layout): self.log = {} @@ -96,7 +101,8 @@ class Heatmap(object): self.max_cnt = 0 self.layout = layout - def update_log(self, (c, r)): + def update_log(self, coords): + (c, r) = coords if not (c, r) in self.log: self.log[(c, r)] = 0 self.log[(c, r)] = self.log[(c, r)] + 1 @@ -132,18 +138,17 @@ class Heatmap(object): # right hand [0, 0, 0, 0, 0] ] - finger_map = [0, 0, 1, 2, 3, 4, 4] + finger_map = [0, 0, 1, 2, 3, 3, 3, 1, 1, 1, 2, 3, 4, 4] for (c, r) in self.log: if r == 5: # thumb cluster if c <= 6: # left side usage[0][4] = usage[0][4] + self.log[(c, r)] else: - usage[1][4] = usage[1][4] + self.log[(c, r)] + usage[1][0] = usage[1][0] + self.log[(c, r)] else: fc = c hand = 0 if fc >= 7: - fc = fc - 7 hand = 1 fm = finger_map[fc] usage[hand][fm] = usage[hand][fm] + self.log[(c, r)] @@ -157,79 +162,158 @@ class Heatmap(object): if total == 0: total = 1 stats = { + "total-keys": total, "hands": { "left": { - "usage": float(hand_usage[0]) / total * 100, + "usage": round(float(hand_usage[0]) / total * 100, 2), "fingers": { - "0 - pinky": 0, - "1 - ring": 0, - "2 - middle": 0, - "3 - index": 0, - "4 - thumb": 0, + "pinky": 0, + "ring": 0, + "middle": 0, + "index": 0, + "thumb": 0, } }, "right": { - "usage": float(hand_usage[1]) / total * 100, + "usage": round(float(hand_usage[1]) / total * 100, 2), "fingers": { - "0 - thumb": 0, - "1 - index": 0, - "2 - middle": 0, - "3 - ring": 0, - "4 - pinky": 0, + "thumb": 0, + "index": 0, + "middle": 0, + "ring": 0, + "pinky": 0, } }, } } hmap = ['left', 'right'] - fmap = ['0 - pinky', '1 - ring', '2 - middle', '3 - index', '4 - thumb', - '0 - thumb', '1 - index', '2 - middle', '3 - ring', '4 - pinky'] + fmap = ['pinky', 'ring', 'middle', 'index', 'thumb', + 'thumb', 'index', 'middle', 'ring', 'pinky'] for hand_idx in range(len(usage)): hand = usage[hand_idx] for finger_idx in range(len(hand)): - stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = float(hand[finger_idx]) / total * 100 + stats['hands'][hmap[hand_idx]]['fingers'][fmap[finger_idx + hand_idx * 5]] = round(float(hand[finger_idx]) / total * 100, 2) return stats def dump_all(out_dir, heatmaps): - for layer in heatmaps.keys(): + stats = {} + t = Terminal() + t.clear() + sys.stdout.write("\x1b[2J\x1b[H") + + print ('{t.underline}{outdir}{t.normal}\n'.format(t=t, outdir=out_dir)) + + keys = list(heatmaps.keys()) + keys.sort() + + for layer in keys: if len(heatmaps[layer].log) == 0: continue with open ("%s/%s.json" % (out_dir, layer), "w") as f: json.dump(heatmaps[layer].get_heatmap(), f) - print >>sys.stderr, "%s stats:" % (layer) - json.dump (heatmaps[layer].get_stats(), sys.stderr, - indent = 4, sort_keys = True) - print >>sys.stderr, "" - print >>sys.stderr, "" + stats[layer] = heatmaps[layer].get_stats() -def main(opts): + left = stats[layer]['hands']['left'] + right = stats[layer]['hands']['right'] + + print ('{t.bold}{layer}{t.normal} ({total:,} taps):'.format(t=t, layer=layer, + total=int(stats[layer]['total-keys'] / 2))) + print (('{t.underline} | ' + \ + 'left ({l[usage]:6.2f}%) | ' + \ + 'right ({r[usage]:6.2f}%) |{t.normal}').format(t=t, l=left, r=right)) + print ((' {t.bright_magenta}pinky{t.white} | {left[pinky]:6.2f}% | {right[pinky]:6.2f}% |\n' + \ + ' {t.bright_cyan}ring{t.white} | {left[ring]:6.2f}% | {right[ring]:6.2f}% |\n' + \ + ' {t.bright_blue}middle{t.white} | {left[middle]:6.2f}% | {right[middle]:6.2f}% |\n' + \ + ' {t.bright_green}index{t.white} | {left[index]:6.2f}% | {right[index]:6.2f}% |\n' + \ + ' {t.bright_red}thumb{t.white} | {left[thumb]:6.2f}% | {right[thumb]:6.2f}% |\n' + \ + '').format(left=left['fingers'], right=right['fingers'], t=t)) + +def process_line(line, heatmaps, opts, stamped_log = None): + m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) + if not m: + return False + if stamped_log is not None: + if line.startswith("KL:"): + print ("%10.10f %s" % (time.time(), line), + file = stamped_log, end = '') + else: + print (line, + file = stamped_log, end = '') + stamped_log.flush() + + (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4)) + if (c, r) not in opts.allowed_keys: + return False + + heatmaps[l].update_log ((c, r)) + + return True + +def setup_allowed_keys(opts): + if len(opts.only_key): + incmap={} + for v in opts.only_key: + m = re.search ('(\d+),(\d+)', v) + if not m: + continue + (c, r) = (int(m.group(1)), int(m.group(2))) + incmap[(c, r)] = True + else: + incmap={} + for r in range(0, 6): + for c in range(0, 14): + incmap[(c, r)] = True + for v in opts.ignore_key: + m = re.search ('(\d+),(\d+)', v) + if not m: + continue + (c, r) = (int(m.group(1)), int(m.group(2))) + del(incmap[(c, r)]) + + return incmap + +def main(opts): heatmaps = {"Dvorak": Heatmap("Dvorak"), "ADORE": Heatmap("ADORE") } cnt = 0 - restrict_row = opts.restrict_row out_dir = opts.outdir + if not os.path.exists(out_dir): + os.makedirs(out_dir) + + opts.allowed_keys = setup_allowed_keys(opts) + + if not opts.one_shot: + + try: + with open("%s/stamped-log" % out_dir, "r") as f: + while True: + line = f.readline() + if not line: + break + if not process_line(line, heatmaps, opts): + continue + except: + pass + + stamped_log = open ("%s/stamped-log" % (out_dir), "a+") + else: + stamped_log = None + while True: line = sys.stdin.readline() if not line: break - m = re.search ('KL: col=(\d+), row=(\d+), pressed=(\d+), layer=(.*)', line) - if not m: + if not process_line(line, heatmaps, opts, stamped_log): continue cnt = cnt + 1 - (c, r, l) = (int(m.group (2)), int(m.group (1)), m.group (4)) - if restrict_row != -1 and r != restrict_row: - continue - if c in opts.ignore_columns: - continue - - heatmaps[l].update_log ((c, r)) - if opts.dump_interval != -1 and cnt >= opts.dump_interval: + if opts.dump_interval != -1 and cnt >= opts.dump_interval and not opts.one_shot: cnt = 0 dump_all(out_dir, heatmaps) @@ -239,11 +323,17 @@ if __name__ == "__main__": parser = argparse.ArgumentParser (description = "keylog to heatmap processor") parser.add_argument ('outdir', action = 'store', help = 'Output directory') - parser.add_argument ('--row', dest = 'restrict_row', action = 'store', type = int, - default = -1, help = 'Restrict processing to this row only') parser.add_argument ('--dump-interval', dest = 'dump_interval', action = 'store', type = int, default = 100, help = 'Dump stats and heatmap at every Nth event, -1 for dumping at EOF only') - parser.add_argument ('--ignore-column', dest = 'ignore_columns', action = 'append', type = int, - default = [], help = 'Ignore the specified columns') + parser.add_argument ('--ignore-key', dest = 'ignore_key', action = 'append', type = str, + default = [], help = 'Ignore the key at position (x, y)') + parser.add_argument ('--only-key', dest = 'only_key', action = 'append', type = str, + default = [], help = 'Only include key at position (x, y)') + parser.add_argument ('--one-shot', dest = 'one_shot', action = 'store_true', + help = 'Do not load previous data, and do not update it, either.') args = parser.parse_args() + if len(args.ignore_key) and len(args.only_key): + print ("--ignore-key and --only-key are mutually exclusive, please only use one of them!", + file = sys.stderr) + sys.exit(1) main(args) diff --git a/keyboards/ergodox/keymaps/algernon/tools/max-focused b/keyboards/ergodox/keymaps/algernon/tools/max-focused deleted file mode 100755 index 4d5220aa8..000000000 --- a/keyboards/ergodox/keymaps/algernon/tools/max-focused +++ /dev/null @@ -1,5 +0,0 @@ -#! /bin/sh -WIN="$(xdotool getactivewindow)" -wmctrl -i -r ${WIN} -b remove,maximized_vert,maximized_horz -xdotool windowsize ${WIN} 100% 100% -wmctrl -i -r ${WIN} -b add,maximized_vert,maximized_horz diff --git a/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py new file mode 100755 index 000000000..e068c3cbf --- /dev/null +++ b/keyboards/ergodox/keymaps/algernon/tools/text-to-log.py @@ -0,0 +1,107 @@ +#!/usr/bin/env python3 + +import os +import sys + +charmap = { + '9': [[1, 0]], + '7': [[2, 0]], '@': [[2, 5], [2, 0]], + '5': [[3, 0]], '*': [[2, 5], [3, 0]], + '3': [[4, 0]], '^': [[2, 5], [4, 0]], + '1': [[5, 0]], '$': [[2, 5], [5, 0]], + '0': [[8, 0]], '%': [[2, 5], [8, 0]], + '2': [[9, 0]], '!': [[2, 5], [9, 0]], + '4': [[10, 0]], '#': [[2, 5], [10, 0]], + '6': [[11, 0]], '&': [[2, 5], [11, 0]], + '8': [[12, 0]], + + '`': [[0, 1]], '~': [[2, 5], [0, 1]], + 'y': [[1, 1]], 'Y': [[2, 5], [1, 1]], + 'w': [[2, 1]], 'W': [[2, 5], [2, 1]], + 'g': [[3, 1]], 'G': [[2, 5], [3, 1]], + 'l': [[4, 1]], 'L': [[2, 5], [4, 1]], + 'm': [[5, 1]], 'M': [[2, 5], [5, 1]], + '[': [[6, 1]], '{': [[2, 5], [6, 1]], '(': [[6, 1], [6, 1]], + ']': [[7, 1]], '}': [[2, 5], [7, 1]], ')': [[7, 1], [7, 1]], + 'f': [[8, 1]], 'F': [[2, 5], [8, 1]], + 'h': [[9, 1]], 'H': [[2, 5], [9, 1]], + 'c': [[10, 1]], 'C': [[2, 5], [10, 1]], + 'p': [[11, 1]], 'P': [[2, 5], [11, 1]], + 'x': [[12, 1]], 'X': [[2, 5], [12, 1]], + '\\': [[13, 1]], '|': [[2, 5], [13, 1]], + + '\t': [[0, 2]], + 'a': [[1, 2]], 'A': [[2, 5], [1, 2]], + 'o': [[2, 2]], 'O': [[2, 5], [2, 2]], + 'e': [[3, 2]], 'E': [[2, 5], [3, 2]], + 'i': [[4, 2]], 'I': [[2, 5], [4, 2]], + 'u': [[5, 2]], 'U': [[2, 5], [5, 2]], + 'd': [[8, 2]], 'D': [[2, 5], [8, 2]], + 'r': [[9, 2]], 'R': [[2, 5], [9, 2]], + 't': [[10, 2]], 'T': [[2, 5], [10, 2]], + 'n': [[11, 2]], 'N': [[2, 5], [11, 2]], + 's': [[12, 2]], 'S': [[2, 5], [12, 2]], + '=': [[13, 2]], '+': [[2, 5], [13, 2]], + + 'z': [[1, 3]], 'Z': [[2, 5], [1, 3]], + 'q': [[2, 3]], 'Q': [[2, 5], [2, 3]], + '\'': [[3, 3]], '"': [[2, 5], [3, 3]], + ',': [[4, 3]], '<': [[2, 5], [4, 3]], + '.': [[5, 3]], '>': [[2, 5], [5, 3]], + 'b': [[8, 3]], 'B': [[2, 5], [8, 3]], + 'k': [[9, 3]], 'K': [[2, 5], [9, 3]], + 'v': [[10, 3]], 'V': [[2, 5], [10, 3]], + 'j': [[11, 3]], 'J': [[2, 5], [11, 3]], + '/': [[12, 3]], '?': [[2, 5], [12, 3]], + + ':': [[4, 4]], ';': [[4, 4], [4, 4]], + '-': [[9, 4]], '_': [[2, 5], [9, 4]], + + ' ': [[10, 5]], + '\n': [[11, 5]], + + ## Layered things + # Hungarian + 'á': [[9, 5], [1, 2]], 'Á': [[2, 5], [9, 5], [1, 2]], + 'ó': [[9, 5], [2, 2]], 'Ó': [[2, 5], [9, 5], [2, 2]], + 'ő': [[9, 5], [2, 1]], 'Ő': [[2, 5], [9, 5], [2, 1]], + 'ö': [[9, 5], [2, 3]], 'Ö': [[2, 5], [9, 5], [2, 3]], + 'é': [[9, 5], [3, 2]], 'É': [[2, 5], [9, 5], [3, 2]], + 'ú': [[9, 5], [4, 2]], 'Ú': [[2, 5], [9, 5], [4, 2]], + 'ű': [[9, 5], [4, 1]], 'Ű': [[2, 5], [9, 5], [4, 1]], + 'ü': [[9, 5], [4, 3]], 'Ü': [[2, 5], [9, 5], [4, 3]], + 'í': [[9, 5], [5, 2]], 'Í': [[2, 5], [9, 5], [5, 2]], +} + +def lookup_char(layer, ch): + if ch in charmap: + return charmap[ch] + return None + +def process_char(layer, ch, out=sys.stdout): + keys = lookup_char(layer, ch) + if not keys: + print ("Unknown char: %s" % ch, file=sys.stderr) + else: + for (c, r) in keys: + print ("KL: col=%d, row=%d, pressed=1, layer=%s" % (r, c, layer), file=out) + print ("KL: col=%d, row=%d, pressed=0, layer=%s" % (r, c, layer), file=out) + +def process_file(fn, layer, out=sys.stdout): + with open(fn, "r") as f: + ch = f.read(1) + while ch: + process_char(layer, ch, out) + ch = f.read(1) + +if sys.argv[1] == '-': + out='/dev/stdin' +else: + out=sys.argv[1] + +if len(sys.argv) >= 2: + layer = 'ADORE' +else: + layer = sys.argv[2] + +process_file(out, layer = layer) -- cgit v1.2.3 From 94af0194ddfe8f8a3069c926170d8995de5c1781 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 19 Sep 2016 13:22:34 +0200 Subject: - Updated dbroqua layout for kc60 --- keyboards/kc60/keymaps/dbroqua/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/dbroqua/keymap.c b/keyboards/kc60/keymaps/dbroqua/keymap.c index e17827fad..1b645ea93 100644 --- a/keyboards/kc60/keymaps/dbroqua/keymap.c +++ b/keyboards/kc60/keymaps/dbroqua/keymap.c @@ -34,9 +34,9 @@ const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Qwerty * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | ` | Bksp| + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | * |-----------------------------------------------------------------------------------------+ * | Caps/FN1| A | S | D | F | G | H | J | K | L | ; | ' | Enter | * |-----------------------------------------------------------------------------------------+ @@ -46,11 +46,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------------' */ [0] = KEYMAP( /* Basic QWERTY */ - 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_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_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_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, \ LT(_FNCAPS, 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, MO(_FNRIGHTSHIFT), KC_UP, \ - KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_BSPC, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ + KC_LCTL, KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ ), /* Layer 1 -- cgit v1.2.3 From 9a2e24fa98f90517a0a091b3ccd9de125457d09f Mon Sep 17 00:00:00 2001 From: dbroqua Date: Mon, 19 Sep 2016 13:36:36 +0200 Subject: - Removed HHKB like layout --- keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c | 103 --------------------- keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md | 11 --- 2 files changed, 114 deletions(-) delete mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c delete mode 100644 keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md (limited to 'keyboards') diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c b/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c deleted file mode 100644 index 0c952327b..000000000 --- a/keyboards/kc60/keymaps/dbroqua_hhkb_like/keymap.c +++ /dev/null @@ -1,103 +0,0 @@ -// This is the canonical layout file for the Quantum project. If you want to add another keyboard, -// this is the style you want to emulate. - -#include "kc60.h" - -#define _QWERTY 0 -#define _FNCAPS 1 -#define _FNRIGHTSHIFT 2 - -// Fillers to make layering more clear -#define ______ KC_TRNS -#define XXXXXXX KC_NO - -// Func macro definitions. -#define S_LED FUNC(0) -#define S_LEDI FUNC(1) -#define S_LEDD FUNC(2) - -// Enable these functions using FUNC(n) macro. -const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_BACKLIGHT_TOGGLE(), - [1] = ACTION_BACKLIGHT_INCREASE(), - [2] = ACTION_BACKLIGHT_DECREASE() - }; - -/* - * | | | - * | | | - * | | | - * | | | - * | | - */ - -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* Qwerty - * ,-----------------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | - * |-----------------------------------------------------------------------------------------+ - * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | - * |-----------------------------------------------------------------------------------------+ - * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | - * |-----------------------------------------------------------------------------------------+ - * | Shift | Z | X | C | V | B | N | M | , | . | / | Up | FN2 | - * |-----------------------------------------------------------------------------------------+ - * | FN1 | Gui | Alt | Space | AltGr | Left | Down | Right | - * `-----------------------------------------------------------------------------------------' - */ - [0] = KEYMAP( /* Basic QWERTY */ - 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_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_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, MO(_FNRIGHTSHIFT), KC_UP, \ - LT(_FNCAPS, KC_CAPS), KC_LGUI, KC_LALT, KC_SPC, KC_GRV, KC_RALT, KC_LEFT, KC_DOWN, KC_RIGHT \ - ), - -/* Layer 1 - * ,-----------------------------------------------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | Ins | Del | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | Psc | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | Led | Led-| Led+| | Mute| Vol+| Vol-| | | | Play | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | Prev | Stop | Next | - * `-----------------------------------------------------------------------------------------' - */ - [_FNCAPS] = KEYMAP( /* Layer 1 */ - ______, 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, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, KC_PSCR,______, ______, ______, ______, ______, ______, \ - ______, ______, S_LED, S_LEDI, S_LEDD,______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \ - ______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT \ - ), - -/* Layer 2 - * ,-----------------------------------------------------------------------------------------. - * | | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | | | | | | | PgUp | | - * |-----------------------------------------------------------------------------------------+ - * | | | | | | Home | PgDown| End | - * `-----------------------------------------------------------------------------------------' - */ - [_FNRIGHTSHIFT] = KEYMAP( /* Layer 2 */ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, \ - ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, ______, KC_PGUP, \ - ______, ______, ______, ______, ______, ______, KC_HOME,KC_PGDN,KC_END \ - ), -}; - -const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) -{ - // MACRODOWN only works in this function - return MACRO_NONE; -}; diff --git a/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md b/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md deleted file mode 100644 index c7850c37c..000000000 --- a/keyboards/kc60/keymaps/dbroqua_hhkb_like/readme.md +++ /dev/null @@ -1,11 +0,0 @@ -# Dbroqua HHKB like Layout - -* Online keyboard layout editor: *Coming soon* -* Online keyboard layout editor (caps layer): http://www.keyboard-layout-editor.com/#/gists/4136d4d1555d6f0d9403c21aaf50fd37 -* Online keyboard layout editor (fn2 layer): http://www.keyboard-layout-editor.com/#/gists/cf4955f73f339020dbb41c15364e7e4f - -# Programming Instructions: -Enter into programming mode and run the following command. -``` -$ sudo KEYMAP=dbroqua_hhkb_like make dfu -``` \ No newline at end of file -- cgit v1.2.3 From 86e85438d36014b6a6a2b20be4454b865374d47a Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Tue, 20 Sep 2016 15:45:50 -0400 Subject: Fixed Qwerty Fn layer to match documented design --- keyboards/planck/keymaps/impossible/keymap.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/keymap.c b/keyboards/planck/keymaps/impossible/keymap.c index e816f359a..503976fa2 100644 --- a/keyboards/planck/keymaps/impossible/keymap.c +++ b/keyboards/planck/keymaps/impossible/keymap.c @@ -97,17 +97,17 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| * | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | * |-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| - * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | [ | ] | + * | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | * |-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| * |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| * `-----------------------------------------------------------------------------------------------' */ [_QW_FN] = { - {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, - {_______, KC_GRAVE, XXXXXXX, KC_PGUP, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_UP, KC_MINUS, KC_EQUAL, KC_F12}, - {_______, XXXXXXX, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, KC_LBRACKET, KC_RBRACKET}, - {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______} + {KC_LGUI, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11}, + {_______, KC_GRAVE, KC_LBRC, KC_PGUP, KC_RBRC, XXXXXXX, XXXXXXX, KC_MINS, KC_UP, KC_EQUAL, XXXXXXX, KC_F12}, + {_______, KC_TAB, KC_HOME, KC_PGDN, KC_END, KC_DELETE, XXXXXXX, KC_LEFT, KC_DOWN, KC_RIGHT, XXXXXXX, XXXXXXX}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______, XXXXXXX, _______, _______, _______, KC_MENU, _______} }, /* Plover layer (http://opensteno.org) -- cgit v1.2.3 From 6631abc1cb0e570271bcf33464e3af17b6fc0b87 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 20 Sep 2016 21:38:59 -0500 Subject: Made Serial and I2C not include the Other This saves 192 bytes --- keyboards/lets_split/config.h | 7 ++++++- keyboards/lets_split/i2c.c | 3 +++ keyboards/lets_split/matrix.c | 23 +++++++++++++++-------- keyboards/lets_split/rules.mk | 4 ++-- keyboards/lets_split/serial.c | 5 ++++- keyboards/lets_split/split_util.c | 8 ++++++-- 6 files changed, 36 insertions(+), 14 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/config.h b/keyboards/lets_split/config.h index ec99514aa..f4d900acc 100644 --- a/keyboards/lets_split/config.h +++ b/keyboards/lets_split/config.h @@ -41,6 +41,11 @@ along with this program. If not, see . // #define USE_I2C +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + // #define EE_HANDS #define I2C_MASTER_LEFT @@ -94,4 +99,4 @@ along with this program. If not, see . //#define NO_ACTION_MACRO //#define NO_ACTION_FUNCTION -#endif \ No newline at end of file +#endif diff --git a/keyboards/lets_split/i2c.c b/keyboards/lets_split/i2c.c index c72789403..084c890c4 100644 --- a/keyboards/lets_split/i2c.c +++ b/keyboards/lets_split/i2c.c @@ -6,6 +6,8 @@ #include #include "i2c.h" +#ifdef USE_I2C + // Limits the amount of we wait for any one i2c transaction. // Since were running SCL line 100kHz (=> 10μs/bit), and each transactions is // 9 bits, a single transaction will take around 90μs to complete. @@ -157,3 +159,4 @@ ISR(TWI_vect) { // Reset everything, so we are ready for the next TWI interrupt TWCR |= (1<. #include "debug.h" #include "util.h" #include "matrix.h" -#include "i2c.h" -#include "serial.h" #include "split_util.h" #include "pro_micro.h" #include "config.h" +#ifdef USE_I2C +# include "i2c.h" +#else // USE_SERIAL +# include "serial.h" +#endif + #ifndef DEBOUNCE -# define DEBOUNCE 5 +# define DEBOUNCE 5 #endif #define ERROR_DISCONNECT_COUNT 5 @@ -145,6 +149,8 @@ uint8_t _matrix_scan(void) return 1; } +#ifdef USE_I2C + // Get rows from other half over i2c int i2c_transaction(void) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; @@ -176,7 +182,8 @@ i2c_error: // the cable is disconnceted, or something else went wrong return 0; } -#ifndef USE_I2C +#else // USE_SERIAL + int serial_transaction(void) { int slaveOffset = (isLeftHand) ? (ROWS_PER_HAND) : 0; @@ -199,7 +206,7 @@ uint8_t matrix_scan(void) #ifdef USE_I2C if( i2c_transaction() ) { -#else +#else // USE_SERIAL if( serial_transaction() ) { #endif // turn on the indicator led when halves are disconnected @@ -235,7 +242,7 @@ void matrix_slave_scan(void) { /* i2c_slave_buffer[i] = matrix[offset+i]; */ i2c_slave_buffer[i] = matrix[offset+i]; } -#else +#else // USE_SERIAL for (int i = 0; i < ROWS_PER_HAND; ++i) { serial_slave_buffer[i] = matrix[offset+i]; } @@ -290,7 +297,7 @@ static void init_cols(void) static matrix_row_t read_cols(void) { matrix_row_t result = 0; - for(int x = 0; x < MATRIX_COLS; x++) { + for(int x = 0; x < MATRIX_COLS; x++) { result |= (_SFR_IO8(col_pins[x] >> 4) & _BV(col_pins[x] & 0xF)) ? 0 : (1 << x); } return result; @@ -298,7 +305,7 @@ static matrix_row_t read_cols(void) static void unselect_rows(void) { - for(int x = 0; x < ROWS_PER_HAND; x++) { + for(int x = 0; x < ROWS_PER_HAND; x++) { _SFR_IO8((row_pins[x] >> 4) + 1) &= ~_BV(row_pins[x] & 0xF); _SFR_IO8((row_pins[x] >> 4) + 2) |= _BV(row_pins[x] & 0xF); } diff --git a/keyboards/lets_split/rules.mk b/keyboards/lets_split/rules.mk index 6961fbd55..6fde8a444 100644 --- a/keyboards/lets_split/rules.mk +++ b/keyboards/lets_split/rules.mk @@ -52,7 +52,7 @@ OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT OPT_DEFS += -DBOOTLOADER_SIZE=4096 # Build Options -# change to "no" to disable the options, or define them in the Makefile in +# change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) @@ -71,4 +71,4 @@ RGBLIGHT_ENABLE ?= no # Enable WS2812 RGB underlight. Do not enable this # Do not enable SLEEP_LED_ENABLE. it uses the same timer as BACKLIGHT_ENABLE SLEEP_LED_ENABLE ?= no # Breathing sleep LED during USB suspend -CUSTOM_MATRIX = yes \ No newline at end of file +CUSTOM_MATRIX = yes diff --git a/keyboards/lets_split/serial.c b/keyboards/lets_split/serial.c index f439c2f20..6faed09ce 100644 --- a/keyboards/lets_split/serial.c +++ b/keyboards/lets_split/serial.c @@ -10,9 +10,10 @@ #include #include #include - #include "serial.h" +#ifdef USE_SERIAL + // Serial pulse period in microseconds. Its probably a bad idea to lower this // value. #define SERIAL_DELAY 24 @@ -223,3 +224,5 @@ int serial_update_buffers(void) { sei(); return 0; } + +#endif diff --git a/keyboards/lets_split/split_util.c b/keyboards/lets_split/split_util.c index 65003a71a..461921798 100644 --- a/keyboards/lets_split/split_util.c +++ b/keyboards/lets_split/split_util.c @@ -6,11 +6,15 @@ #include #include "split_util.h" #include "matrix.h" -#include "i2c.h" -#include "serial.h" #include "keyboard.h" #include "config.h" +#ifdef USE_I2C +# include "i2c.h" +#else +# include "serial.h" +#endif + volatile bool isLeftHand = true; static void setup_handedness(void) { -- cgit v1.2.3 From b30e6c1c9e1c876ddf95fcc3bc727a04ca6f2abc Mon Sep 17 00:00:00 2001 From: IBNobody Date: Tue, 20 Sep 2016 21:46:33 -0500 Subject: Created I2C and Serial keymaps for unit testing Having a dedicated I2C keymap and a dedicated serial keymap will allow the testing suite to check both conditions. --- keyboards/lets_split/keymaps/i2c/config.h | 102 +++++++++++++ keyboards/lets_split/keymaps/i2c/keymap.c | 214 +++++++++++++++++++++++++++ keyboards/lets_split/keymaps/serial/config.h | 102 +++++++++++++ keyboards/lets_split/keymaps/serial/keymap.c | 214 +++++++++++++++++++++++++++ 4 files changed, 632 insertions(+) create mode 100644 keyboards/lets_split/keymaps/i2c/config.h create mode 100644 keyboards/lets_split/keymaps/i2c/keymap.c create mode 100644 keyboards/lets_split/keymaps/serial/config.h create mode 100644 keyboards/lets_split/keymaps/serial/keymap.c (limited to 'keyboards') diff --git a/keyboards/lets_split/keymaps/i2c/config.h b/keyboards/lets_split/keymaps/i2c/config.h new file mode 100644 index 000000000..2671fabf6 --- /dev/null +++ b/keyboards/lets_split/keymaps/i2c/config.h @@ -0,0 +1,102 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +#define CATERINA_BOOTLOADER + +#define USE_I2C + +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/lets_split/keymaps/i2c/keymap.c b/keyboards/lets_split/keymaps/i2c/keymap.c new file mode 100644 index 000000000..0d2d94b67 --- /dev/null +++ b/keyboards/lets_split/keymaps/i2c/keymap.c @@ -0,0 +1,214 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + 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),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + 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, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file diff --git a/keyboards/lets_split/keymaps/serial/config.h b/keyboards/lets_split/keymaps/serial/config.h new file mode 100644 index 000000000..f4d900acc --- /dev/null +++ b/keyboards/lets_split/keymaps/serial/config.h @@ -0,0 +1,102 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x3060 +#define DEVICE_VER 0x0001 +#define MANUFACTURER Wootpatoot +#define PRODUCT Lets Split +#define DESCRIPTION A split keyboard for the cheap makers + +/* key matrix size */ +// Rows are doubled-up +#define MATRIX_ROWS 8 +#define MATRIX_COLS 6 + +// wiring of each half +#define MATRIX_ROW_PINS { B5, B4, E6, D7 } +#define MATRIX_COL_PINS { F4, F5, F6, F7, B1, B3 } + +#define CATERINA_BOOTLOADER + +// #define USE_I2C + +// Use serial if not using I2C +#ifndef USE_I2C +# define USE_SERIAL +#endif + +// #define EE_HANDS + +#define I2C_MASTER_LEFT +// #define I2C_MASTER_RIGHT + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +// #define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* ws2812 RGB LED */ +#define RGB_DI_PIN D4 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 8 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/lets_split/keymaps/serial/keymap.c b/keyboards/lets_split/keymaps/serial/keymap.c new file mode 100644 index 000000000..0d2d94b67 --- /dev/null +++ b/keyboards/lets_split/keymaps/serial/keymap.c @@ -0,0 +1,214 @@ +#include "lets_split.h" +#include "action_layer.h" +#include "eeconfig.h" + +extern keymap_config_t keymap_config; + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _QWERTY 0 +#define _COLEMAK 1 +#define _DVORAK 2 +#define _LOWER 3 +#define _RAISE 4 +#define _ADJUST 16 + +enum custom_keycodes { + QWERTY = SAFE_RANGE, + COLEMAK, + DVORAK, + LOWER, + RAISE, + ADJUST, +}; + +// Fillers to make layering more clear +#define _______ KC_TRNS +#define XXXXXXX KC_NO + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + +/* Qwerty + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | E | R | T | Y | U | I | O | P | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | S | D | F | G | H | J | K | L | ; | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | N | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_QWERTY] = KEYMAP( \ + 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 , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Colemak + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_COLEMAK] = KEYMAP( \ + KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_BSPC, \ + KC_ESC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT, \ + KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Dvorak + * ,-----------------------------------------------------------------------------------. + * | Tab | " | , | . | P | Y | F | G | C | R | L | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Esc | A | O | E | U | I | D | H | T | N | S | / | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| ; | Q | J | K | X | B | M | W | V | Z |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * |Adjust| Ctrl | Alt | GUI |Lower |Space |Space |Raise | Left | Down | Up |Right | + * `-----------------------------------------------------------------------------------' + */ +[_DVORAK] = KEYMAP( \ + KC_TAB, KC_QUOT, KC_COMM, KC_DOT, KC_P, KC_Y, KC_F, KC_G, KC_C, KC_R, KC_L, KC_BSPC, \ + KC_ESC, KC_A, KC_O, KC_E, KC_U, KC_I, KC_D, KC_H, KC_T, KC_N, KC_S, KC_SLSH, \ + KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_ENT , \ + ADJUST, KC_LCTL, KC_LALT, KC_LGUI, LOWER, KC_SPC, KC_SPC, RAISE, KC_LEFT, KC_DOWN, KC_UP, KC_RGHT \ +), + +/* Lower + * ,-----------------------------------------------------------------------------------. + * | ~ | ! | @ | # | $ | % | ^ | & | * | ( | ) | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | _ | + | | \ | | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO ~ |ISO | | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_LOWER] = KEYMAP( \ + 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),_______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Raise + * ,-----------------------------------------------------------------------------------. + * | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Del | F1 | F2 | F3 | F4 | F5 | F6 | - | = | [ | ] | \ | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | F7 | F8 | F9 | F10 | F11 | F12 |ISO # |ISO / | | |Enter | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | Next | Vol- | Vol+ | Play | + * `-----------------------------------------------------------------------------------' + */ +[_RAISE] = KEYMAP( \ + 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, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \ +), + +/* Adjust (Lower + Raise) + * ,-----------------------------------------------------------------------------------. + * | | Reset| | | | | | | | | | Del | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | | | |Aud on|Audoff|AGnorm|AGswap|Qwerty|Colemk|Dvorak| | | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_ADJUST] = KEYMAP( \ + _______, RESET, _______, _______, _______, _______, _______, _______, _______, _______, _______, KC_DEL, \ + _______, _______, _______, AU_ON, AU_OFF, AG_NORM, AG_SWAP, QWERTY, COLEMAK, DVORAK, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +) + + +}; + +#ifdef AUDIO_ENABLE +float tone_qwerty[][2] = SONG(QWERTY_SOUND); +float tone_dvorak[][2] = SONG(DVORAK_SOUND); +float tone_colemak[][2] = SONG(COLEMAK_SOUND); +#endif + +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case QWERTY: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_qwerty, false, 0); + #endif + persistant_default_layer_set(1UL<<_QWERTY); + } + return false; + break; + case COLEMAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_colemak, false, 0); + #endif + persistant_default_layer_set(1UL<<_COLEMAK); + } + return false; + break; + case DVORAK: + if (record->event.pressed) { + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_dvorak, false, 0); + #endif + persistant_default_layer_set(1UL<<_DVORAK); + } + return false; + break; + case LOWER: + if (record->event.pressed) { + layer_on(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_LOWER); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case RAISE: + if (record->event.pressed) { + layer_on(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } else { + layer_off(_RAISE); + update_tri_layer(_LOWER, _RAISE, _ADJUST); + } + return false; + break; + case ADJUST: + if (record->event.pressed) { + layer_on(_ADJUST); + } else { + layer_off(_ADJUST); + } + return false; + break; + } + return true; +} \ No newline at end of file -- cgit v1.2.3 From 7a91cce869f7cda8a42bf071ba77ee6096772d20 Mon Sep 17 00:00:00 2001 From: dbroqua Date: Wed, 21 Sep 2016 08:02:51 +0200 Subject: - Updated backlight levels for KC60 --- keyboards/kc60/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/kc60/config.h b/keyboards/kc60/config.h index c4a9b9ff8..29695d0b9 100644 --- a/keyboards/kc60/config.h +++ b/keyboards/kc60/config.h @@ -62,7 +62,7 @@ along with this program. If not, see . //#define MATRIX_HAS_GHOST /* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 +#define BACKLIGHT_LEVELS 5 /* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ #define LOCKING_SUPPORT_ENABLE -- cgit v1.2.3 From 9d629719cb0da23a115ec811359ccd9b749cf8fa Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Wed, 21 Sep 2016 14:41:37 +0000 Subject: Filled Impossible Layout documentation --- keyboards/planck/keymaps/impossible/readme.md | 91 ++++++++++++++++++++++++++- 1 file changed, 90 insertions(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index de9680b49..af85d7603 100644 --- a/keyboards/planck/keymaps/impossible/readme.md +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -1,2 +1,91 @@ -# The Default Planck Layout +# The Impossible Layout +The Impossible Layout is named such because it manages to fit in both a numpad and an inverted-T arrow cluster into the same layer as the alpha keys. + +## Main layout + +The Impossible Layout places the middle column of the alphas onto where the punctuation keys were, moving he most used punctuation to be accessed by the thumbs. Because removing the middle columns fits with the Workman layout's philosopy, Workman is used as the basis for the layout. This means the layout should be very easy to learn for Workman users, and reasonable for Colemak users. Other space gains are made by combining keys that are only ever chorded with other non symbol keys (with function-layer alternatives where needed). + +### Alpha-numeric layer + +,-----------------------------------------------------------------------------------------------. +| Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +|Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +### Function layer + +,-----------------------------------------------------------------------------------------------. +| ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +|Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +## Qwerty + +The Qwerty layer, mostly intended for gaming use, makes use of the doubled chorded/non-symbolic keys to obtain use of the entire alpha-numeric typing area. + +### Qwerty layer + +,-----------------------------------------------------------------------------------------------. +|Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| Shift | A | S | D | F | G | H | J | K | L | ; | " | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +|Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +### Qwerty Fn Layer + +,-----------------------------------------------------------------------------------------------. +| Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +|Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +## Stenography + +The Steno/Plover layer moves the number row below the regular keys, providing a much more comfortable placement for the thumb keys. Using this layout will require a slightly different dictionary to account for different keys being adjacent to the number row. + +### Steno Layer + +,-----------------------------------------------------------------------------------------------. +| S | T | P | H | * | F | P | L | T | D | | | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| S | K | W | R | * | R | B | G | S | Z | | | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| # | # | # | # | | # | # | # | # | # | | | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| | | A | O | | E | U | | | | |Adj/Ent| +`-----------------------------------------------------------------------------------------------' + +## Adjustments and Options + +In order to switch between layouts and change other keyboard settings, an adjustment layer is accessible from the same position over any layout. + +### Adjustment Layer + +,-----------------------------------------------------------------------------------------------. +| | | | | | | | | Insert| PrtSc | Pause | RESET | +|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| +| | | | | | | | CapLk |Voice +| Audio |MIDIoff| | +|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| +| | | | | | | | ScrLk |Voice -| Music |MIDI on| | +|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| +| | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent| +`-----------------------------------------------------------------------------------------------' -- cgit v1.2.3 From 073a1f21bb4ccf8dc47ec3757e64db97d4011ab8 Mon Sep 17 00:00:00 2001 From: Stephen Christie Date: Wed, 21 Sep 2016 14:45:05 +0000 Subject: Corrected Impossible Layout readme tables --- keyboards/planck/keymaps/impossible/readme.md | 30 --------------------------- 1 file changed, 30 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index af85d7603..7b3c87b4e 100644 --- a/keyboards/planck/keymaps/impossible/readme.md +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -8,27 +8,17 @@ The Impossible Layout places the middle column of the alphas onto where the punc ### Alpha-numeric layer -,-----------------------------------------------------------------------------------------------. | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| |Alt/Tab|Gui/Esc| , |CTL/Bsp| Fn/Ent|SFT/SPC| . | Left | Down | Right | 0 |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ### Function layer -,-----------------------------------------------------------------------------------------------. | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| |Alt/Tab| Gui | ~ |CTL/Bsp| Fn/Ent|SFT/Spc| ; | Home | PgDn | End | F10 |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ## Qwerty @@ -36,27 +26,17 @@ The Qwerty layer, mostly intended for gaming use, makes use of the doubled chord ### Qwerty layer -,-----------------------------------------------------------------------------------------------. |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | Shift | A | S | D | F | G | H | J | K | L | ; | " | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| |Alt/Tab| Z | X | C | V | Fn/SPC| B | N | M | , | . |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ### Qwerty Fn Layer -,-----------------------------------------------------------------------------------------------. | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| |Alt/Tab| | | | | Fn/Spc| | | | | Menu |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ## Stenography @@ -64,15 +44,10 @@ The Steno/Plover layer moves the number row below the regular keys, providing a ### Steno Layer -,-----------------------------------------------------------------------------------------------. | S | T | P | H | * | F | P | L | T | D | | | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | S | K | W | R | * | R | B | G | S | Z | | | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | # | # | # | # | | # | # | # | # | # | | | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | | | A | O | | E | U | | | | |Adj/Ent| -`-----------------------------------------------------------------------------------------------' ## Adjustments and Options @@ -80,12 +55,7 @@ In order to switch between layouts and change other keyboard settings, an adjust ### Adjustment Layer -,-----------------------------------------------------------------------------------------------. | | | | | | | | | Insert| PrtSc | Pause | RESET | -|-------+-------+-------+-------+-------+---------------+-------+-------+-------+-------+-------| | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | -|-------+-------+-------+-------+-------+-------|-------+-------+-------+-------+-------+-------| | | | | | | | | ScrLk |Voice -| Music |MIDI on| | -|-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------+-------| | | | | | | | | Numlk |Workman| Qwerty| Plover|Adj/Ent| -`-----------------------------------------------------------------------------------------------' -- cgit v1.2.3 From 9e6a493172da4f36df6b35307a5796ee8cb2cbec Mon Sep 17 00:00:00 2001 From: UnderSampled Date: Wed, 21 Sep 2016 18:55:14 +0000 Subject: Fixed Impossible Layout readme tables (again) --- keyboards/planck/keymaps/impossible/readme.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/impossible/readme.md b/keyboards/planck/keymaps/impossible/readme.md index 7b3c87b4e..02c719197 100644 --- a/keyboards/planck/keymaps/impossible/readme.md +++ b/keyboards/planck/keymaps/impossible/readme.md @@ -8,6 +8,8 @@ The Impossible Layout places the middle column of the alphas onto where the punc ### Alpha-numeric layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | Q | D | R | W | B | F | U | P | J | 7 | 8 | 9 | | A | S | H | T | G | N | E | O | I | 4 | 5 | 6 | | Z | X | M | C | V | L | Y | K | Up | 1 | 2 | 3 | @@ -15,6 +17,8 @@ The Impossible Layout places the middle column of the alphas onto where the punc ### Function layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | ! | @ | # | $ | % | ^ | & | * | F12 | F7 | F8 | F9 | | Tab | [ | ] | - | Del | ' | ( | ) | F11 | F4 | F5 | F6 | | Menu | | | = | \ | / | | | PgUp | F1 | F2 | F3 | @@ -26,6 +30,8 @@ The Qwerty layer, mostly intended for gaming use, makes use of the doubled chord ### Qwerty layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| |Gui/Esc| 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Bksp | | Ctrl | Q | W | E | R | T | Y | U | I | O | P | / | | Shift | A | S | D | F | G | H | J | K | L | ; | " | @@ -33,6 +39,8 @@ The Qwerty layer, mostly intended for gaming use, makes use of the doubled chord ### Qwerty Fn Layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | Gui | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | | Ctrl | ~ | [ | PgUp | ] | | | - | Up | = | | F12 | | Shift | Tab | Home | PgDn | End | Del | | Left | Down | Right | | | @@ -44,6 +52,8 @@ The Steno/Plover layer moves the number row below the regular keys, providing a ### Steno Layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | S | T | P | H | * | F | P | L | T | D | | | | S | K | W | R | * | R | B | G | S | Z | | | | # | # | # | # | | # | # | # | # | # | | | @@ -55,6 +65,8 @@ In order to switch between layouts and change other keyboard settings, an adjust ### Adjustment Layer +| | | | | | | | | | | | | +|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:|:-----:| | | | | | | | | | Insert| PrtSc | Pause | RESET | | | | | | | | | CapLk |Voice +| Audio |MIDIoff| | | | | | | | | | ScrLk |Voice -| Music |MIDI on| | -- cgit v1.2.3 From 6e5142ca3ee7c45a0776d84ba667c5504dc85cd8 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Thu, 22 Sep 2016 22:05:12 -0400 Subject: Adds EPRM reset key --- keyboards/ergodox/keymaps/default/keymap.c | 12 ++++++++++-- keyboards/ergodox/keymaps/default/readme.md | 2 ++ 2 files changed, 12 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/default/keymap.c b/keyboards/ergodox/keymaps/default/keymap.c index 1b80cb3a2..2f399bd18 100644 --- a/keyboards/ergodox/keymaps/default/keymap.c +++ b/keyboards/ergodox/keymaps/default/keymap.c @@ -7,6 +7,8 @@ #define SYMB 1 // symbols #define MDIA 2 // media keys +#define EPRM M(1) // Macro 1: Reset EEPROM + const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* Keymap 0: Basic layer * @@ -62,7 +64,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * | | | | | | | | . | 0 | = | | + * | EPRM | | | | | | | . | 0 | = | | * `----------------------------------' `----------------------------------' * ,-------------. ,-------------. * | | | | | | @@ -79,7 +81,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,KC_TRNS, - KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + EPRM,KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, KC_TRNS,KC_TRNS, KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS, @@ -149,6 +151,11 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) SEND_STRING (QMK_KEYBOARD "/" QMK_KEYMAP " @ " QMK_VERSION); } break; + case 1: + if (record->event.pressed) { // For resetting EEPROM + eeconfig_init(); + } + break; } return MACRO_NONE; }; @@ -158,6 +165,7 @@ void matrix_init_user(void) { }; + // Runs constantly in the background, in a loop. void matrix_scan_user(void) { diff --git a/keyboards/ergodox/keymaps/default/readme.md b/keyboards/ergodox/keymaps/default/readme.md index 8f6dba45e..f68138ed6 100644 --- a/keyboards/ergodox/keymaps/default/readme.md +++ b/keyboards/ergodox/keymaps/default/readme.md @@ -2,6 +2,8 @@ ## Changelog +* Sep 22, 2016: + * Created a new key in layer 1 (bottom-corner key) that resets the EEPROM. * Feb 2, 2016 (V1.1): * Made the right-hand quote key double as Cmd/Win on hold. So you get ' when you tap it, " when you tap it with Shift, and Cmd or Win when you hold it. You can then use it as a modifier, or just press and hold it for a moment (and then let go) to send a single Cmd or Win keystroke (handy for opening the Start menu on Windows). -- cgit v1.2.3 From fad54872667d493ccd95e2171addf6c6b22343b7 Mon Sep 17 00:00:00 2001 From: TerryMathews Date: Thu, 22 Sep 2016 23:33:22 -0400 Subject: Initial support for TADA68 --- keyboards/tada68/Makefile | 3 + keyboards/tada68/config.h | 94 ++++++++++++++++++++++++++++ keyboards/tada68/keymaps/default/Makefile | 21 +++++++ keyboards/tada68/keymaps/default/keymap.c | 98 ++++++++++++++++++++++++++++++ keyboards/tada68/keymaps/default/readme.md | 1 + keyboards/tada68/readme.md | 4 ++ keyboards/tada68/rules.mk | 66 ++++++++++++++++++++ keyboards/tada68/tada68.c | 30 +++++++++ keyboards/tada68/tada68.h | 43 +++++++++++++ 9 files changed, 360 insertions(+) create mode 100644 keyboards/tada68/Makefile create mode 100644 keyboards/tada68/config.h create mode 100644 keyboards/tada68/keymaps/default/Makefile create mode 100644 keyboards/tada68/keymaps/default/keymap.c create mode 100644 keyboards/tada68/keymaps/default/readme.md create mode 100644 keyboards/tada68/readme.md create mode 100644 keyboards/tada68/rules.mk create mode 100644 keyboards/tada68/tada68.c create mode 100644 keyboards/tada68/tada68.h (limited to 'keyboards') diff --git a/keyboards/tada68/Makefile b/keyboards/tada68/Makefile new file mode 100644 index 000000000..4e2a6f00f --- /dev/null +++ b/keyboards/tada68/Makefile @@ -0,0 +1,3 @@ +ifndef MAKEFILE_INCLUDED + include ../../Makefile +endif \ No newline at end of file diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h new file mode 100644 index 000000000..5c2b29062 --- /dev/null +++ b/keyboards/tada68/config.h @@ -0,0 +1,94 @@ +/* +Copyright 2012 Jun Wako + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x6060 +#define DEVICE_VER 0x0003 +#define MANUFACTURER TADA +#define PRODUCT TADA68 +#define DESCRIPTION QMK keyboard firmware for TADA68 with WS2812 support + +/* key matrix size */ +#define MATRIX_ROWS 5 +#define MATRIX_COLS 15 + +// ROWS: Top to bottom, COLS: Left to right + +#define MATRIX_ROW_PINS {D0,D1,F6,F7,D5} +#define MATRIX_COL_PINS {F0,F1,E6,C7,C6,B7,D4,B1,B0,B5,B4,D7,D6,B3,F4} +#define UNUSED_PINS + +#define BACKLIGHT_PIN B6 + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCING_DELAY 5 + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LSHIFT) | MOD_BIT(KC_RSHIFT)) \ +) + +/* Backlight configuration + */ +#define BACKLIGHT_LEVELS 4 + +/* Underlight configuration + */ + +#define RGB_DI_PIN F5 +#define RGBLIGHT_TIMER +#define RGBLED_NUM 4 // Number of LEDs +#define RGBLIGHT_HUE_STEP 10 +#define RGBLIGHT_SAT_STEP 17 +#define RGBLIGHT_VAL_STEP 17 + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +//#define NO_DEBUG + +/* disable print */ +//#define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION + +#endif diff --git a/keyboards/tada68/keymaps/default/Makefile b/keyboards/tada68/keymaps/default/Makefile new file mode 100644 index 000000000..2a7ff2779 --- /dev/null +++ b/keyboards/tada68/keymaps/default/Makefile @@ -0,0 +1,21 @@ +# Build Options +# change to "no" to disable the options, or define them in the Makefile in +# the appropriate keymap folder that will get included automatically +# +BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = no # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = no # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend + +ifndef QUANTUM_DIR + include ../../../../Makefile +endif diff --git a/keyboards/tada68/keymaps/default/keymap.c b/keyboards/tada68/keymaps/default/keymap.c new file mode 100644 index 000000000..da57c0343 --- /dev/null +++ b/keyboards/tada68/keymaps/default/keymap.c @@ -0,0 +1,98 @@ +#include "tada68.h" + + +// Used for SHIFT_ESC +#define MODS_CTRL_MASK (MOD_BIT(KC_LSHIFT)|MOD_BIT(KC_RSHIFT)) + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +// The underscores don't mean anything - you can have a layer called STUFF or any other name. +// Layer names don't all need to be of the same length, obviously, and you can also skip them +// entirely and just use numbers. +#define _BL 0 +#define _FL 1 + +#define _______ KC_TRNS + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* Keymap _BL: (Base Layer) Default Layer + * ,----------------------------------------------------------------. + * |Esc | 1| 2| 3| 4| 5| 6| 7| 8| 9| 0| -| =|Backsp |~ ` | + * |----------------------------------------------------------------| + * |Tab | Q| W| E| R| T| Y| U| I| O| P| [| ]| \ |Del | + * |----------------------------------------------------------------| + * |CAPS | A| S| D| F| G| H| J| K| L| ;| '|Return |PgUp| + * |----------------------------------------------------------------| + * |Shift | Z| X| C| V| B| N| M| ,| .| /|Shift | Up|PgDn| + * |----------------------------------------------------------------| + * |Ctrl|Win |Alt | Space |Alt| FN|Ctrl|Lef|Dow|Rig | + * `----------------------------------------------------------------' + */ +[_BL] = KEYMAP_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_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_BSLS,KC_DEL, \ + 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_PGUP, \ + 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_PGDN, \ + KC_LCTL, KC_LGUI,KC_LALT, KC_SPC, KC_RALT,MO(_FL),KC_RCTRL, KC_LEFT,KC_DOWN,KC_RGHT), + + /* Keymap _FL: Function Layer + * ,----------------------------------------------------------------. + * | | | | | | | | | | | | | | RESET| | + * |----------------------------------------------------------------| + * | | | | | | | | | | | |BL-|BL+|BL | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | | | | + * |----------------------------------------------------------------| + * | | F1|F2 | F3|F4 | F5| F6| F7| F8| | | | | | + * |----------------------------------------------------------------| + * | | | | | | | | | | | + * `----------------------------------------------------------------' + */ +[_FL] = KEYMAP_ANSI( + #ifdef RGBLIGHT_ENABLE + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______,RGB_TOG,RGB_MOD,RGB_HUI,RGB_HUD,RGB_SAI,RGB_SAD,RGB_VAI,RGB_VAD,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), + #else + _______, _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,RESET,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, BL_DEC,BL_INC, BL_TOGG,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, _______,_______, \ + _______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______,_______, \ + _______,_______,_______, _______, _______,_______,_______,_______,_______, _______), + #endif +}; + +/*enum function_id { + //SHIFT_ESC, +}; + +const uint16_t PROGMEM fn_actions[] = { + //[0] = ACTION_FUNCTION(SHIFT_ESC), +}; + +void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) { + static uint8_t shift_esc_shift_mask; + switch (id) { + case SHIFT_ESC: + shift_esc_shift_mask = get_mods()&MODS_CTRL_MASK; + if (record->event.pressed) { + if (shift_esc_shift_mask) { + add_key(KC_GRV); + send_keyboard_report(); + } else { + add_key(KC_ESC); + send_keyboard_report(); + } + } else { + if (shift_esc_shift_mask) { + del_key(KC_GRV); + send_keyboard_report(); + } else { + del_key(KC_ESC); + send_keyboard_report(); + } + } + break; + } +}*/ diff --git a/keyboards/tada68/keymaps/default/readme.md b/keyboards/tada68/keymaps/default/readme.md new file mode 100644 index 000000000..36760d6b9 --- /dev/null +++ b/keyboards/tada68/keymaps/default/readme.md @@ -0,0 +1 @@ +# default TADA68 layout diff --git a/keyboards/tada68/readme.md b/keyboards/tada68/readme.md new file mode 100644 index 000000000..552fdea52 --- /dev/null +++ b/keyboards/tada68/readme.md @@ -0,0 +1,4 @@ +TADA68 keyboard firmware +====================== + +TODO: to be updated. diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk new file mode 100644 index 000000000..1102584d8 --- /dev/null +++ b/keyboards/tada68/rules.mk @@ -0,0 +1,66 @@ + +# MCU name +#MCU = at90usb1287 +MCU = atmega32u4 + +# Processor frequency. +# This will define a symbol, F_CPU, in all source code files equal to the +# processor frequency in Hz. You can then use this symbol in your source code to +# calculate timings. Do NOT tack on a 'UL' at the end, this will be done +# automatically to create a 32-bit value in your source code. +# +# This will be an integer division of F_USB below, as it is sourced by +# F_USB after it has run through any CPU prescalers. Note that this value +# does not *change* the processor frequency - it should merely be updated to +# reflect the processor speed set externally so that the code can use accurate +# software delays. +F_CPU = 16000000 + + +# +# LUFA specific +# +# Target architecture (see library "Board Types" documentation). +ARCH = AVR8 + +# Input clock frequency. +# This will define a symbol, F_USB, in all source code files equal to the +# input clock frequency (before any prescaling is performed) in Hz. This value may +# differ from F_CPU if prescaling is used on the latter, and is required as the +# raw input clock is fed directly to the PLL sections of the AVR for high speed +# clock generation for the USB and other AVR subsections. Do NOT tack on a 'UL' +# at the end, this will be done automatically to create a 32-bit value in your +# source code. +# +# If no clock division is performed on the input clock inside the AVR (via the +# CPU clock adjust registers or the clock division fuses), this will be equal to F_CPU. +F_USB = $(F_CPU) + +# Interrupt driven control endpoint task(+60) +OPT_DEFS += -DINTERRUPT_CONTROL_ENDPOINT + + +# Boot Section Size in *bytes* +# Teensy halfKay 512 +# Teensy++ halfKay 1024 +# Atmel DFU loader 4096 +# LUFA bootloader 4096 +# USBaspLoader 2048 +OPT_DEFS += -DBOOTLOADER_SIZE=4096 + + +# Build Options +# comment out to disable the options. +# +BOOTMAGIC_ENABLE ?= no # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE ?= no # Mouse keys(+4700) +EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) +CONSOLE_ENABLE ?= yes # Console for debug(+400) +COMMAND_ENABLE ?= yes # Commands for debug and configuration +NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) +MIDI_ENABLE ?= no # MIDI controls +AUDIO_ENABLE ?= no +UNICODE_ENABLE ?= no # Unicode +BLUETOOTH_ENABLE ?= no # Enable Bluetooth with the Adafruit EZ-Key HID diff --git a/keyboards/tada68/tada68.c b/keyboards/tada68/tada68.c new file mode 100644 index 000000000..24f89048c --- /dev/null +++ b/keyboards/tada68/tada68.c @@ -0,0 +1,30 @@ +#include "tada68.h" +#include "led.h" + +void matrix_init_kb(void) { + // put your keyboard start-up code here + // runs once when the firmware starts up + matrix_init_user(); + led_init_ports(); +}; + +void matrix_scan_kb(void) { + // put your looping keyboard code here + // runs every cycle (a lot) + matrix_scan_user(); +}; + +void led_init_ports(void) { + // * Set our LED pins as output + DDRB |= (1<<2); +} + +void led_set_kb(uint8_t usb_led) { + if (usb_led & (1< Date: Fri, 23 Sep 2016 14:20:05 -0400 Subject: Disable RGB led support until a suitable pin is located --- keyboards/tada68/config.h | 9 ++++++--- keyboards/tada68/rules.mk | 2 +- 2 files changed, 7 insertions(+), 4 deletions(-) (limited to 'keyboards') diff --git a/keyboards/tada68/config.h b/keyboards/tada68/config.h index 5c2b29062..5d8757936 100644 --- a/keyboards/tada68/config.h +++ b/keyboards/tada68/config.h @@ -66,12 +66,15 @@ along with this program. If not, see . /* Underlight configuration */ -#define RGB_DI_PIN F5 +/*#define RGB_DI_PIN E2 #define RGBLIGHT_TIMER -#define RGBLED_NUM 4 // Number of LEDs +#define RGBLED_NUM 2 // Number of LEDs #define RGBLIGHT_HUE_STEP 10 #define RGBLIGHT_SAT_STEP 17 -#define RGBLIGHT_VAL_STEP 17 +#define RGBLIGHT_VAL_STEP 17*/ +//Disabled while I figure out a suitable pin for RGB support. +//I've tried F5, D2, D3, and E2 but it's possible the end of my +//strand is bad. New LEDs on order. /* * Feature disable options diff --git a/keyboards/tada68/rules.mk b/keyboards/tada68/rules.mk index 1102584d8..d8ec42365 100644 --- a/keyboards/tada68/rules.mk +++ b/keyboards/tada68/rules.mk @@ -58,7 +58,7 @@ EXTRAKEY_ENABLE ?= yes # Audio control and System control(+450) CONSOLE_ENABLE ?= yes # Console for debug(+400) COMMAND_ENABLE ?= yes # Commands for debug and configuration NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -RGBLIGHT_ENABLE ?= yes # Enable keyboard underlight functionality (+4870) +RGBLIGHT_ENABLE ?= no # Enable keyboard underlight functionality (+4870) BACKLIGHT_ENABLE ?= yes # Enable keyboard backlight functionality (+1150) MIDI_ENABLE ?= no # MIDI controls AUDIO_ENABLE ?= no -- cgit v1.2.3 From 1a96b2cdc8895bd9f219e6c793aeee6ff7ce81f6 Mon Sep 17 00:00:00 2001 From: Erez Zukerman Date: Fri, 23 Sep 2016 20:57:36 -0400 Subject: Disables sleep LED by default --- keyboards/ergodox/ez/rules.mk | 2 ++ 1 file changed, 2 insertions(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/ez/rules.mk b/keyboards/ergodox/ez/rules.mk index 37e554b30..a9715beb8 100644 --- a/keyboards/ergodox/ez/rules.mk +++ b/keyboards/ergodox/ez/rules.mk @@ -71,6 +71,8 @@ OPT_DEFS += -DBOOTLOADER_SIZE=512 # comment out to disable the options. # +SLEEP_LED_ENABLE = no + ifndef QUANTUM_DIR include ../../../Makefile endif -- cgit v1.2.3 From f0441f08b87986f49479f1503b11a3d3f899d58e Mon Sep 17 00:00:00 2001 From: dbroqua Date: Sun, 25 Sep 2016 16:32:06 +0200 Subject: - Added dbroqua layout for HHKB keyboard --- keyboards/hhkb/keymaps/dbroqua/keymap.c | 70 ++++++++++++++++++++++++++++++++ keyboards/hhkb/keymaps/dbroqua/readme.md | 9 ++++ 2 files changed, 79 insertions(+) create mode 100644 keyboards/hhkb/keymaps/dbroqua/keymap.c create mode 100644 keyboards/hhkb/keymaps/dbroqua/readme.md (limited to 'keyboards') diff --git a/keyboards/hhkb/keymaps/dbroqua/keymap.c b/keyboards/hhkb/keymaps/dbroqua/keymap.c new file mode 100644 index 000000000..ef43aae28 --- /dev/null +++ b/keyboards/hhkb/keymaps/dbroqua/keymap.c @@ -0,0 +1,70 @@ +/* + * dbroqua HHKB Layout + */ +#include "hhkb.h" + +#define BASE 0 +#define FN 1 + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { + /* BASE Level: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | \ | ` | + * |-----------------------------------------------------------------------------------------+ + * | Tab | Q | W | E | R | T | Y | U | I | O | P | [ | ] | Bksp | + * |-----------------------------------------------------------------------------------------+ + * | Ctrl | A | S | D | F | G | H | J | K | L | ; | ' | Enter | + * |-----------------------------------------------------------------------------------------+ + * | Shift | Z | X | C | V | B | N | M | , | . | / | Left |Right| + * +-----------------------------------------------------------------------------------------+ + * | Gui | Alt | Space | AltGr | fn | + * `----------------------------------------------------------------´ + */ + [BASE] = 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, 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_LEFT, KC_RGHT, \ + KC_LGUI, KC_LALT, /* */ KC_SPC, KC_RALT, MO(FN) + ), + + /* BASE Level: Default Layer + * ,-----------------------------------------------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F0 | F11 | F12 | Ins | Del| + * |-----------------------------------------------------------------------------------------+ + * | Caps | | | | | | | | | | | Up | | | + * |-----------------------------------------------------------------------------------------+ + * | | Vol-| Vol+| Mute| | | |PrtSc| Home| PgUp| Left |Right| | + * |-----------------------------------------------------------------------------------------+ + * | | Prev| Play| Next| | | | | End |PgDwn| Down| Up | Down| + * +-----------------------------------------------------------------------------------------+ + * | | | | | | + * `----------------------------------------------------------------´ + */ + [FN] = KEYMAP( + 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_INS, KC_DEL, \ + KC_CAPS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_UP, KC_TRNS, KC_TRNS, \ + KC_TRNS, KC_VOLD, KC_VOLU, KC_MUTE, KC_TRNS, KC_TRNS, KC_TRNS, KC_PSCR, KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, KC_TRNS, \ + KC_TRNS, KC_MPRV, KC_MPLY, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_END, KC_PGDN, KC_DOWN, KC_UP, KC_DOWN, \ + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS + ) +}; + +const uint16_t PROGMEM fn_actions[] = { + +}; + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; diff --git a/keyboards/hhkb/keymaps/dbroqua/readme.md b/keyboards/hhkb/keymaps/dbroqua/readme.md new file mode 100644 index 000000000..0afebc84c --- /dev/null +++ b/keyboards/hhkb/keymaps/dbroqua/readme.md @@ -0,0 +1,9 @@ +# Dbroqua Layout + +* Online keyboard layout editor: http://www.keyboard-layout-editor.com/#/gists/78eaf35e80bb714eea80cb4049dedb01 + +# Programming Instructions: +Enter into programming mode and run the following command. +``` +$ sudo KEYMAP=dbroqua make dfu +``` \ No newline at end of file -- cgit v1.2.3 From 77099c777aa34e07548f64928d5d233c4cf35a5e Mon Sep 17 00:00:00 2001 From: Jeremy Cowgar Date: Sun, 25 Sep 2016 12:23:59 -0400 Subject: =?UTF-8?q?Added=20Jeremy=E2=80=99s=20Atreus=20Layout?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- keyboards/atreus/keymaps/jeremy/keymap.c | 66 +++++++++++++++++++++++++++++++ keyboards/atreus/keymaps/jeremy/readme.md | 45 +++++++++++++++++++++ 2 files changed, 111 insertions(+) create mode 100644 keyboards/atreus/keymaps/jeremy/keymap.c create mode 100644 keyboards/atreus/keymaps/jeremy/readme.md (limited to 'keyboards') diff --git a/keyboards/atreus/keymaps/jeremy/keymap.c b/keyboards/atreus/keymaps/jeremy/keymap.c new file mode 100644 index 000000000..90ec6f904 --- /dev/null +++ b/keyboards/atreus/keymaps/jeremy/keymap.c @@ -0,0 +1,66 @@ +// This is the personal keymap of Jeremy Cowgar (@jcowgar). It is written for the programmer. + +#include "atreus.h" +#include "action_layer.h" +#include "keymap_colemak.h" + +#define PREVENT_STUCK_MODIFIERS + +// Each layer gets a name for readability, which is then used in the keymap matrix below. +#define ALPH 0 +#define NUMS 1 +#define CURS 2 +#define SYMB 3 +#define FKEY 4 + +// Some handy macros to keep the keymaps clean and easier to maintain +#define KM_SAVE LGUI(CM_S) +#define KM_CLSE LGUI(CM_W) +#define KM_OPEN LGUI(CM_O) + +#define KM_COPY LGUI(KC_C) +#define KM_CUT LGUI(KC_X) +#define KM_PAST LGUI(KC_V) +#define KM_UNDO LGUI(KC_Z) +#define KM_REDO LGUI(LSFT(KC_Z)) + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +[ALPH] = { + {KC_Q, KC_W, KC_E, KC_R, KC_T, KC_TRNS, KC_Y, KC_U, KC_I, KC_O, KC_P}, + {KC_A, LT(NUMS, KC_S), LT(FKEY, KC_D), KC_F, KC_G, KC_TRNS, KC_H, KC_J, LT(CURS, KC_K), LT(SYMB, KC_L), KC_SCLN}, + {KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LALT, KC_N, KC_M, KC_COMM, KC_DOT, KC_SLSH}, + {KC_LCTL, KC_ESC, KC_NO, KC_LSFT, KC_SPC, KC_LGUI, KC_ENT, KC_RSFT, KC_NO, KC_ESC, KC_RCTL} +}, +[NUMS] = { + {KC_TRNS, KC_TRNS, KC_TRNS, KC_ASTR, KC_SLSH, KC_TRNS, KC_TRNS, KC_7, KC_8, KC_9, KC_SLSH}, + {KC_TRNS, KC_TRNS, KC_EQL, KC_PLUS, KC_MINS, KC_TRNS, KC_LPRN, KC_4, KC_5, KC_6, KC_ASTR}, + {KC_TRNS, KC_TRNS, KC_DOT, KC_COMM, CM_SCLN, KC_TRNS, KC_RPRN, KC_1, KC_2, KC_3, KC_MINS}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_0, KC_DOT, KC_EQL, KC_PLUS} +}, +[CURS] = { + {KC_TRNS, KC_BSPC, KC_UP, KC_DELT, KC_PGUP, KC_TRNS, KC_TRNS, KM_SAVE, KC_TRNS, KM_OPEN, KC_TRNS}, + {KC_TRNS, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGDN, KC_TRNS, KM_UNDO, KC_LALT, KC_TRNS, KC_LGUI, KC_TRNS}, + {KC_TRNS, KC_VOLD, KC_MUTE, KC_VOLU, KC_MPLY, KM_COPY, KM_REDO, KM_CLSE, KC_TRNS, KC_TRNS, KC_TRNS}, + {KC_TRNS, KC_TRNS, RESET, KC_TRNS, KC_TAB, KM_CUT, KM_PAST, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +[SYMB] = { + {KC_BSLS, KC_EXLM, KC_LABK, KC_RABK, CM_COLN, KC_TRNS, KC_UNDS, KC_DLR, KC_QUES, KC_TRNS, KC_PERC}, + {KC_AT, KC_AMPR, KC_LPRN, KC_RPRN, CM_SCLN, KC_TRNS, KC_COMM, KC_DOT, KC_QUOT, KC_TRNS, KC_TILD}, + {KC_HASH, KC_PIPE, KC_LCBR, KC_RCBR, KC_SLSH, KC_TRNS, KC_TRNS, KC_GRV, KC_DQT, KC_TRNS, KC_CIRC}, + {KC_TRNS, KC_TRNS, KC_LBRC, KC_RBRC, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}, +[FKEY] = { + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F9, KC_F10, KC_F11, KC_F12}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F5, KC_F6, KC_F7, KC_F8}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4}, + {KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS} +}}; + +const uint16_t PROGMEM fn_actions[] = {}; + +const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) +{ + switch(id) {} + + return MACRO_NONE; +}; diff --git a/keyboards/atreus/keymaps/jeremy/readme.md b/keyboards/atreus/keymaps/jeremy/readme.md new file mode 100644 index 000000000..df0179a8e --- /dev/null +++ b/keyboards/atreus/keymaps/jeremy/readme.md @@ -0,0 +1,45 @@ +Jeremy's Atreus Key Mapping +=========================== + +I am a programmer by trade that suffers from the beginning stages of RSI. As a programmer I use letters, symbols and cursor navigation most often. To prevent strange finger gymnastics, I wrote a script to rank which non-letter characters occurred in my primary source projects most often and then placed these characters in the easiest to reach locations, for me. I made heavy use of momentary layer toggling. + +My layout is also geared toward a software based Colemak mapping. I would like it to be hardware, but I use my Laptop on the go frequently and thus my laptop keyboard. I have moved the keycaps to reflect the Colemak layout. My laptop is a MacBook Pro (2015). + +## Main Layers + +1. [Letters](http://www.keyboard-layout-editor.com/#/gists/6861cb9df09ce78efaddf8aa7471e3ac) +2. [Symbols](http://www.keyboard-layout-editor.com/#/gists/8956a18b508a78e93b9c38ec3fcccaa5) +3. [Navigation](http://www.keyboard-layout-editor.com/#/gists/6ed492b714a7f54eb1c5de09b87fd8c4) +4. [Numbers](http://www.keyboard-layout-editor.com/#/gists/399ceb5624e8388e48a3a5eacac8e973) +5. [Function Keys](http://www.keyboard-layout-editor.com/#/gists/7fd7dc24c7048316f3724b1893c64e89) + +## Notes + +### General + +Some characters can be accessed multiple ways. This was done because you may be in a given layer, such as numbers, where when doing math, you may need quick access to the parentheses characters for grouping. This prevents some layer switching. + +I own an ErgoDox and plan on porting this as a base layer, then using the extra keys the ErgoDox provides accordingly. My goal, though, is to be fully functional on this base setup and build everything into muscle memory. + +### Symbol Layer + +1. I placed characters that deal with an if statement close together, such as !, & and |. +2. All matching brace/bracket characters are together as well. + +### Number Layer + +1. Everything I did was a compromise when trying to mimic a ten-key. I did the best I could. +2. Operators are duplicated on the right and left. I do not find it comfortable to use my pinky much, so I tend to use my left hand for +, -, * and / but those were also placed on the right hand to mimic the ten-key. +3. Parentheses were added for typing on the calculator. + +### Cursor Layer + +1. It includes basic audio controls because they didn't really fit anywhere else +2. It contains basic file manipulation. I'm not sure that was a good idea. I do save all the time, but Cmd+S isn't exactly hard. +3. It contains the backspace and delete keys right on top of the left and right arrows. +4. Cmd and Opt keys are duplicated. This makes for very easy navigation, for example on a Mac, Opt+Left/Right moves word by word. It also backspaces or deletes word by word. + +### Function Layer + +1. Almost all other layers I saw grouped the F keys into a bunch of three. This only gives nine function keys in order if you attempt to stay as close to the home row as possible. I went with a group of four, which gives all twelve function keys to the right hand, one row below and above the home row. +2. I duplicated the Command and Option keys the same as on the cursor layer. This makes it dead easy to hit modified function keys such as Cmd+Opt+F5. It's also easy to toss in a Shift modifier in there with the right thumb since the bottom row is preserved. -- cgit v1.2.3 From c40ad11615b6cb1d08ec2d3b284d59df00c57c1f Mon Sep 17 00:00:00 2001 From: Dustin Date: Sun, 25 Sep 2016 19:04:20 -0700 Subject: Fix lets_split.c so that audio can be disabled Matching the use of `#ifdef AUDIO_ENABLE` used in `matrix_init_kb()` in order to compile firmware for the Let's Split keyboard without audio enabled. --- keyboards/lets_split/lets_split.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/lets_split/lets_split.c b/keyboards/lets_split/lets_split.c index 574c116a7..c505d3a6e 100644 --- a/keyboards/lets_split/lets_split.c +++ b/keyboards/lets_split/lets_split.c @@ -24,7 +24,9 @@ void matrix_init_kb(void) { }; void shutdown_user(void) { - PLAY_NOTE_ARRAY(tone_goodbye, false, 0); - _delay_ms(150); - stop_all_notes(); + #ifdef AUDIO_ENABLE + PLAY_NOTE_ARRAY(tone_goodbye, false, 0); + _delay_ms(150); + stop_all_notes(); + #endif } -- cgit v1.2.3 From 04c0a1c3e2d9f81cd44dc7548f6135ca175edbe1 Mon Sep 17 00:00:00 2001 From: chwilk Date: Mon, 26 Sep 2016 01:04:33 -0500 Subject: Added ONEHAND_ENABLE to allow SWAP HANDS actions --- keyboards/ergodox/rules.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'keyboards') diff --git a/keyboards/ergodox/rules.mk b/keyboards/ergodox/rules.mk index ac63d4eff..add64ec76 100644 --- a/keyboards/ergodox/rules.mk +++ b/keyboards/ergodox/rules.mk @@ -26,3 +26,4 @@ SLEEP_LED_ENABLE ?= yes # Breathing sleep LED during USB suspend NKRO_ENABLE ?= yes # USB Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work MIDI_ENABLE ?= no # MIDI controls UNICODE_ENABLE ?= yes # Unicode +ONEHAND_ENABLE ?= yes # Allow swapping hands of keyboard -- cgit v1.2.3 From 90fd0810dbd551b32e4be46f108b4974890299b9 Mon Sep 17 00:00:00 2001 From: chwilk Date: Mon, 26 Sep 2016 01:05:06 -0500 Subject: Updated kastyle keymap, including swap hands feature --- keyboards/ergodox/keymaps/kastyle/keymap.c | 98 +++++++++++++++++++----------- 1 file changed, 62 insertions(+), 36 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/kastyle/keymap.c b/keyboards/ergodox/keymaps/kastyle/keymap.c index a92085003..4e3794a96 100644 --- a/keyboards/ergodox/keymaps/kastyle/keymap.c +++ b/keyboards/ergodox/keymaps/kastyle/keymap.c @@ -1,3 +1,6 @@ +/* Setup to approximate a Kinesis Advantage with an eye to use in a + * Mac/OSX environment + * This version adds a hand swap feature to flip the keyboard */ #include "ergodox.h" #include "debug.h" #include "action_layer.h" @@ -18,10 +21,10 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |--------+------+------+------+------+------| Hyper| | Meh |------+------+------+------+------+--------| * | LShift |Z/Ctrl| X | C | V | B | | | | N | M | , | . |//Ctrl| RShift | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' - * |Grv/L1| '" |AltShf| Left | Right| | Up | Down | [ | ] | ~L1 | + * |Grv/L1| \ |AltShf| Left | Right| | Up | Down | [ | ] |Grv/L1| * `----------------------------------' `----------------------------------' * ,---------------. ,---------------. - * |Ctrl/Esc| Alt | | Alt |Ctrl/Esc| + * | LGUI |Al/Esc| |Al/Esc| RGUI | * ,------|--------|------| |------+--------+------. * | | | Home | | PgUp | | | * |Backsp| Del |------| |------| Enter | Space| @@ -31,33 +34,34 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // If it accepts an argument (i.e, is a function), it doesn't need KC_. // Otherwise, it needs KC_* [BASE] = KEYMAP( // layer 0 : default - // left hand - KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, - KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), - KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, - KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), - LT(SYMB,KC_GRV),KC_QUOT, LALT(KC_LSFT), KC_LEFT,KC_RGHT, - CTL_T(KC_ESC), ALT_T(KC_APP), - KC_HOME, - KC_BSPC,KC_DEL,KC_END, - // right hand - KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, - TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, - KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN),KC_QUOT, - MEH_T(KC_NO),KC_N, KC_M, KC_COMM,KC_DOT, CTL_T(KC_SLSH), KC_RSFT, - KC_UP, KC_DOWN,KC_LBRC,KC_RBRC, KC_FN1, - KC_LALT, CTL_T(KC_ESC), - KC_PGUP, - KC_PGDN,KC_ENT, KC_SPC - ), + // left hand + KC_EQL, KC_1, KC_2, KC_3, KC_4, KC_5, KC_LGUI, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, TG(1), + KC_LCTL, KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSFT, CTL_T(KC_Z), KC_X, KC_C, KC_V, KC_B, ALL_T(KC_NO), + KC_FN1, KC_BSLS, LALT(KC_LSFT), KC_LEFT, KC_RGHT, + KC_LGUI, ALT_T(KC_ESC), + KC_HOME, + KC_BSPC, KC_DEL, KC_END, + // right hand + KC_APP, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, + TG(1), KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLS, + KC_H, KC_J, KC_K, KC_L, LT(MDIA, KC_SCLN), KC_QUOT, + MEH_T(KC_NO), KC_N, KC_M, KC_COMM, KC_DOT, CTL_T(KC_SLSH), KC_RSFT, + KC_UP, KC_DOWN, KC_LBRC, KC_RBRC, KC_FN1, + ALT_T(KC_ESC), KC_RGUI, + KC_PGUP, + KC_PGDN, KC_ENT, KC_SPC +), + /* Keymap 1: Symbol Layer * * ,--------------------------------------------------. ,--------------------------------------------------. - * | | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | + * | PrScr | F1 | F2 | F3 | F4 | F5 | | | | F6 | F7 | F8 | F9 | F10 | F11 | * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| - * | | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | + * | ScrLk | ! | @ | { | } | | | | | | Up | 7 | 8 | 9 | * | F12 | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| - * | | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | + * | Pause | # | $ | ( | ) | ` |------| |------| Down | 4 | 5 | 6 | + | | * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| * | | % | ^ | [ | ] | ~ | | | | & | 1 | 2 | 3 | \ | | * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' @@ -74,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { // SYMBOLS [SYMB] = KEYMAP( // left hand - KC_TRNS,KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, - KC_TRNS,KC_EXLM,KC_AT, KC_LCBR,KC_RCBR,KC_PIPE,KC_TRNS, - KC_TRNS,KC_HASH,KC_DLR, KC_LPRN,KC_RPRN,KC_GRV, - KC_TRNS,KC_PERC,KC_CIRC,KC_LBRC,KC_RBRC,KC_TILD,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_PSCR, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_TRNS, + KC_SLCK, KC_EXLM, KC_AT, KC_LCBR, KC_RCBR, KC_PIPE, KC_TRNS, + KC_PAUS, KC_HASH, KC_DLR, KC_LPRN, KC_RPRN, KC_GRV, + KC_TRNS, KC_PERC, KC_CIRC, KC_LBRC, KC_RBRC, KC_TILD, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, // right hand KC_TRNS, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_TRNS, KC_UP, KC_7, KC_8, KC_9, KC_ASTR, KC_F12, @@ -92,6 +96,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS ), + /* Keymap 2: Media and mouse keys * * ,--------------------------------------------------. ,--------------------------------------------------. @@ -135,10 +140,6 @@ KEYMAP( ), }; -const uint16_t PROGMEM fn_actions[] = { - [1] = ACTION_LAYER_TAP_TOGGLE(SYMB) // FN1 - Momentary Layer 1 (Symbols) -}; - const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { // MACRODOWN only works in this function @@ -154,6 +155,31 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, + {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, + {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, + {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + /* Right hand, matrix positions */ + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands +}; + + // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -- cgit v1.2.3 From e1bfe13090debb25db8e44048cd0055e3680513c Mon Sep 17 00:00:00 2001 From: chwilk Date: Mon, 26 Sep 2016 15:49:10 -0500 Subject: Moved hand_swap_config array so all keyboards get it defined --- keyboards/ergodox/ergodox.c | 24 ++++++++++++++++++++++++ keyboards/ergodox/keymaps/kastyle/keymap.c | 21 --------------------- 2 files changed, 24 insertions(+), 21 deletions(-) (limited to 'keyboards') diff --git a/keyboards/ergodox/ergodox.c b/keyboards/ergodox/ergodox.c index e69de29bb..c88c1ad89 100644 --- a/keyboards/ergodox/ergodox.c +++ b/keyboards/ergodox/ergodox.c @@ -0,0 +1,24 @@ +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +// swap-hands action needs a matrix to define the swap +const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { + /* Left hand, matrix positions */ + {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, + {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, + {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, + {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, + {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, + {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, + {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, + /* Right hand, matrix positions */ + {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, + {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, + {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, + {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, + {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, + {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, + {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, +}; + diff --git a/keyboards/ergodox/keymaps/kastyle/keymap.c b/keyboards/ergodox/keymaps/kastyle/keymap.c index 4e3794a96..467996686 100644 --- a/keyboards/ergodox/keymaps/kastyle/keymap.c +++ b/keyboards/ergodox/keymaps/kastyle/keymap.c @@ -155,31 +155,10 @@ const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) return MACRO_NONE; }; -// swap-hands action needs a matrix to define the swap -const keypos_t hand_swap_config[MATRIX_ROWS][MATRIX_COLS] = { - /* Left hand, matrix positions */ - {{0,13}, {1,13}, {2,13}, {3,13}, {4,13}, {5,13}}, - {{0,12}, {1,12}, {2,12}, {3,12}, {4,12}, {5,12}}, - {{0,11}, {1,11}, {2,11}, {3,11}, {4,11}, {5,11}}, - {{0,10}, {1,10}, {2,10}, {3,10}, {4,10}, {5,10}}, - {{0,9}, {1,9}, {2,9}, {3,9}, {4,9}, {5,9}}, - {{0,8}, {1,8}, {2,8}, {3,8}, {4,8}, {5,8}}, - {{0,7}, {1,7}, {2,7}, {3,7}, {4,7}, {5,7}}, - /* Right hand, matrix positions */ - {{0,6}, {1,6}, {2,6}, {3,6}, {4,6}, {5,6}}, - {{0,5}, {1,5}, {2,5}, {3,5}, {4,5}, {5,5}}, - {{0,4}, {1,4}, {2,4}, {3,4}, {4,4}, {5,4}}, - {{0,3}, {1,3}, {2,3}, {3,3}, {4,3}, {5,3}}, - {{0,2}, {1,2}, {2,2}, {3,2}, {4,2}, {5,2}}, - {{0,1}, {1,1}, {2,1}, {3,1}, {4,1}, {5,1}}, - {{0,0}, {1,0}, {2,0}, {3,0}, {4,0}, {5,0}}, -}; - const uint16_t PROGMEM fn_actions[] = { [1] = ACTION_SWAP_HANDS_TAP_KEY(KC_GRV) // FN1 - Tap = Grave/Tilde - Hold Momentary swap hands }; - // Runs just one time when the keyboard initializes. void matrix_init_user(void) { -- cgit v1.2.3 From 32cc2f6bd90233401a3590b3f975304dac6e4805 Mon Sep 17 00:00:00 2001 From: chwilk Date: Tue, 27 Sep 2016 11:27:09 -0500 Subject: Added description of kastyle keymap --- keyboards/ergodox/keymaps/kastyle/readme.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 keyboards/ergodox/keymaps/kastyle/readme.md (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/kastyle/readme.md b/keyboards/ergodox/keymaps/kastyle/readme.md new file mode 100644 index 000000000..944286a81 --- /dev/null +++ b/keyboards/ergodox/keymaps/kastyle/readme.md @@ -0,0 +1,14 @@ +The kastyle keymap was originally intended to remap the ErgoDox EZ to more +closely approximate the layout of a Kinesis Advantage. Notable changes +over the stock ErgoDox layout include: + + * Re-arragnement of tab, enter, space, and delete to match the Kinesis + * Addition of print screen, pause, etc. keys following the kines-ish keymap + on L1 + * GUI keys have replaced Ctrl on the thumb keys (for Mac use), and Alt keys + are mapped to allow Esc on tap (good for Vi users) + * Most notably, the addition of a momentary one-handed mode for quick and + easy access to keys on the other half of the keyboard, e.g. while using a + mouse in one hand, one may add text to a dialogue box with the other without + having to reach across the keyboard or remove one's hand from the mouse. + -- cgit v1.2.3 From 65b0eff6d863d458464c35a8571071ad4a519af5 Mon Sep 17 00:00:00 2001 From: Chris McLennon Date: Wed, 28 Sep 2016 13:24:29 -0500 Subject: Contributing new keymap to Ergodox --- keyboards/ergodox/keymaps/mclennon_osx/README.md | 5 + keyboards/ergodox/keymaps/mclennon_osx/config.h | 93 +++++++++++++++ keyboards/ergodox/keymaps/mclennon_osx/keymap.c | 144 +++++++++++++++++++++++ 3 files changed, 242 insertions(+) create mode 100644 keyboards/ergodox/keymaps/mclennon_osx/README.md create mode 100644 keyboards/ergodox/keymaps/mclennon_osx/config.h create mode 100644 keyboards/ergodox/keymaps/mclennon_osx/keymap.c (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/mclennon_osx/README.md b/keyboards/ergodox/keymaps/mclennon_osx/README.md new file mode 100644 index 000000000..60980d043 --- /dev/null +++ b/keyboards/ergodox/keymaps/mclennon_osx/README.md @@ -0,0 +1,5 @@ +# Ergodox EZ for OS X + +This keymapping is designed to be reasonably familiar to an ordinary Mac keyboard while taking advantage of the Ergodox EZ's features. Caps lock instead enables a layer which allows a user to use HJKL as arrow keys and to control media. Shift and control have additional mappings on S and D to provide easier access while holding down caps lock. + +If you choose to compile this yourself, be sure to compile with `#define PREVENT_STUCK_MODIFIERS` in your `config.h`. Firmware built using [qmk_firmware](https://github.com/jackhumbert/qmk_firmware/). diff --git a/keyboards/ergodox/keymaps/mclennon_osx/config.h b/keyboards/ergodox/keymaps/mclennon_osx/config.h new file mode 100644 index 000000000..99cbaf000 --- /dev/null +++ b/keyboards/ergodox/keymaps/mclennon_osx/config.h @@ -0,0 +1,93 @@ +/* +Copyright 2012 Jun Wako +Copyright 2013 Oleg Kostyuk + +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 . +*/ + +#ifndef CONFIG_H +#define CONFIG_H + +#include "config_common.h" + +/* USB Device descriptor parameter */ +#define VENDOR_ID 0xFEED +#define PRODUCT_ID 0x1307 +#define DEVICE_VER 0x0001 +#define MANUFACTURER ErgoDox EZ +#define PRODUCT ErgoDox EZ +#define DESCRIPTION t.m.k. keyboard firmware for Ergodox + +/* key matrix size */ +#define MATRIX_ROWS 14 +#define MATRIX_COLS 6 + +#define MOUSEKEY_DELAY 100 +#define MOUSEKEY_INTERVAL 20 +#define MOUSEKEY_MAX_SPEED 3 +#define MOUSEKEY_TIME_TO_MAX 10 + +#define TAPPING_TOGGLE 1 + +#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } +#define ROWS (int []){ D0, D5, B5, B6 } + +/* COL2ROW or ROW2COL */ +#define DIODE_DIRECTION COL2ROW + +/* define if matrix has ghost */ +//#define MATRIX_HAS_GHOST + +/* number of backlight levels */ +#define BACKLIGHT_LEVELS 3 + +/* Set 0 if debouncing isn't needed */ +#define DEBOUNCE 2 +#define TAPPING_TERM 200 +#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) + +/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ +#define LOCKING_SUPPORT_ENABLE +/* Locking resynchronize hack */ +#define LOCKING_RESYNC_ENABLE + +/* key combination for command */ +#define IS_COMMAND() ( \ + keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ + keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ +) + +/* + * Feature disable options + * These options are also useful to firmware size reduction. + */ + +/* disable debug print */ +// #define NO_DEBUG + +/* disable print */ +// #define NO_PRINT + +/* disable action features */ +//#define NO_ACTION_LAYER +//#define NO_ACTION_TAPPING +//#define NO_ACTION_ONESHOT +//#define NO_ACTION_MACRO +//#define NO_ACTION_FUNCTION +//#define DEBUG_MATRIX_SCAN_RATE + +// CUSTOM +#define PREVENT_STUCK_MODIFIERS + +#endif diff --git a/keyboards/ergodox/keymaps/mclennon_osx/keymap.c b/keyboards/ergodox/keymaps/mclennon_osx/keymap.c new file mode 100644 index 000000000..627ff01e4 --- /dev/null +++ b/keyboards/ergodox/keymaps/mclennon_osx/keymap.c @@ -0,0 +1,144 @@ +// Media keys work on OSX, but not on Windows. +#include "ergodox.h" +#include "debug.h" +#include "action_layer.h" + +#define BASE 0 // Default layer +#define AUXI 1 // Auxiliary layer + +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { +/* Keymap 0: Basic Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | ~` | 1 | 2 | 3 | 4 | 5 | 6 | | 7 | 8 | 9 | 0 | -_ | += | Bkspc | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | Tab | Q | W | E | R | T | L1 | | Del | Y | U | I | O | P | |\ | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | L1 | A | S | D | F | G |------| |------| H | J | K | L | ;: | Enter | + * |--------+------+------+------+------+------| {[ | | }] |------+------+------+------+------+--------| + * | LShift | Z | X | C | V | B | | | | N | M | <, | >. | ?/ | "' | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | | | | Esc | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | |Power | | + * ,------|------|------| |------+--------+------. + * | | | | | | | | + * | LGui | LAlt |------| |------| Bkspc |Space | + * | | | | | Del | | | + * `--------------------' `----------------------' + */ +// If it accepts an argument (i.e, is a function), it doesn't need KC_. +// Otherwise, it needs KC_* +[BASE] = KEYMAP( // layer 0 : default + // left hand + KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, + KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, MO(1), + MO(1), KC_A, KC_S, KC_D, KC_F, KC_G, + KC_LSHIFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_LBRC, + KC_LCTL, KC_TRNS,KC_TRNS,KC_TRNS,KC_ESC, + KC_TRNS,KC_TRNS, + KC_TRNS, + KC_LGUI,KC_LALT,KC_TRNS, + + // right hand + KC_7, KC_8, KC_9, KC_0, KC_MINS,KC_EQL, KC_BSPC, + KC_DELETE, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_BSLASH, + KC_H, KC_J, KC_K, KC_L, KC_SCLN,KC_ENT, + KC_RBRC, KC_N, KC_M, KC_COMM,KC_DOT, KC_SLSH,KC_QUOT, + KC_TRNS, KC_TRNS,KC_TRNS,KC_TRNS,KC_TRNS, + KC_PWR, KC_TRNS, + KC_TRNS, + KC_DELETE, KC_BSPC, KC_SPC + ), +/* Keymap 1: Auxiliary Layer + * + * ,--------------------------------------------------. ,--------------------------------------------------. + * | | F1 | F2 | F3 | F4 | F5 | F6 | | F7 | F8 | F9 | F10 | F11 | F12 | | + * |--------+------+------+------+------+-------------| |------+------+------+------+------+------+--------| + * | | | | | | | TRNS | | | Mute | VolDn| VolUp| Play | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | TRNS | |LShift| LCtrl| | |------| |------| LEFT | DOWN | UP |RIGHT | | | + * |--------+------+------+------+------+------| | | |------+------+------+------+------+--------| + * | LShift | | | | | | | | | MPrv | MNxt | | | | | + * `--------+------+------+------+------+-------------' `-------------+------+------+------+------+--------' + * |LCtrl | | | | | | | | | | | + * `----------------------------------' `----------------------------------' + * ,-------------. ,-------------. + * | | | | | | + * ,------|------|------| |------+------+------. + * | | | | | | | | + * | LGui | LAlt |------| |------| Bkspc| Space| + * | | | | | Del | | | + * `--------------------' `--------------------' + */ +// AUXILIARY +[AUXI] = KEYMAP( + // left hand + KC_TRNS, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_LSHIFT,KC_LCTL, KC_TRNS, KC_TRNS, + KC_LSHIFT,KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_LCTL, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, + KC_TRNS, + KC_LGUI, KC_LALT, KC_TRNS, + // right hand + KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, KC_TRNS, + KC_TRNS, KC_MUTE, KC_VOLD, KC_VOLU, KC_MPLY, KC_TRNS, KC_TRNS, + KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT,KC_TRNS, KC_TRNS, + KC_TRNS, KC_MPRV, KC_MNXT, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, KC_TRNS, + KC_PWR, KC_TRNS, + KC_TRNS, + KC_DELETE, KC_BSPC, KC_SPC +), +}; + +const uint16_t PROGMEM fn_actions[] = { + [1] = ACTION_LAYER_TAP_TOGGLE(AUXI) // FN1 - Momentary Layer 1 (Auxiliary) +}; + +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); + } else { + unregister_code(KC_RSFT); + } + break; + } + return MACRO_NONE; +}; + +// Runs just one time when the keyboard initializes. +void matrix_init_user(void) { + +}; + +// Runs constantly in the background, in a loop. +void matrix_scan_user(void) { + + uint8_t layer = biton32(layer_state); + + ergodox_board_led_off(); + ergodox_right_led_1_off(); + ergodox_right_led_2_off(); + ergodox_right_led_3_off(); + switch (layer) { + // TODO: Make this relevant to the ErgoDox EZ. + case 1: + ergodox_right_led_1_on(); + break; + case 2: + ergodox_right_led_2_on(); + break; + default: + // none + break; + } + +}; -- cgit v1.2.3 From cce294df86be7c430f8764ae3330991e66138f43 Mon Sep 17 00:00:00 2001 From: Chris McLennon Date: Wed, 28 Sep 2016 14:44:41 -0500 Subject: Remove config.h --- keyboards/ergodox/keymaps/mclennon_osx/config.h | 93 ------------------------- 1 file changed, 93 deletions(-) delete mode 100644 keyboards/ergodox/keymaps/mclennon_osx/config.h (limited to 'keyboards') diff --git a/keyboards/ergodox/keymaps/mclennon_osx/config.h b/keyboards/ergodox/keymaps/mclennon_osx/config.h deleted file mode 100644 index 99cbaf000..000000000 --- a/keyboards/ergodox/keymaps/mclennon_osx/config.h +++ /dev/null @@ -1,93 +0,0 @@ -/* -Copyright 2012 Jun Wako -Copyright 2013 Oleg Kostyuk - -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 . -*/ - -#ifndef CONFIG_H -#define CONFIG_H - -#include "config_common.h" - -/* USB Device descriptor parameter */ -#define VENDOR_ID 0xFEED -#define PRODUCT_ID 0x1307 -#define DEVICE_VER 0x0001 -#define MANUFACTURER ErgoDox EZ -#define PRODUCT ErgoDox EZ -#define DESCRIPTION t.m.k. keyboard firmware for Ergodox - -/* key matrix size */ -#define MATRIX_ROWS 14 -#define MATRIX_COLS 6 - -#define MOUSEKEY_DELAY 100 -#define MOUSEKEY_INTERVAL 20 -#define MOUSEKEY_MAX_SPEED 3 -#define MOUSEKEY_TIME_TO_MAX 10 - -#define TAPPING_TOGGLE 1 - -#define COLS (int []){ F1, F0, B0, C7, F4, F5, F6, F7, D4, D6, B4, D7 } -#define ROWS (int []){ D0, D5, B5, B6 } - -/* COL2ROW or ROW2COL */ -#define DIODE_DIRECTION COL2ROW - -/* define if matrix has ghost */ -//#define MATRIX_HAS_GHOST - -/* number of backlight levels */ -#define BACKLIGHT_LEVELS 3 - -/* Set 0 if debouncing isn't needed */ -#define DEBOUNCE 2 -#define TAPPING_TERM 200 -#define IGNORE_MOD_TAP_INTERRUPT // this makes it possible to do rolling combos (zx) with keys that convert to other keys on hold (z becomes ctrl when you hold it, and when this option isn't enabled, z rapidly followed by x actually sends Ctrl-x. That's bad.) - -/* Mechanical locking support. Use KC_LCAP, KC_LNUM or KC_LSCR instead in keymap */ -#define LOCKING_SUPPORT_ENABLE -/* Locking resynchronize hack */ -#define LOCKING_RESYNC_ENABLE - -/* key combination for command */ -#define IS_COMMAND() ( \ - keyboard_report->mods == (MOD_BIT(KC_LCTL) | MOD_BIT(KC_RCTL)) || \ - keyboard_report->mods == (MOD_BIT(KC_LSFT) | MOD_BIT(KC_RSFT)) \ -) - -/* - * Feature disable options - * These options are also useful to firmware size reduction. - */ - -/* disable debug print */ -// #define NO_DEBUG - -/* disable print */ -// #define NO_PRINT - -/* disable action features */ -//#define NO_ACTION_LAYER -//#define NO_ACTION_TAPPING -//#define NO_ACTION_ONESHOT -//#define NO_ACTION_MACRO -//#define NO_ACTION_FUNCTION -//#define DEBUG_MATRIX_SCAN_RATE - -// CUSTOM -#define PREVENT_STUCK_MODIFIERS - -#endif -- cgit v1.2.3 From 3d45860dc280c7595763256ecd4874220abf0ab2 Mon Sep 17 00:00:00 2001 From: IBNobody Date: Wed, 28 Sep 2016 20:19:28 -0500 Subject: Updating Vision to beta layout. --- keyboards/vision_division/config.h | 19 +- keyboards/vision_division/keymaps/default/Makefile | 26 +- keyboards/vision_division/keymaps/default/config.h | 46 +- keyboards/vision_division/keymaps/default/keymap.c | 940 ++++++++++----------- keyboards/vision_division/matrix_types.h | 33 +- keyboards/vision_division/rules.mk | 2 +- keyboards/vision_division/vision_division.c | 40 + 7 files changed, 570 insertions(+), 536 deletions(-) (limited to 'keyboards') diff --git a/keyboards/vision_division/config.h b/keyboards/vision_division/config.h index f50378ffa..1f8466a54 100644 --- a/keyboards/vision_division/config.h +++ b/keyboards/vision_division/config.h @@ -26,10 +26,9 @@ along with this program. If not, see . /* COL2ROW or ROW2COL */ #define DIODE_DIRECTION ROW2COL -// #define BACKLIGHT_PIN B7 -// #define BACKLIGHT_BREATHING -// #define BACKLIGHT_LEVELS 3 - +#define BACKLIGHT_PIN B7 +#define BACKLIGHT_BREATHING +#define BACKLIGHT_LEVELS 3 /* Debounce reduces chatter (unintended double-presses) - set 0 if debouncing is not needed */ #define DEBOUNCING_DELAY 5 @@ -124,10 +123,18 @@ along with this program. If not, see . */ /* disable debug print */ -//#define NO_DEBUG +// #ifndef NO_DEBUG +// # define NO_DEBUG +// #endif /* disable print */ -//#define NO_PRINT +// #ifndef NO_PRINT +// # define NO_PRINT +// #endif + +/* Only print user print statements */ +// #define USER_PRINT + /* disable action features */ //#define NO_ACTION_LAYER diff --git a/keyboards/vision_division/keymaps/default/Makefile b/keyboards/vision_division/keymaps/default/Makefile index ecbe7e1ab..5a930e85e 100644 --- a/keyboards/vision_division/keymaps/default/Makefile +++ b/keyboards/vision_division/keymaps/default/Makefile @@ -2,19 +2,19 @@ # change to "no" to disable the options, or define them in the Makefile in # the appropriate keymap folder that will get included automatically # -BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) -MOUSEKEY_ENABLE = yes # Mouse keys(+4700) -EXTRAKEY_ENABLE = yes # Audio control and System control(+450) -CONSOLE_ENABLE = yes # Console for debug(+400) -COMMAND_ENABLE = yes # Commands for debug and configuration -NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work -BACKLIGHT_ENABLE = no # Enable keyboard backlight functionality -MIDI_ENABLE = no # MIDI controls -AUDIO_ENABLE = yes # Audio output on port C6 -UNICODE_ENABLE = no # Unicode -BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID -RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. -SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend +BOOTMAGIC_ENABLE = yes # Virtual DIP switch configuration(+1000) +MOUSEKEY_ENABLE = yes # Mouse keys(+4700) +EXTRAKEY_ENABLE = yes # Audio control and System control(+450) +CONSOLE_ENABLE = yes # Console for debug(+400) +COMMAND_ENABLE = yes # Commands for debug and configuration +NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work +BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality +MIDI_ENABLE = no # MIDI controls +AUDIO_ENABLE = yes # Audio output on port C6 +UNICODE_ENABLE = no # Unicode +BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID +RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time. +SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend ifndef QUANTUM_DIR include ../../../../Makefile diff --git a/keyboards/vision_division/keymaps/default/config.h b/keyboards/vision_division/keymaps/default/config.h index 16740fb15..efd43f41b 100644 --- a/keyboards/vision_division/keymaps/default/config.h +++ b/keyboards/vision_division/keymaps/default/config.h @@ -4,25 +4,44 @@ #include "../../config.h" #include "matrix_types.h" - /* USB Device descriptor parameter */ #define VENDOR_ID 0xFEED -#define PRODUCT_ID GET_PID(NUMERIC_NORMAL, HOMING_MAX_TEENSY) #define DEVICE_VER 0x0001 #define MANUFACTURER IBNobody #define PRODUCT Vision Division #define DESCRIPTION Full / Split Keyboard - -#define MATRIX_ROWS 6 +#define MATRIX_ROWS 6 #define MATRIX_ROW_PINS { C2, C3, F4, F5, F6, F7 } -#define MATRIX_COLS GET_MATRIX_COLS(NUMERIC_NORMAL, HOMING_MAX_TEENSY) -#define MATRIX_COL_PINS GET_MATRIX_COL_PINS(NUMERIC_NORMAL, HOMING_MAX_TEENSY) +// !!! MAKE SURE THAT THE LEFT/RIGHT PCB DEFINES MATCH ON ALL OF THESE COLUMNS -#define UNUSED_PINS +// **LEFT** **RIGHT** +#define PRODUCT_ID GET_PID( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) +#define MATRIX_COLS GET_MATRIX_COLS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) +#define MATRIX_COL_PINS GET_MATRIX_COL_PINS( NUMERIC_NORMAL, NUMERIC_MAX_TEENSY) -/*#define KEYMAP( \ +#define KEYMAP(MATRIX_LAYER, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ + k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ + k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ + k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ +) \ +KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, NUMERIC_MAX_TEENSY, \ + k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ + k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ + k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ + k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, KC_NO, KC_NO, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ + k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ + k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ +) + +// Example Keymap Macros + +/* +#define KEYMAP(MATRIX_LAYER, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ @@ -30,16 +49,18 @@ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ ) \ -KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ +KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C, \ k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k60B, k60C, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, k61C \ -)*/ +) +*/ -#define KEYMAP( \ +/* +#define KEYMAP(MATRIX_LAYER, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, \ @@ -47,7 +68,7 @@ KEYMAP_MASTER(NUMERIC_MAX_TEENSY, NUMERIC_MAX, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B \ ) \ -KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ +KEYMAP_MASTER(MATRIX_LAYER, NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, KC_NO, KC_NO, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, KC_NO, \ k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, KC_NO, KC_NO, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, KC_NO, \ k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, KC_NO, KC_NO, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, KC_NO, \ @@ -55,5 +76,6 @@ KEYMAP_MASTER(NUMERIC_NORMAL, HOMING_MAX_TEENSY, \ k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, KC_NO, KC_NO, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, KC_NO, \ k601, k602, k603, k604, k605, k606, k607, k608, k609, k60A, KC_NO, KC_NO, k611, k612, k613, k614, k615, k616, k617, k618, k619, k61A, k61B, KC_NO \ ) +*/ #endif \ No newline at end of file diff --git a/keyboards/vision_division/keymaps/default/keymap.c b/keyboards/vision_division/keymaps/default/keymap.c index b8cef9c75..64118abdc 100644 --- a/keyboards/vision_division/keymaps/default/keymap.c +++ b/keyboards/vision_division/keymaps/default/keymap.c @@ -8,46 +8,70 @@ #include "song_list.h" #endif -#define LAYER_QWERTY 0 -#define LAYER_COLEMAK 1 -#define LAYER_DVORAK 2 -#define LAYER_UPPER 3 -#define LAYER_LOWER 4 -#define LAYER_FUNCTION 5 -#define LAYER_MOUSE 6 -#define LAYER_ADJUST 7 - -#define MACRO_QWERTY 0 -#define MACRO_COLEMAK 1 -#define MACRO_DVORAK 2 -#define MACRO_UPPER 3 -#define MACRO_LOWER 4 -#define MACRO_FUNCTION 5 -#define MACRO_MOUSE 6 -#define MACRO_TIMBRE_1 7 -#define MACRO_TIMBRE_2 8 -#define MACRO_TIMBRE_3 9 -#define MACRO_TIMBRE_4 10 -#define MACRO_TEMPO_U 11 -#define MACRO_TEMPO_D 12 -#define MACRO_TONE_DEFAULT 13 -#define MACRO_MUSIC_TOGGLE 14 -#define MACRO_AUDIO_TOGGLE 16 -#define MACRO_INC_VOICE 18 -#define MACRO_DEC_VOICE 19 -#define MACRO_BACKLIGHT 20 -#define MACRO_BREATH_TOGGLE 21 -#define MACRO_BREATH_SPEED_INC 23 -#define MACRO_BREATH_SPEED_DEC 24 -#define MACRO_BREATH_DEFAULT 25 +enum keyboard_layers { + LAYER_QWERTY = 0, + LAYER_UPPER, + LAYER_LOWER, + LAYER_FUNCTION, + LAYER_MOUSE, + LAYER_ADJUST, +}; +enum keyboard_macros { + MACRO_QWERTY = 0, + MACRO_UPPER, + MACRO_LOWER, + MACRO_FUNCTION, + MACRO_MOUSE, + MACRO_TIMBRE_1, + MACRO_TIMBRE_2, + MACRO_TIMBRE_3, + MACRO_TIMBRE_4, + MACRO_TEMPO_U, + MACRO_TEMPO_D, + MACRO_TONE_DEFAULT, + MACRO_MUSIC_TOGGLE, + MACRO_AUDIO_TOGGLE, + MACRO_INC_VOICE, + MACRO_DEC_VOICE, + MACRO_BACKLIGHT, + MACRO_BREATH_TOGGLE, + MACRO_BREATH_SPEED_INC, + MACRO_BREATH_SPEED_DEC, + MACRO_BREATH_DEFAULT, + MACRO_MOUSE_MOVE_UL, + MACRO_MOUSE_MOVE_UR, + MACRO_MOUSE_MOVE_DL, + MACRO_MOUSE_MOVE_DR, + MACRO_HELP, + MACRO_HELP_1, + MACRO_HELP_2, + MACRO_HELP_3, + MACRO_HELP_4, + MACRO_HELP_5, + MACRO_HELP_6, + MACRO_HELP_7, + MACRO_HELP_8, + MACRO_HELP_9, + MACRO_HELP_0, + MACRO_GENERAL_1, + MACRO_GENERAL_2, + MACRO_GENERAL_3, + MACRO_GENERAL_4, + MACRO_GENERAL_5, + MACRO_CURSOR_UL, + MACRO_CURSOR_UR, + MACRO_CURSOR_DL, + MACRO_CURSOR_DR, + MACRO_MUTE_APP, + MACRO_COPY_CUT, +}; #define M_QWRTY M(MACRO_QWERTY) -#define M_COLMK M(MACRO_COLEMAK) -#define M_DVORK M(MACRO_DVORAK) #define M_UPPER M(MACRO_UPPER) #define M_LOWER M(MACRO_LOWER) #define M_FUNCT M(MACRO_FUNCTION) #define M_MOUSE M(MACRO_MOUSE) + #define TIMBR_1 M(MACRO_TIMBRE_1) #define TIMBR_2 M(MACRO_TIMBRE_2) #define TIMBR_3 M(MACRO_TIMBRE_3) @@ -55,15 +79,47 @@ #define TMPO_UP M(MACRO_TEMPO_U) #define TMPO_DN M(MACRO_TEMPO_D) #define TMPO_DF M(MACRO_TONE_DEFAULT) + +#define VC_UP M(MACRO_INC_VOICE) +#define VC_DOWN M(MACRO_DEC_VOICE) + #define M_BACKL M(MACRO_BACKLIGHT) #define M_BRTOG M(MACRO_BREATH_TOGGLE) #define M_BSPDU M(MACRO_BREATH_SPEED_INC) #define M_BSPDD M(MACRO_BREATH_SPEED_DEC) #define M_BDFLT M(MACRO_BREATH_DEFAULT) +#define M_MS_UL M(MACRO_MOUSE_MOVE_UL) +#define M_MS_UR M(MACRO_MOUSE_MOVE_UR) +#define M_MS_DL M(MACRO_MOUSE_MOVE_DL) +#define M_MS_DR M(MACRO_MOUSE_MOVE_DR) -#define VC_UP M(MACRO_INC_VOICE) -#define VC_DOWN M(MACRO_DEC_VOICE) +#define M_HELP M(MACRO_HELP) +#define M_HELP1 M(MACRO_HELP_1) +#define M_HELP2 M(MACRO_HELP_2) +#define M_HELP3 M(MACRO_HELP_3) +#define M_HELP4 M(MACRO_HELP_4) +#define M_HELP5 M(MACRO_HELP_5) +#define M_HELP6 M(MACRO_HELP_6) +#define M_HELP7 M(MACRO_HELP_7) +#define M_HELP8 M(MACRO_HELP_8) +#define M_HELP9 M(MACRO_HELP_9) +#define M_HELP0 M(MACRO_HELP_0) + +#define M_M1 M(MACRO_GENERAL_1) +#define M_M2 M(MACRO_GENERAL_2) +#define M_M3 M(MACRO_GENERAL_3) +#define M_M4 M(MACRO_GENERAL_4) +#define M_M5 M(MACRO_GENERAL_5) + +#define M_UL M(MACRO_CURSOR_UL) +#define M_UR M(MACRO_CURSOR_UR) +#define M_DL M(MACRO_CURSOR_DL) +#define M_DR M(MACRO_CURSOR_DR) + +#define M_MUTEA M(MACRO_MUTE_APP) + +#define M_CP_CT M(MACRO_COPY_CUT) #define SC_UNDO LCTL(KC_Z) @@ -77,6 +133,7 @@ #define SC_ACLS LALT(KC_F4) #define SC_CCLS LCTL(KC_F4) +#define TG_NKRO MAGIC_TOGGLE_NKRO #define OS_SHFT KC_FN0 #define _______ KC_TRNS @@ -84,208 +141,128 @@ #define ________________ _______, _______ #define XXXXXXXXXXXXXXXX XXXXXXX, XXXXXXX -const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { - - -KEYMAP( \ - KC_VOLD, KC_MUTE, KC_VOLU, XXXXXXX, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, KC_F9, KC_F10, KC_F11, KC_F12, KC_PSCR, KC_SLCK, KC_PAUS, \ - KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, KC_ESC, KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_EQL, KC_BSPC, KC_INS, KC_HOME, KC_PGUP, \ - KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, KC_TAB, KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, KC_MINS, KC_BSLS, KC_DEL, KC_END, KC_PGDN, \ - KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, KC_CAPS, KC_BSPC, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, KC_SCLN, KC_QUOT, KC_ENT, XXXXXXX, XXXXXXX, XXXXXXX, \ - KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, KC_LSFT, 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_RSFT, XXXXXXX, KC_UP, XXXXXXX, \ - KC_KP_0, KC_KP_0, KC_PDOT, KC_PENT, KC_LCTL, KC_LCTL, XXXXXXX, KC_LALT, KC_LGUI, XXXXXXX, KC_SPC, KC_SPC, XXXXXXX, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT \ -) - - -// [LAYER_QWERTY] = { // QWERTY -// { 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_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_DEL }, -// { 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_ENT, KC_PGUP }, -// { 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_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - - -// /* Numeric Max / Homing Normal - Traditional -// * .-----------------------------------. .-----------------------------------. .-----------------_-----------------. .-----------------------------------. .--------------------------. -// * | | | | | | | | | | | | | | | | | | | | | | | | -// * '-----------------------------------' '-----------------------------------' '-----------------------------------' '-----------------------------------' '--------------------------' -// * .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .--------------------------. -// * | | | | | | ESC | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | | | | | | -// * |--------+--------+--------+--------| | -------+ -------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------+--------+--------| -// * | | | | | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | | | | | | -// * |--------+--------+--------+ | o | -------+ -------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| '--------+--------+--------' -// * | | | | | o | CAPS | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | | -// * |--------+--------+--------+--------| o | -------+ -------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---+--------| .--------. -// * | | | | | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX | | | | -// * |--------+--------+--------+ | | -------+ -------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+--------+--------| .--------+--------+--------. -// * | | | | | LCTRL | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | | | | | | -// * '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '--------------------------' -// */ - - -// /* QWERTY -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | TAB | Q | W | E | R | T | Y | U | I | O | P | [ | ] | \ | DEL | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAPS | A | S | D | F | G | H | J | K | L | ; | ' | XXXXXX . ENTER | PG UP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | LSHIFT | Z | X | C | V | B | N | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_QWERTY] = { // QWERTY -// { 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_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_DEL }, -// { 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_ENT, KC_PGUP }, -// { 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_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - -// /* COLEMAK -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | - | = | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | TAB | Q | W | F | P | G | J | L | U | Y | ; | [ | ] | \ | DEL | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | BACKSP | A | R | S | T | D | H | N | E | I | O | ' | XXXXXX . ENTER | PG UP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | LSHIFT | Z | X | C | V | B | K | M | , | . | / | XXXXXX . RSHIFT | UP | PG DN | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_COLEMAK] = { // COLEMAK -// { 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_BSPC }, -// { 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_BSLS, KC_DEL }, -// { KC_BSPC, 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_ENT, KC_PGUP }, -// { KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - -// /* DVORAK -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | ESC | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | [ | ] | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | TAB | ' | , | . | P | Y | F | G | C | R | L | / | = | \ | DEL | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAPS | A | O | E | U | I | D | H | T | N | S | - | XXXXXX . ENTER | PG UP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | LSHIFT | ; | Q | J | K | X | B | M | W | V | Z | XXXXXX . RSHIFT | UP | PG DN | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | LCTRL | LWIN | FN | LALT | UPPER | XXXXXX . SPACE | LOWER | SHIFT | RALT | APP | RCTRL | LEFT | DOWN | RIGHT | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_DVORAK] = { // DVORAK -// { 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_BSPC, KC_BSPC }, -// { 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_BSLS, KC_DEL }, -// { KC_CAPS, 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_ENT, KC_PGUP }, -// { KC_LSFT, KC_SCLN, KC_Q, KC_J, KC_K, KC_X, KC_B, KC_M, KC_W, KC_V, KC_Z, KC_RSFT, KC_RSFT, KC_UP, KC_PGDN }, -// { KC_LCTL, KC_LGUI, M_FUNCT, KC_LALT, M_UPPER, KC_SPC, KC_SPC, M_LOWER, OS_SHFT, KC_RALT, KC_APP, KC_RCTL, KC_LEFT, KC_DOWN, KC_RGHT }, -// }, - -// /* UPPER -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | PRINT | BR TOG | BR SP+ | BR SP- | BR RST | XXXXXX | XXXXXX | NUM LK | / | * | | NUM LK | SCR LK | XXXXXX . PAUSE | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | | F1 | F2 | F3 | F4 | | | 7 | 8 | 9 | - | | | | INS | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAP LK | F5 | F6 | F7 | F8 | | | 4 | 5 | 6 | + | | XXXXXX . | HOME | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | | F9 | F10 | F11 | F12 | | | 1 | 2 | 3 | ENTER | XXXXXX . | | END | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | | | | | | 0 | | RALT | . | ENTER | | | | | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_UPPER] = { // UPPER -// { KC_PSCR, M_BRTOG, M_BSPDU, M_BSPDD, M_BDFLT, XXXXXXX, XXXXXXX, KC_NLCK, KC_PSLS, KC_PAST, XXXXXXX, XXXXXXX, KC_SLCK, KC_PAUS, KC_PAUS }, -// { _______, KC_F1, KC_F2, KC_F3, KC_F4, XXXXXXX, XXXXXXX, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, KC_INS }, -// { KC_CAPS, KC_F5, KC_F6, KC_F7, KC_F8, XXXXXXX, XXXXXXX, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, ________________, KC_HOME }, -// { _______, KC_F9, KC_F10, KC_F11, KC_F12, XXXXXXX, XXXXXXX, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, ________________, _______, KC_END }, -// { _______, _______, _______, _______, _______, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, _______, _______, _______, _______ }, -// }, - -// /* LOWER -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | F12 | XXXXXX . BACKSP | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | | $ | { | [ | ( | % | # | ) | ] | } | @ | | | | INS | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | | ^ | * | + | - | / | \ | _ | ' | " | ` | | XXXXXX . | HOME | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | | | | & | ! | ~ | ; | : | = | < | > | ? | XXXXXX . | | END | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | | | | | | | | | | | | | | | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_LOWER] = { // LOWER -// { _______, 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_DLR, KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT, _______, _______, _______, KC_INS }, -// { _______, KC_CIRC, KC_ASTR, KC_PPLS, KC_PMNS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT, KC_GRV, _______, ________________, KC_HOME }, -// { _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL, KC_LT, KC_GT, KC_QUES, ________________, _______, KC_END }, -// { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, -// }, - -// /* FUNCTION -// * .---------------------------------------------------------------------------------------------------------------------- 2u ------------. -// * | NUM LK | | | | | | | | | | | | | XXXXXX . | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+-----------------| -// * | SCR LK | F13 | F14 | F15 | F16 | | | | | | | | | | | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ------------+--------| -// * | CAP LK | F17 | F18 | F19 | F20 | | | | | | | | XXXXXX . | | -// * |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+- 2u ---------------------+--------| -// * | | F21 | F22 | F23 | F24 | | | | | | | XXXXXX . | VOL UP | MUTE | -// * |--------+--------+--------+--------+--------+- 2u ------------+--------+--------+--------+--------+-----------------+--------+--------| -// * | | | | | | PLAY/PAUSE | | | | | | PTRACK | VOL DN | NTRACK | -// * '--------------------------------------------------------------------------------------------------------------------------------------' -// */ - -// [LAYER_FUNCTION] = { // FUNCTION -// { KC_NLCK, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, -// { KC_SLCK, KC_F13, KC_F14, KC_F15, KC_F16, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, -// { KC_CAPS, KC_F17, KC_F18, KC_F19, KC_F20, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, XXXXXXX }, -// { _______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_VOLU, KC_MUTE }, -// { _______, _______, _______, _______, _______, KC_MPLY, KC_MPLY, _______, _______, _______, _______, _______, KC_MPRV, KC_VOLD, KC_MNXT }, -// }, - -// #ifdef MOUSEKEY_ENABLE - -// [LAYER_MOUSE] = { // MOUSE -// { _______, KC_ACL0, KC_ACL1, KC_ACL2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX }, -// { XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX }, -// { XXXXXXX, KC_BTN5, KC_BTN4, KC_BTN3, KC_BTN2, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXXXXXXXXXXX, KC_WH_U }, -// { _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, ________________, KC_MS_U, KC_WH_D }, -// { _______, _______, _______, _______, _______, KC_BTN1, KC_BTN1, _______, _______, _______, _______, _______, KC_MS_L, KC_MS_D, KC_MS_R }, -// }, - -// #endif - -// [LAYER_ADJUST] = { // ADJUST -// { _______, TIMBR_1, TIMBR_2, TIMBR_3, TIMBR_4, TMPO_UP, TMPO_DN, TMPO_DF, _______, _______, _______, MU_TOG, AU_TOG, ________________ }, -// { _______, M_QWRTY, M_COLMK, M_DVORK, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, -// { _______, _______, _______, _______, M_BACKL, RESET, _______, M_MOUSE, _______, _______, _______, ________________, MUV_IN, _______ }, -// { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, MUV_DE, _______ }, -// }, - - -// /* -// [LAYER_EMPTY] = { // LAYER -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______ }, -// { _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, ________________, _______, _______ }, -// { _______, _______, _______, _______, _______, ________________, _______, _______, _______, _______, _______, _______, _______, _______ }, -// }, -// */ +const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = +{ +/* LAYER = LAYER_QWERTY + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | FN | PRINT | SCR LK | PAUSE | | F1 | F2 | F3 | F4 | XXXXXX | F5 | F6 | F7 | F8 | XXXXXX | F9 | F10 | F11 | F12 | | VOL DN | MUTE | VOL UP | BACKLT | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | M1 | INS | HOME | PG UP | | ESC | ` | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | = | BACKSP | | NUM LK | KP / | KP * | KP - | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | M2 | DEL | END | PG DN | | TAB | TAB | Q | W | E | R | T | Y | U | I | O | P | - | \ | | KP 7 | KP 8 | KP 9 | KP + | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | M3 | UL | UP | UR | | CAP LK | BACKSP | A | S | D | F | G | H | J | K | L | ; | ' | ENTER | o | KP 4 | KP 5 | KP 6 | KP + | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | M4 | LEFT | CP/CT | RIGHT | | LSHIFT | LSHIFT | Z | X | C | V | B | N | M | , | . | / | RSHIFT | RSHIFT | | KP 1 | KP 2 | KP 3 | KP Ent | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | M5 | DL | DOWN | DR | | LCTRL | XXXXXX | XXXXXX | LWIN | LALT | LOWER | SPACE . SPACE | UPPER | OSHIFT | RALT | APP | XXXXXX | RCTRL | | KP 0 | KP , | KP . | KP Ent | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_QWERTY, \ + M_HELP , KC_PSCR, KC_SLCK, KC_PAUS, KC_F1 , KC_F2 , KC_F3 , KC_F4 , XXXXXXX, KC_F5 , KC_F6 , KC_F7 , KC_F8 , XXXXXXX, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_VOLD, KC_MUTE, KC_VOLU, M_BACKL, \ + M_M1 , KC_INS , KC_HOME, KC_PGUP, KC_ESC , KC_GRV , KC_1 , KC_2 , KC_3 , KC_4 , KC_5 , KC_6 , KC_7 , KC_8 , KC_9 , KC_0 , KC_EQL , KC_BSPC, KC_NLCK, KC_PSLS, KC_PAST, KC_PMNS, \ + M_M2 , KC_DEL , KC_END , KC_PGDN, KC_TAB , KC_TAB , KC_Q , KC_W , KC_E , KC_R , KC_T , KC_Y , KC_U , KC_I , KC_O , KC_P , KC_MINS, KC_BSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PPLS, \ + M_M3 , M_UL , KC_UP , M_UR , KC_CAPS, KC_BSPC, 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_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, \ + M_M4 , KC_LEFT, M_CP_CT, KC_RGHT, KC_LSFT, 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_RSFT, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, \ + M_M5 , M_DL , KC_DOWN, M_DR , KC_LCTL, XXXXXXX, XXXXXXX, KC_LGUI, KC_LALT, M_LOWER, KC_SPC , KC_SPC , M_UPPER, OS_SHFT, KC_RALT, KC_APP , XXXXXXX, KC_RCTL, KC_KP_0, KC_PCMM, KC_PDOT, KC_PENT \ +), +/* LAYER = LAYER_LOWER + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | MUTE A | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | $ | { | [ | ( | % | # | ) | ] | } | @ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | ^ | * | + | - | / | \ | _ | ' | " | ` | ______ | ______ | o | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | | | & | ! | ~ | ; | : | = | < | > | ? | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | XXXXXX | XXXXXX | ______ | ______ | ______ | ______ . ______ | LOWER | ______ | ______ | ______ | XXXXXX | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_LOWER, \ + _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, M_MUTEA, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_DLR , KC_LCBR, KC_LBRC, KC_LPRN, KC_PERC, KC_HASH, KC_RPRN, KC_RBRC, KC_RCBR, KC_AT , _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_CIRC, KC_ASTR, KC_PLUS, KC_MINS, KC_SLSH, KC_BSLS, KC_UNDS, KC_QUOT, KC_DQT , KC_GRV , _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_PIPE, KC_AMPR, KC_EXLM, KC_TILD, KC_SCLN, KC_COLN, KC_EQL , KC_LT , KC_GT , KC_QUES, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, _______, _______, _______, M_LOWER, _______, _______, _______, XXXXXXX, _______, _______, _______, _______, _______ \ +), +/* LAYER = LAYER_UPPER + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | F13 | F14 | F15 | F16 | XXXXXX | F17 | F18 | F19 | F20 | XXXXXX | F21 | F22 | F23 | F24 | | ______ | MUTE A | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | F1 | F2 | F3 | F4 | NUM LK | KP / | KP 7 | KP 8 | KP 9 | KP - | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | F5 | F6 | F7 | F8 | CAP LK | KP * | KP 4 | KP 5 | KP 6 | KP + | ______ | ______ | o | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | ______ | F9 | F10 | F11 | F12 | SCR LK | KP 0 | KP 1 | KP 2 | KP 3 | KP Ent | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | ______ | ______ | ______ | ______ | | ______ | XXXXXX | XXXXXX | ______ | ______ | UPPER | KP 0 . KP 0 | ______ | RALT | KP . | KP Ent | XXXXXX | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_UPPER, \ + _______, _______, _______, _______, KC_F13 , KC_F14 , KC_F15 , KC_F16 , XXXXXXX, KC_F17 , KC_F18 , KC_F19 , KC_F20 , XXXXXXX, KC_F21 , KC_F22 , KC_F23 , KC_F24 , _______, M_MUTEA, _______, _______, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_F1 , KC_F2 , KC_F3 , KC_F4 , KC_NLCK, KC_PSLS, KC_KP_7, KC_KP_8, KC_KP_9, KC_PMNS, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_F5 , KC_F6 , KC_F7 , KC_F8 , KC_CAPS, KC_PAST, KC_KP_4, KC_KP_5, KC_KP_6, KC_PPLS, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, _______, KC_F9 , KC_F10 , KC_F11 , KC_F12 , KC_SLCK, KC_KP_0, KC_KP_1, KC_KP_2, KC_KP_3, KC_PENT, _______, _______, _______, _______, _______, _______, \ + _______, _______, _______, _______, _______, XXXXXXX, XXXXXXX, _______, _______, M_UPPER, KC_KP_0, KC_KP_0, _______, KC_RALT, KC_PDOT, KC_PENT, XXXXXXX, _______, _______, _______, _______, _______ \ +), +/* LAYER = LAYER_MOUSE + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | MS BT1 | MS AC0 | MS WHU | MS AC2 | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | MS BT2 | MS WHL | MS WHD | MS WHU | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | MS BT3 | MS UL | MS U | MS UR | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | o | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | MS BT4 | MS L | MS BT1 | MS R | | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | MS BT5 | MS DL | MS D | MS DR | | ______ | ______ | ______ | ______ | ______ | ______ | ______ . ______ | ______ | ______ | ______ | ______ | ______ | ______ | | ______ | ______ | ______ | ______ | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_MOUSE, \ + _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN1, KC_ACL0, KC_WH_U, KC_ACL2, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN2, KC_WH_L, KC_WH_D, KC_WH_U, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN3, M_MS_UL, KC_MS_U, M_MS_UR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN4, KC_MS_L, KC_BTN1, KC_MS_R, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, \ + KC_BTN5, M_MS_DL, KC_MS_D, M_MS_DR, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ \ +), +/* LAYER = LAYER_ADJUST + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | HELP 1 | HELP 2 | HELP 3 | HELP 4 | XXXXXX | HELP 5 | HELP 6 | HELP 7 | HELP 8 | XXXXXX | HELP 9 | HELP 0 | XXXXXX | XXXXXX | | VOICE- | AUDIO | VOICE+ | MUSIC | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' + .-----------------------------------. .-----------------------------------------------------------------------------------------------------------------------------. .-----------------------------------. + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | o | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| o |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | RESET | XXXXXX | MOUSE | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + |--------+--------+--------+--------| |--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| |--------|--------|--------+--------| + | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | UPPER | XXXXXX . XXXXXX | LOWER | XXXXXX | XXXXXX | XXXXXX | XXXXXX | XXXXXX | | XXXXXX | XXXXXX | XXXXXX | XXXXXX | + '-----------------------------------' '-----------------------------------------------------------------------------------------------------------------------------' '-----------------------------------' +*/ +KEYMAP(LAYER_ADJUST, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_HELP1, M_HELP2, M_HELP3, M_HELP4, XXXXXXX, M_HELP5, M_HELP6, M_HELP7, M_HELP8, XXXXXXX, M_HELP9, M_HELP0, XXXXXXX, XXXXXXX, MUV_DE , AU_TOG , MUV_IN , MU_TOG , \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, RESET , XXXXXXX, M_MOUSE, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \ + XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, M_UPPER, XXXXXXX, XXXXXXX, M_LOWER, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX \ +), }; @@ -313,303 +290,290 @@ float tone_scroll_off[][2] = SONG(SCROLL_LOCK_OFF_SOUND); void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); } const uint16_t PROGMEM fn_actions[] = { - [0] = ACTION_MODS_ONESHOT(MOD_LSFT), + [0] = ACTION_MODS_ONESHOT(MOD_LSFT), }; const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) { - // MACRODOWN only works in this function - switch(id) + // MACRODOWN only works in this function + switch(id) + { + + case MACRO_HELP_1: + if (record->event.pressed) + { + uprint("H1"); + } + break; + + case MACRO_HELP_2: + if (record->event.pressed) + { + uprint("H2"); + } + break; + + case MACRO_HELP_3: + if (record->event.pressed) + { + uprint("H3"); + } + break; + + case MACRO_HELP_4: + if (record->event.pressed) + { + uprint("H4"); + } + break; + + case MACRO_HELP_5: + if (record->event.pressed) + { + uprint("H5"); + } + break; + + case MACRO_HELP_6: + if (record->event.pressed) + { + uprint("H6"); + } + break; + + case MACRO_HELP_7: + if (record->event.pressed) + { + uprint("H7"); + } + break; + + case MACRO_HELP_8: + if (record->event.pressed) + { + uprint("H8"); + } + break; + + case MACRO_HELP_9: + if (record->event.pressed) + { + uprint("H9"); + } + break; + + case MACRO_BREATH_TOGGLE: + if (record->event.pressed) + { + breathing_toggle(); + } + break; + + case MACRO_BREATH_SPEED_INC: + if (record->event.pressed) + { + breathing_speed_inc(1); + } + break; + + case MACRO_BREATH_SPEED_DEC: + if (record->event.pressed) + { + breathing_speed_dec(1); + } + break; + + case MACRO_BREATH_DEFAULT: + if (record->event.pressed) + { + breathing_defaults(); + } + break; + + case MACRO_QWERTY: + if (record->event.pressed) + { + persistant_default_layer_set(1UL<event.pressed) { + layer_on(LAYER_UPPER); + breathing_speed_set(2); + breathing_pulse(); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + else + { + layer_off(LAYER_UPPER); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + break; + + case MACRO_LOWER: + if (record->event.pressed) + { + layer_on(LAYER_LOWER); + breathing_speed_set(2); + breathing_pulse(); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + else + { + layer_off(LAYER_LOWER); + update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); + } + break; - // case MACRO_BREATH_TOGGLE: - // if (record->event.pressed) - // { - // breathing_toggle(); - // } - // break; - - // case MACRO_BREATH_SPEED_INC: - // if (record->event.pressed) - // { - // breathing_speed_inc(1); - // } - // break; - - // case MACRO_BREATH_SPEED_DEC: - // if (record->event.pressed) - // { - // breathing_speed_dec(1); - // } - // break; - - // case MACRO_BREATH_DEFAULT: - // if (record->event.pressed) - // { - // breathing_defaults(); - // } - // break; - - case MACRO_QWERTY: - if (record->event.pressed) - { - persistant_default_layer_set(1UL<event.pressed) - { - persistant_default_layer_set(1UL<event.pressed) - { - persistant_default_layer_set(1UL<event.pressed) - { - layer_on(LAYER_UPPER); - // breathing_speed_set(2); - // breathing_pulse(); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - else - { - layer_off(LAYER_UPPER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - break; - - case MACRO_LOWER: - if (record->event.pressed) - { - layer_on(LAYER_LOWER); - // breathing_speed_set(2); - // breathing_pulse(); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - else - { - layer_off(LAYER_LOWER); - update_tri_layer(LAYER_LOWER, LAYER_UPPER, LAYER_ADJUST); - } - break; - - case MACRO_FUNCTION: - if (record->event.pressed) - { - // breathing_speed_set(3); - // breathing_enable(); - layer_on(LAYER_FUNCTION); - } - else - { - // breathing_speed_set(1); - // breathing_self_disable(); - layer_off(LAYER_FUNCTION); - } - break; + case MACRO_FUNCTION: + if (record->event.pressed) + { + breathing_speed_set(3); + breathing_enable(); + layer_on(LAYER_FUNCTION); + } + else + { + breathing_speed_set(1); + breathing_self_disable(); + layer_off(LAYER_FUNCTION); + } + break; #ifdef MOUSEKEY_ENABLE - case MACRO_MOUSE: - if (record->event.pressed) - { - layer_invert(LAYER_MOUSE); - } - break; + case MACRO_MOUSE: + if (record->event.pressed) + { + layer_invert(LAYER_MOUSE); + } + break; #endif /* MOUSEKEY_ENABLE */ #ifdef AUDIO_ENABLE - case MACRO_TIMBRE_1: - if (record->event.pressed) set_timbre(TIMBRE_12); - break; - - case MACRO_TIMBRE_2: - if (record->event.pressed) set_timbre(TIMBRE_25); - break; - - case MACRO_TIMBRE_3: - if (record->event.pressed) set_timbre(TIMBRE_50); - break; - - case MACRO_TIMBRE_4: - if (record->event.pressed) set_timbre(TIMBRE_75); - break; - - case MACRO_TEMPO_U: - if (record->event.pressed) increase_tempo(10); - break; - - case MACRO_TEMPO_D: - if (record->event.pressed) decrease_tempo(10); - break; - - case MACRO_TONE_DEFAULT: - if (record->event.pressed) - { - set_timbre(TIMBRE_DEFAULT); - set_tempo(TEMPO_DEFAULT); - } - break; - -/* - case MACRO_AUDIO_TOGGLE: - if (record->event.pressed) - { - if (is_audio_on()) - { - audio_off(); - } - else - { - audio_on(); - PLAY_NOTE_ARRAY(tone_audio_on, false, STACCATO); - } - } - break; - - case MACRO_MUSIC_TOGGLE: - if (record->event.pressed) - { - if (IS_LAYER_ON(LAYER_MUSIC)) - { - layer_off(LAYER_MUSIC); - stop_all_notes(); - } - else - { - PLAY_NOTE_ARRAY(tone_music_on, false, STACCATO); - layer_on(LAYER_MUSIC); - } - } - break; - case MACRO_INC_VOICE: - if (record->event.pressed) - { - #ifdef AUDIO_ENABLE - voice_iterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); - #endif - } - break; - - case MACRO_DEC_VOICE: - if (record->event.pressed) - { - #ifdef AUDIO_ENABLE - voice_deiterate(); - PLAY_NOTE_ARRAY(music_scale, false, STACCATO); - #endif - } - break; -*/ + case MACRO_TIMBRE_1: + if (record->event.pressed) set_timbre(TIMBRE_12); + break; + + case MACRO_TIMBRE_2: + if (record->event.pressed) set_timbre(TIMBRE_25); + break; + + case MACRO_TIMBRE_3: + if (record->event.pressed) set_timbre(TIMBRE_50); + break; + + case MACRO_TIMBRE_4: + if (record->event.pressed) set_timbre(TIMBRE_75); + break; + + case MACRO_TEMPO_U: + if (record->event.pressed) increase_tempo(10); + break; + + case MACRO_TEMPO_D: + if (record->event.pressed) decrease_tempo(10); + break; + + case MACRO_TONE_DEFAULT: + if (record->event.pressed) + { + set_timbre(TIMBRE_DEFAULT); + set_tempo(TEMPO_DEFAULT); + } + break; #endif /* AUDIO_ENABLE */ #ifdef BACKLIGHT_ENABLE - case MACRO_BACKLIGHT: - if (record->event.pressed) - { - backlight_step(); - } -#endif + case MACRO_BACKLIGHT: + if (record->event.pressed) + { + backlight_step(); + } + break; +#endif /* BACKLIGHT_ENABLE */ - default: - break; + default: + break; - } - return MACRO_NONE; +} +return MACRO_NONE; }; - #ifdef AUDIO_ENABLE void matrix_init_user(void) { - set_voice(default_voice); - startup_user(); - println("Matrix Init"); + set_voice(default_voice); + startup_user(); + println("Matrix Init"); } void led_set_user(uint8_t usb_led) { - static uint8_t old_usb_led = 0; + static uint8_t old_usb_led = 0; - _delay_ms(10); // gets rid of tick + _delay_ms(10); // gets rid of tick - if (!is_playing_notes()) + if (!is_playing_notes()) + { + if ((usb_led & (1< Date: Tue, 6 Sep 2016 22:09:40 +0100 Subject: added a toggle between Mac and Windows base layers (with swapped cmd and ctrl) --- keyboards/planck/keymaps/callum/keymap.c | 59 ++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 11 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 6c3431133..b47f8eb05 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -11,13 +11,15 @@ extern keymap_config_t keymap_config; // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _BASE 0 -#define _MOVE 1 -#define _SYMB 2 -#define _FUNC 3 +#define _MAC 0 +#define _WIN 1 +#define _MOVE 2 +#define _SYMB 3 +#define _FUNC 4 enum planck_keycodes { - BASE = SAFE_RANGE, + MAC = SAFE_RANGE, + WIN, MOVE, SYMB, FUNC, @@ -30,7 +32,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE +/* BASE Mac * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+-------------+------+------+------+------+------| @@ -41,13 +43,31 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | * `-----------------------------------------------------------------------------------' */ -[_BASE] = { +[_MAC] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} }, +/* BASE Windows + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * |------+------+------+------+------+-------------+------+------+------+------+------| + * | Bksp | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------|------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | Ctrl | Alt | GUI |Caps | + * `-----------------------------------------------------------------------------------' + */ +[_WIN] = { + {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, + {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, + {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, + {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_RALT, KC_RGUI, KC_CAPS} +}, + /* MOVE * ,-----------------------------------------------------------------------------------. * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | @@ -88,24 +108,41 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |-----------------------------------------------------------------------------------. - * | | Play | Prev | Next | BL+ | | | Lock | | | | | + * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | | | | | | + * | | Mute | Vol- | Vol+ | BL- | | | | | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | |Reset | * `-----------------------------------------------------------------------------------' */ [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, _______, _______}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, _______, _______}, + {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, MAC, _______}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, WIN, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } }; +void persistant_default_layer_set(uint16_t default_layer) { + eeconfig_update_default_layer(default_layer); + default_layer_set(default_layer); +} + bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { + case MAC: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_MAC); + } + return false; + break; + case WIN: + if (record->event.pressed) { + persistant_default_layer_set(1UL<<_WIN); + } + return false; + break; case MOVE: if (record->event.pressed) { layer_on(_MOVE); -- cgit v1.2.3 From b51f51c614e2bcd64202811510719f25345cb1ce Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:19:11 +0100 Subject: added close key for alt-f4 macro --- keyboards/planck/keymaps/callum/keymap.c | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index b47f8eb05..56808aa8c 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -23,7 +23,8 @@ enum planck_keycodes { MOVE, SYMB, FUNC, - LOCK + LOCK, + CLOSE }; // Fillers to make layering more clear @@ -110,7 +111,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |-----------------------------------------------------------------------------------. * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | | | | Win | | + * | | Mute | Vol- | Vol+ | BL- | | |Close | | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | |Reset | * `-----------------------------------------------------------------------------------' @@ -118,7 +119,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, MAC, _______}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, _______, _______, _______, WIN, _______}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, CLOSE, _______, _______, WIN, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } @@ -183,6 +184,16 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case CLOSE: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_F4); + } else { + unregister_code(KC_F4); + unregister_code(KC_LALT); + } + return false; + break; } return true; } -- cgit v1.2.3 From 6ad8a06c734caa378296d0cfe335feda7457ed61 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:47:11 +0100 Subject: updated readme --- keyboards/planck/keymaps/callum/keymap.c | 30 ++++++------ keyboards/planck/keymaps/callum/readme.md | 81 ++++++++++++++++++++++++++----- 2 files changed, 83 insertions(+), 28 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 56808aa8c..f5a816f4e 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -39,9 +39,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | Ctrl | Alt | GUI | Symb |Enter |Space | Move | GUI | Alt | Ctrl |Caps | + * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | * `-----------------------------------------------------------------------------------' */ [_MAC] = { @@ -57,9 +57,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+-------------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / |Shift | + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | GUI | Alt | Ctrl | Symb |Enter |Space | Move | Ctrl | Alt | GUI |Caps | + * | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | * `-----------------------------------------------------------------------------------' */ [_WIN] = { @@ -71,11 +71,11 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | * |------+------+------+------+------+-------------+------+------+------+------+------| - * | Del | | Left | Down |Right | | | Left | Down |Right | | Del | + * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | | |Pg Up |Pg Dn | | |Pg Dn |Pg Up | | | | + * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -89,9 +89,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SYMB * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | - * |-----------------------------------------------------------------------------------. - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + * |-----------------------------------------------------------------------------------| + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | * |------+------+------+------+------+-------------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -107,13 +107,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FUNC * ,-----------------------------------------------------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | - * |-----------------------------------------------------------------------------------. - * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | + * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * |-----------------------------------------------------------------------------------| + * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | * |------+------+------+------+------+------|------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | |Close | | | Win | | + * | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | |Reset | + * | | | | | | | | | | | | Reset| * `-----------------------------------------------------------------------------------' */ [_FUNC] = { diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index b70de3f1e..812590765 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -6,38 +6,93 @@ This is a layout for the grid planck, built with a few ideals in mind: - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. - Backspace should be in the “capslock position” in the colemak tradition. +- The keyboard should be usable on any operating system without software changes. For me this means being able to swap the `GUI` key and `Ctrl` key in firmware so that `Cmd-z,x,c,v,…` becomes `Ctrl-z,x,c,v,…` when swapping from macOS to Windows. -We have four layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. +We have four layers. A `BASE` layer (which is either `BASE Mac` or `BASE Windows`), in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. ## The `BASE` layer -![](http://i.imgur.com/tVNI3SE.png) - -This is the default layer; in [colemak](https://colemak.com). `esc` and `del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. - -The `MOVE` and `SYMB` layers are reached by holding down the `move` and `symb` keys respectively. The `FUNC` layer is reached by holding down both the `move` and `symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. +For Mac +``` +,-----------------------------------------------------------------------------------. +| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Bksp | A | R | S | T | D | H | N | E | I | O | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | +`-----------------------------------------------------------------------------------' +``` + +For Windows +``` + ,-----------------------------------------------------------------------------------. +| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | +|------+------+------+------+-------+-------------+------+------+------+------+------| +| Bksp | A | R | S | T | D | H | N | E | I | O | " | +|------+------+------+------+------+------|------+------+------+------+------+------| +| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| +|------+------+------+------+------+------+------+------+------+------+------+------| +| Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | +`-----------------------------------------------------------------------------------' +``` + +One of the two above layers is set as the default layer at any one time; see `FUNC`. The basic layout is [colemak](https://colemak.com). `Esc` and `Del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `Caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `Enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. + +The `MOVE` and `SYMB` layers are reached by holding down the `Move` and `Symb` keys respectively. The `FUNC` layer is reached by holding down both the `Move` and `Symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. ## The `MOVE` layer -![](http://i.imgur.com/KXRSuHT.png) +``` +,-----------------------------------------------------------------------------------. +| Esc | | Home | Up | End | | | Home | Up | End | | Esc | +|------+------+------+------+------+-------------+------+------+------+------+------| +| Del | | Left | Down | Right| | | Left | Down | Right| | Del | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` This is fairly self explanatory. I almost exclusively use the right hand cluster so that movement is a one handed affair, but the left hand cluster is there if it’s needed. -On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `home` and `end` jump you to the beginning and end of the line respectively and so that `pg up` and `pg dn` move the cursor instead of just scrolling. +On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `Home` and `End` jump you to the beginning and end of the line respectively and so that `Pg Up` and `Pg Dn` move the cursor instead of just scrolling. None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected. ## The `SYMB` layer -![](http://i.imgur.com/thh1ne2.png) +``` +,-----------------------------------------------------------------------------------. +| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | +|-----------------------------------------------------------------------------------| +| Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | +|------+------+------+------+------+-------------+------+------+------+------+------| +| | ~ | ` | + | = | | | \ | [ | ] | { | } | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | | +`-----------------------------------------------------------------------------------' +``` The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers. -`esc` and `del` are repeated here since I wanted to be able to reach either, one handed, with either hand. +`Esc` and `Del` are repeated here since I wanted to be able to reach either, one handed, with either hand. Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected. ## The `FUNC` layer -![](http://i.imgur.com/1VKFBBU.png) - -The only things of note here are that `bl+` and `bl-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. And that `lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) +``` +,-----------------------------------------------------------------------------------. +| F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | +|-----------------------------------------------------------------------------------| +| | Play | Prev | Next | BL+ | | | Lock | | | Mac | | +|------+------+------+------+------+------|------+------+------+------+------+------| +| | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | +|------+------+------+------+------+------+------+------+------+------+------+------| +| | | | | | | | | | | | Reset| +`-----------------------------------------------------------------------------------' +``` + +`BL+` and `BL-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. `Lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) `Close` sends `alt-f4` to make that shortcut easier to reach. `Mac` and `Win` set the default layer to the Mac and Windows `BASE` layers respecitevly. ## Other changes from the default I have LEDs and sound disabled, simply because I have no need of them. -- cgit v1.2.3 From ff09695897c4bdd705347e6427077e406413c26d Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:52:55 +0100 Subject: Update readme.md --- keyboards/planck/keymaps/callum/readme.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 812590765..2e59c00d6 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -26,9 +26,9 @@ For Mac For Windows ``` - ,-----------------------------------------------------------------------------------. +,-----------------------------------------------------------------------------------. | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+-------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Bksp | A | R | S | T | D | H | N | E | I | O | " | |------+------+------+------+------+------|------+------+------+------+------+------| | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| -- cgit v1.2.3 From c593564acab7a0b1cca2c90bd0b1ffd9def59f05 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:55:27 +0100 Subject: Update readme.md --- keyboards/planck/keymaps/callum/readme.md | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 2e59c00d6..7a771130a 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -15,9 +15,9 @@ For Mac ``` ,-----------------------------------------------------------------------------------. | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| |------+------+------+------+------+------+------+------+------+------+------+------| | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | @@ -30,7 +30,7 @@ For Windows | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | |------+------+------+------+------+------+------+------+------+------+------+------| | Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| |------+------+------+------+------+------+------+------+------+------+------+------| | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | @@ -45,9 +45,9 @@ The `MOVE` and `SYMB` layers are reached by holding down the `Move` and `Symb` k ``` ,-----------------------------------------------------------------------------------. | Esc | | Home | Up | End | | | Home | Up | End | | Esc | -|------+------+------+------+------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Del | | Left | Down | Right| | | Left | Down | Right| | Del | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | | @@ -64,9 +64,9 @@ None of the modifiers are overwritten so that `shift-alt-arrows` etc work as exp ``` ,-----------------------------------------------------------------------------------. | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | -|-----------------------------------------------------------------------------------| +|------+------+------+------+------+------+------+------+------+------+------+------| | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | -|------+------+------+------+------+-------------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | ~ | ` | + | = | | | \ | [ | ] | { | } | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | | @@ -83,9 +83,9 @@ Again none of the modifiers are overwritten so that shortcuts involving numbers ``` ,-----------------------------------------------------------------------------------. | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | -|-----------------------------------------------------------------------------------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | -|------+------+------+------+------+------|------+------+------+------+------+------| +|------+------+------+------+------+------+------+------+------+------+------+------| | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | |------+------+------+------+------+------+------+------+------+------+------+------| | | | | | | | | | | | | Reset| -- cgit v1.2.3 From b2ecd296ae0dc366717fae8a6abb25c0639d6a43 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Tue, 6 Sep 2016 22:59:36 +0100 Subject: fixed comments --- keyboards/planck/keymaps/callum/keymap.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index f5a816f4e..751af9eb9 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -36,9 +36,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE Mac * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | @@ -54,9 +54,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* BASE Windows * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Bksp | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| * | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | @@ -72,9 +72,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | @@ -90,9 +90,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SYMB * ,-----------------------------------------------------------------------------------. * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | - * |-----------------------------------------------------------------------------------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | - * |------+------+------+------+------+-------------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | @@ -108,9 +108,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* FUNC * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | - * |-----------------------------------------------------------------------------------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | - * |------+------+------+------+------+------|------+------+------+------+------+------| + * |------+------+------+------+------+------+------+------+------+------+------+------| * | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | Reset| -- cgit v1.2.3 From 02635e5924ea5f3b1e970e115407f62c916c4476 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 7 Sep 2016 20:45:23 +0100 Subject: changed RALT to LALT on Windows --- keyboards/planck/keymaps/callum/keymap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 751af9eb9..5754b1772 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -66,7 +66,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_RALT, KC_RGUI, KC_CAPS} + {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_LALT, KC_RGUI, KC_CAPS} }, /* MOVE -- cgit v1.2.3 From fa2724360b831fffd3745bfe7b3ef50910b9132b Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 28 Sep 2016 08:04:38 +0100 Subject: removed windows layer and updated brightness keys for macOS Sierra --- keyboards/planck/keymaps/callum/keymap.c | 90 +++++--------------------------- 1 file changed, 14 insertions(+), 76 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 5754b1772..0ac1906ba 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -11,20 +11,15 @@ extern keymap_config_t keymap_config; // The underscores don't mean anything - you can have a layer called STUFF or any other name. // Layer names don't all need to be of the same length, obviously, and you can also skip them // entirely and just use numbers. -#define _MAC 0 -#define _WIN 1 -#define _MOVE 2 -#define _SYMB 3 -#define _FUNC 4 +#define _BASE 0 +#define _MOVE 1 +#define _SYMB 2 +#define _FUNC 3 enum planck_keycodes { - MAC = SAFE_RANGE, - WIN, MOVE, SYMB, - FUNC, - LOCK, - CLOSE + FUNC }; // Fillers to make layering more clear @@ -33,7 +28,7 @@ enum planck_keycodes { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { -/* BASE Mac +/* BASE * ,-----------------------------------------------------------------------------------. * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -44,31 +39,13 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | * `-----------------------------------------------------------------------------------' */ -[_MAC] = { +[_BASE] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} }, -/* BASE Windows - * ,-----------------------------------------------------------------------------------. - * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Bksp | A | R | S | T | D | H | N | E | I | O | " | - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| - * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | - * `-----------------------------------------------------------------------------------' - */ -[_WIN] = { - {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, - {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, - {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LGUI, KC_LALT, KC_LCTL, SYMB, KC_ENT, KC_SPC, MOVE, KC_RCTL, KC_LALT, KC_RGUI, KC_CAPS} -}, - /* MOVE * ,-----------------------------------------------------------------------------------. * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | @@ -81,9 +58,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, _______, KC_HOME, KC_UP, KC_END, _______, _______, KC_HOME, KC_UP, KC_END, _______, KC_ESC}, - {KC_DEL, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, _______, KC_LEFT, KC_DOWN, KC_RGHT, _______, KC_DEL}, - {_______, _______, _______, KC_PGUP, KC_PGDN, _______, _______, KC_PGDN, KC_PGUP, _______, _______, _______}, + {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC}, + {KC_DEL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_DEL}, + {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, @@ -109,41 +86,24 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * ,-----------------------------------------------------------------------------------. * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Play | Prev | Next | BL+ | | | Lock | | | Mac | | + * | | Play | Prev | Next | BL+ | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | + * | | Mute | Vol- | Vol+ | BL- | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | Reset| * `-----------------------------------------------------------------------------------' */ [_FUNC] = { {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {_______, KC_MPLY, KC_MPRV, KC_MNXT, KC_PAUS, _______, _______, LOCK, _______, _______, MAC, _______}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_SLCK, _______, _______, CLOSE, _______, _______, WIN, _______}, + {XXXXXXX, KC_MPLY, KC_MPRV, KC_MNXT, KC_F15, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, + {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } } }; -void persistant_default_layer_set(uint16_t default_layer) { - eeconfig_update_default_layer(default_layer); - default_layer_set(default_layer); -} - bool process_record_user(uint16_t keycode, keyrecord_t *record) { switch (keycode) { - case MAC: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_MAC); - } - return false; - break; - case WIN: - if (record->event.pressed) { - persistant_default_layer_set(1UL<<_WIN); - } - return false; - break; case MOVE: if (record->event.pressed) { layer_on(_MOVE); @@ -172,28 +132,6 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; - case LOCK: - if (record->event.pressed) { - register_code(KC_RSFT); - register_code(KC_RCTL); - register_code(KC_POWER); - } else { - unregister_code(KC_POWER); - unregister_code(KC_RCTL); - unregister_code(KC_RSFT); - } - return false; - break; - case CLOSE: - if (record->event.pressed) { - register_code(KC_LALT); - register_code(KC_F4); - } else { - unregister_code(KC_F4); - unregister_code(KC_LALT); - } - return false; - break; } return true; } -- cgit v1.2.3 From c762ea975a4c66da484b4cd4879e41c1457d854a Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Wed, 28 Sep 2016 23:15:35 +0100 Subject: big restructure now I only have to consider macOS, also added mouse, more function keys, and some neat macros --- keyboards/planck/keymaps/callum/keymap.c | 139 ++++++++++++++++++++++++++----- 1 file changed, 116 insertions(+), 23 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 0ac1906ba..38c362fcb 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -14,12 +14,19 @@ extern keymap_config_t keymap_config; #define _BASE 0 #define _MOVE 1 #define _SYMB 2 -#define _FUNC 3 +#define _MOUSE 3 +#define _FUNC 4 enum planck_keycodes { - MOVE, + MOVE = SAFE_RANGE, SYMB, - FUNC + FUNC, + CMDLEFT, + CMDRGHT, + BELOW, + ABOVE, + VOLUP, + VOLDN }; // Fillers to make layering more clear @@ -36,14 +43,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | + * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func | * `-----------------------------------------------------------------------------------' */ [_BASE] = { {KC_TAB, KC_Q, KC_W, KC_F, KC_P, KC_G, KC_J, KC_L, KC_U, KC_Y, KC_SCLN, KC_MINS}, {KC_BSPC, KC_A, KC_R, KC_S, KC_T, KC_D, KC_H, KC_N, KC_E, KC_I, KC_O, KC_QUOT}, {KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_K, KC_M, KC_COMM, KC_DOT, KC_SLSH, KC_RSFT}, - {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, KC_CAPS} + {FUNC, KC_LCTL, KC_LALT, KC_LGUI, SYMB, KC_ENT, KC_SPC, MOVE, KC_RGUI, KC_RALT, KC_RCTL, FUNC } }, /* MOVE @@ -52,16 +59,16 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | + * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | | | | Below| | | | | | | * `-----------------------------------------------------------------------------------' */ [_MOVE] = { - {KC_ESC, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, XXXXXXX, KC_HOME, KC_UP, KC_END, XXXXXXX, KC_ESC}, - {KC_DEL, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, KC_DEL}, - {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, XXXXXXX, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} + {KC_ESC, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, XXXXXXX, CMDLEFT, KC_UP, CMDRGHT, XXXXXXX, KC_ESC }, + {KC_DEL, KC_CAPS, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_CAPS, KC_DEL }, + {_______, XXXXXXX, XXXXXXX, KC_PGUP, KC_PGDN, ABOVE, XXXXXXX, KC_PGDN, KC_PGUP, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, BELOW, _______, _______, _______, _______, _______, _______} }, /* SYMB @@ -82,22 +89,40 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, +/* MOUSE + * ,-----------------------------------------------------------------------------------. + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ +[_MOUSE] = { + {XXXXXXX, XXXXXXX, KC_ACL2, KC_ACL1, KC_ACL0, XXXXXXX, XXXXXXX, KC_WH_L, KC_MS_U, KC_WH_R, XXXXXXX, XXXXXXX}, + {XXXXXXX, XXXXXXX, KC_BTN3, KC_BTN2, KC_BTN1, XXXXXXX, XXXXXXX, KC_MS_L, KC_MS_D, KC_MS_R, XXXXXXX, XXXXXXX}, + {_______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, KC_WH_D, KC_WH_U, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} +}, + /* FUNC * ,-----------------------------------------------------------------------------------. - * | F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Play | Prev | Next | BL+ | | | | | | | | + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | Mute | Vol- | Vol+ | BL- | | | | | | | | + * | | F21 | F22 | F23 | F24 | | | | | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | Reset| + * | | | | | Prev | Mute | Play | Next | | | | | * `-----------------------------------------------------------------------------------' */ [_FUNC] = { - {KC_F12, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11 }, - {XXXXXXX, KC_MPLY, KC_MPRV, KC_MNXT, KC_F15, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX}, - {_______, KC_MUTE, KC_VOLD, KC_VOLU, KC_F14, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, - {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, RESET } + {RESET, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_F7, KC_F8, KC_F9, KC_F10, VOLUP }, + {XXXXXXX, KC_F11, KC_F12, KC_F13, KC_F14, KC_F15, KC_F16, KC_F17, KC_F18, KC_F19, KC_F20, VOLDN }, + {_______, KC_F21, KC_F22, KC_F23, KC_F24, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, _______}, + {_______, _______, _______, _______, KC_MPRV, KC_MUTE, KC_MPLY, KC_MNXT, _______, _______, _______, _______} } }; @@ -107,20 +132,20 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { case MOVE: if (record->event.pressed) { layer_on(_MOVE); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } else { layer_off(_MOVE); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } return false; break; case SYMB: if (record->event.pressed) { layer_on(_SYMB); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } else { layer_off(_SYMB); - update_tri_layer(_MOVE, _SYMB, _FUNC); + update_tri_layer(_MOVE, _SYMB, _MOUSE); } return false; break; @@ -132,6 +157,74 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case CMDLEFT: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_LEFT); + } else { + unregister_code(KC_LEFT); + unregister_code(KC_LGUI); + } + return false; + break; + case CMDRGHT: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_RGHT); + } else { + unregister_code(KC_RGHT); + unregister_code(KC_LGUI); + } + return false; + break; + case BELOW: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_RGHT); + unregister_code(KC_RGHT); + unregister_code(KC_LGUI); + register_code(KC_ENT); + unregister_code(KC_ENT); + } + return false; + break; + case ABOVE: + if (record->event.pressed) { + register_code(KC_LGUI); + register_code(KC_LEFT); + unregister_code(KC_LEFT); + unregister_code(KC_LGUI); + register_code(KC_ENT); + unregister_code(KC_ENT); + register_code(KC_UP); + unregister_code(KC_UP); + } + return false; + break; + case VOLUP: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_LSFT); + register_code(KC_VOLU); + } else { + unregister_code(KC_VOLU); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + } + return false; + break; + case VOLDN: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_LSFT); + register_code(KC_VOLD); + } else { + unregister_code(KC_VOLD); + unregister_code(KC_LSFT); + unregister_code(KC_LALT); + } + return false; + break; } return true; } -- cgit v1.2.3 From 2f07ad8e8a3e69eb90488bcac0540fd81448e3d0 Mon Sep 17 00:00:00 2001 From: Callum Oakley Date: Thu, 29 Sep 2016 07:47:30 +0100 Subject: added en-dash and gbp keys and updated readme --- keyboards/planck/keymaps/callum/keymap.c | 38 ++++++-- keyboards/planck/keymaps/callum/readme.md | 149 ++++++++++++------------------ 2 files changed, 91 insertions(+), 96 deletions(-) (limited to 'keyboards') diff --git a/keyboards/planck/keymaps/callum/keymap.c b/keyboards/planck/keymaps/callum/keymap.c index 38c362fcb..82ba83f4e 100644 --- a/keyboards/planck/keymaps/callum/keymap.c +++ b/keyboards/planck/keymaps/callum/keymap.c @@ -25,6 +25,8 @@ enum planck_keycodes { CMDRGHT, BELOW, ABOVE, + DASH, + GBP, VOLUP, VOLDN }; @@ -55,7 +57,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* MOVE * ,-----------------------------------------------------------------------------------. - * | Esc | | Home | Up | End | | | Home | Up | End | | Esc | + * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | * |------+------+------+------+------+------+------+------+------+------+------+------| * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -73,9 +75,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { /* SYMB * ,-----------------------------------------------------------------------------------. - * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | – | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | * |------+------+------+------+------+------+------+------+------+------+------+------| @@ -83,19 +85,19 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { * `-----------------------------------------------------------------------------------' */ [_SYMB] = { - {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_ESC }, - {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_DEL }, + {KC_ESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, DASH }, + {KC_DEL, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, GBP }, {_______, KC_TILD, KC_GRV, KC_PLUS, KC_EQL, KC_PIPE, KC_BSLS, KC_LBRC, KC_RBRC, KC_LCBR, KC_RCBR, _______}, {_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______} }, /* MOUSE * ,-----------------------------------------------------------------------------------. - * | | | | | | | | | | | | | + * | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | | * |------+------+------+------+------+------+------+------+------+------+------+------| - * | | | | | | | | | | | | | + * | | | | | | | | SW-D | SW-U | | | | * |------+------+------+------+------+------+------+------+------+------+------+------| * | | | | | | | | | | | | | * `-----------------------------------------------------------------------------------' @@ -201,6 +203,26 @@ bool process_record_user(uint16_t keycode, keyrecord_t *record) { } return false; break; + case DASH: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_MINS); + } else { + unregister_code(KC_MINS); + unregister_code(KC_LALT); + } + return false; + break; + case GBP: + if (record->event.pressed) { + register_code(KC_LALT); + register_code(KC_3); + } else { + unregister_code(KC_3); + unregister_code(KC_LALT); + } + return false; + break; case VOLUP: if (record->event.pressed) { register_code(KC_LALT); diff --git a/keyboards/planck/keymaps/callum/readme.md b/keyboards/planck/keymaps/callum/readme.md index 7a771130a..b5997cd5a 100644 --- a/keyboards/planck/keymaps/callum/readme.md +++ b/keyboards/planck/keymaps/callum/readme.md @@ -2,97 +2,70 @@ This is a layout for the grid planck, built with a few ideals in mind: -- Minimal response times should be maintained. i.e. keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided — they inevitably send their keycode later than a normal key, interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording. +- Minimal response times should be maintained. Keys that react differently depending on whether they are tapped or held, keys that react differently if they are double tapped, etc. should be avoided – they inevitably send their keycode later than a normal key – interrupting the immediate feedback from the screen. Therefore we restrict ourselves to chording as our only means of getting more than one symbol out of a single physical key. - The hands should never need to leave the home position. The usual culprit for this is the arrow cluster, so the arrow cluster should be as close to home as possible. - There should be two of every modifier (one on each side), otherwise certain long key combinations become hard to make. -- Backspace should be in the “capslock position” in the colemak tradition. -- The keyboard should be usable on any operating system without software changes. For me this means being able to swap the `GUI` key and `Ctrl` key in firmware so that `Cmd-z,x,c,v,…` becomes `Ctrl-z,x,c,v,…` when swapping from macOS to Windows. -We have four layers. A `BASE` layer (which is either `BASE Mac` or `BASE Windows`), in colemak; a `MOVE` layer, with an arrow cluster etc, a `SYMB` layer, with numbers and symbols; and a `FUNC` layer, with function keys and media keys. +We have five layers. A `BASE` layer, in colemak; a `MOVE` layer, with an arrow cluster and other movement keys; a `SYMB` layer, with numbers and symbols; a `FUNC` layer, with function keys and media keys; and a `MOUSE` layer, with mouse emulation. -## The `BASE` layer -For Mac ``` -,-----------------------------------------------------------------------------------. -| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| -|------+------+------+------+------+------+------+------+------+------+------+------| -| Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Caps | -`-----------------------------------------------------------------------------------' +/* BASE + * ,-----------------------------------------------------------------------------------. + * | Tab | Q | W | F | P | G | J | L | U | Y | ; | - | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Bksp | A | R | S | T | D | H | N | E | I | O | " | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Shift| Z | X | C | V | B | K | M | , | . | / | Shift| + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Func | Ctrl | Alt | Cmd | Symb | Enter| Space| Move | Cmd | Alt | Ctrl | Func | + * `-----------------------------------------------------------------------------------' + */ + +/* MOVE + * ,-----------------------------------------------------------------------------------. + * | Esc | | Cmd-L| Up | Cmd-R| | | Cmd-L| Up | Cmd-R| | Esc | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | | Left | Down | Right| | | Left | Down | Right| | Del | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | Pg Up| Pg Dn| Above| | Pg Dn| Pg Up| | Caps | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | Below| | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +/* SYMB + * ,-----------------------------------------------------------------------------------. + * | Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | – | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | £ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | ~ | ` | + | = | | | \ | [ | ] | { | } | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +/* MOUSE + * ,-----------------------------------------------------------------------------------. + * | | | ACC-2| ACC-1| ACC-0| | | SW-L | M-U | SW-R | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | MB-3 | MB-2 | MB-1 | | | M-L | M-D | M-R | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | SW-D | SW-U | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | | | | | | | | | + * `-----------------------------------------------------------------------------------' + */ + +/* FUNC + * ,-----------------------------------------------------------------------------------. + * | Reset| F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | Vol+ | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F11 | F12 | F13 | F14 | F15 | F16 | F17 | F18 | F19 | F20 | Vol- | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | F21 | F22 | F23 | F24 | | | | | | | | + * |------+------+------+------+------+------+------+------+------+------+------+------| + * | | | | | Prev | Mute | Play | Next | | | | | + * `-----------------------------------------------------------------------------------' + */ ``` - -For Windows -``` -,-----------------------------------------------------------------------------------. -| Tab | Q | W | F | P | G | J | L | U | Y | ; | - | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Bksp | A | R | S | T | D | H | N | E | I | O | " | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Shift| Z | X | C | V | B | K | M | , | . | / | Shift| -|------+------+------+------+------+------+------+------+------+------+------+------| -| Func | Win | Alt | Ctrl | Symb | Enter| Space| Move | Ctrl | Alt | Win | Caps | -`-----------------------------------------------------------------------------------' -``` - -One of the two above layers is set as the default layer at any one time; see `FUNC`. The basic layout is [colemak](https://colemak.com). `Esc` and `Del` are conspicuously absent but are especially easy to reach from either of the other main layers (see below). The `backspace` location is standard colemak. The `Caps` key is still on the `BASE` layer but only because I don’t really use the bottom corners so there’s nothing else I would rather put there. Having `Enter` on a thumb means I can still have `quote` immediately to the right of `O`, something that would have annoyed me endlessly otherwise. `minus` is in the upper right because I had an extra space and it’s probably my next most used key that didn’t yet have a home. - -The `MOVE` and `SYMB` layers are reached by holding down the `Move` and `Symb` keys respectively. The `FUNC` layer is reached by holding down both the `Move` and `Symb` keys simultaneously, *or* by holding down the `fn` key. The intended use is that whenever both hands are on the keyboard, the former method is used, and the latter is only used when, for example, reaching over to the keyboard with one hand to access the media controls. - -## The `MOVE` layer -``` -,-----------------------------------------------------------------------------------. -| Esc | | Home | Up | End | | | Home | Up | End | | Esc | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Del | | Left | Down | Right| | | Left | Down | Right| | Del | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | Pg Up| Pg Dn| | | Pg Dn| Pg Up| | | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------' -``` - -This is fairly self explanatory. I almost exclusively use the right hand cluster so that movement is a one handed affair, but the left hand cluster is there if it’s needed. - -On *macOS* I recommend using [Karabiner](https://pqrs.org/osx/karabiner/) and ticking *Use PC Style Home/End #2* and *Use PC Style PageUp/PageDown* so that `Home` and `End` jump you to the beginning and end of the line respectively and so that `Pg Up` and `Pg Dn` move the cursor instead of just scrolling. - -None of the modifiers are overwritten so that `shift-alt-arrows` etc work as expected. - -## The `SYMB` layer -``` -,-----------------------------------------------------------------------------------. -| Esc | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 0 | Esc | -|------+------+------+------+------+------+------+------+------+------+------+------| -| Del | ! | @ | # | $ | % | ^ | & | * | ( | ) | Del | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | ~ | ` | + | = | | | \ | [ | ] | { | } | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | | -`-----------------------------------------------------------------------------------' -``` - -The symbol layer has all the numbers and their usual corresponding symbols in the first two rows, with the symbols on the home row since I use them more frequently than the numbers. The third row contains all the remaining symbols, arranged roughly so that the most used symbols are accessible with the strongest fingers. - -`Esc` and `Del` are repeated here since I wanted to be able to reach either, one handed, with either hand. - -Again none of the modifiers are overwritten so that shortcuts involving numbers or symbols work as expected. - -## The `FUNC` layer -``` -,-----------------------------------------------------------------------------------. -| F12 | F1 | F2 | F3 | F4 | F5 | F6 | F7 | F8 | F9 | F10 | F11 | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | Play | Prev | Next | BL+ | | | Lock | | | Mac | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | Mute | Vol- | Vol+ | BL- | | | Close| | | Win | | -|------+------+------+------+------+------+------+------+------+------+------+------| -| | | | | | | | | | | | Reset| -`-----------------------------------------------------------------------------------' -``` - -`BL+` and `BL-` are short for *backlight up* and *backlight down*, and in firmware are actually `KC_PAUS` and `KC_SLCK` respectively, since *macOS* interprets these as the backlight keys. `Lock` is currently a macro hard coded to turn off the screen on *macOS*. (By activating the shortcut `shift-ctrl-power`.) `Close` sends `alt-f4` to make that shortcut easier to reach. `Mac` and `Win` set the default layer to the Mac and Windows `BASE` layers respecitevly. - -## Other changes from the default -I have LEDs and sound disabled, simply because I have no need of them. -- cgit v1.2.3