Merge pull request #6 from jackhumbert/master

Merge from jackhumbert
master
Damien 2016-09-29 22:59:31 +02:00 committed by GitHub
commit eb0f21a984
15 changed files with 795 additions and 560 deletions

View File

@ -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;
};

View File

@ -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.

View File

@ -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
}

View File

@ -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

View File

@ -65,10 +65,11 @@
*/
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 */
};
enum macro_id {
@ -76,37 +77,60 @@ 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)
#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)
#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 */
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, MO(_LW), KC_SPC, KC_SPC, MO(_RS), KC_LEFT, KC_DOWN, KC_UP, KC_RGHT}
{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, 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 */
},
[_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, QWERTY, KEYPAD, 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, QWERTY, KEYPAD, KEYPAD, RESET, _______},
{_______, KEYPAD, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY}
},
[_KEYPAD] = { /* Key Pad */
{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},
{KC_TAB, KC_LALT, ROT_LED, KC_LGUI, M_LOWER, KC_SPC, KC_SPC, QWERTY, KC_LEFT, KC_DOWN, KC_UP, KC_RIGHT}
},
[_KP] = { /* 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}
}
[_ADJUST] = { /* Adjustments - gonna shift the wild tools in here */
{ROT_LED,USERNAME,MVERSION, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{_______, RANDDIG, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ },
{_______, RANDALP, _______, _______, _______, RESET, RESET, _______, _______, _______, _______, _______ },
{_______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______, _______ }
}
};
/* What is fn_actions actually used for??? */
@ -171,6 +195,39 @@ 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(_RAISE);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_RAISE);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
case MACRO_LOWER:
if (record->event.pressed)
{
layer_on(_LOWER);
#ifdef BACKLIGHT_ENABLE
breathing_speed_set(2);
breathing_pulse();
#endif
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
else
{
layer_off(_LOWER);
update_tri_layer(_LOWER, _RAISE, _ADJUST);
}
break;
}
return MACRO_NONE;
};

View File

@ -24,7 +24,26 @@ 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"
- 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
---------------------------------------------------
@ -43,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
---------------------------------------------------------
@ -57,12 +76,27 @@ 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 +111,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"

View File

@ -26,10 +26,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
/* 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 <http://www.gnu.org/licenses/>.
*/
/* 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

View File

@ -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

View File

@ -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

File diff suppressed because it is too large Load Diff

View File

@ -139,28 +139,29 @@
// Changable Row Macro
#define KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, \
#define _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C \
) \
KEYMAP_ROW_LEFT_ ## LEFT_TYPE(k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C), KEYMAP_ROW_RIGHT_ ## RIGHT_TYPE(k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C)
KEYMAP_ROW_LEFT_ ## _LEFT_TYPE( k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C ), \
KEYMAP_ROW_RIGHT_ ## _RIGHT_TYPE( k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C )
// Changable Master Macro
#define KEYMAP_MASTER(LEFT_TYPE, RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C, \
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 \
#define KEYMAP_MASTER(_MATRIX_LAYER, _LEFT_TYPE, _RIGHT_TYPE, \
k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C, \
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 \
) \
{ \
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\
{ KEYMAP_ROW(LEFT_TYPE, RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\
[_MATRIX_LAYER] = { \
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k001, k002, k003, k004, k005, k006, k007, k008, k009, k00A, k00B, k00C, k011, k012, k013, k014, k015, k016, k017, k018, k019, k01A, k01B, k01C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k101, k102, k103, k104, k105, k106, k107, k108, k109, k10A, k10B, k10C, k111, k112, k113, k114, k115, k116, k117, k118, k119, k11A, k11B, k11C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k201, k202, k203, k204, k205, k206, k207, k208, k209, k20A, k20B, k20C, k211, k212, k213, k214, k215, k216, k217, k218, k219, k21A, k21B, k21C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k301, k302, k303, k304, k305, k306, k307, k308, k309, k30A, k30B, k30C, k311, k312, k313, k314, k315, k316, k317, k318, k319, k31A, k31B, k31C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k401, k402, k403, k404, k405, k406, k407, k408, k409, k40A, k40B, k40C, k411, k412, k413, k414, k415, k416, k417, k418, k419, k41A, k41B, k41C ) },\
{ _KEYMAP_ROW( _LEFT_TYPE, _RIGHT_TYPE, k501, k502, k503, k504, k505, k506, k507, k508, k509, k50A, k50B, k50C, k511, k512, k513, k514, k515, k516, k517, k518, k519, k51A, k51B, k51C ) },\
}

View File

@ -63,7 +63,7 @@ COMMAND_ENABLE ?= yes # Commands for debug and configuration
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
BACKLIGHT_ENABLE ?= yes # 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

View File

@ -24,5 +24,45 @@ bool process_record_kb(uint16_t keycode, keyrecord_t *record) {
void led_set_kb(uint8_t usb_led) {
// put your keyboard LED indicator (ex: Caps Lock LED) toggling code here
if (usb_led & (1 << USB_LED_CAPS_LOCK))
{
// HI
DDRD |= (1<<4);
PORTD |= (1<<4);
}
else
{
// Hi-Z
DDRD &= ~(1<<4);
PORTD &= ~(1<<4);
}
if (usb_led & (1 << USB_LED_NUM_LOCK))
{
// HI
DDRD |= (1<<5);
PORTD |= (1<<5);
}
else
{
// Hi-Z
DDRD &= ~(1<<5);
PORTD &= ~(1<<5);
}
if (usb_led & (1 << USB_LED_SCROLL_LOCK))
{
// HI
DDRD |= (1<<6);
PORTD |= (1<<6);
}
else
{
// Hi-Z
DDRD &= ~(1<<6);
PORTD &= ~(1<<6);
}
led_set_user(usb_led);
}

View File

@ -38,7 +38,7 @@
* | | | |
* = = = =
* | | 32KB-4KB | | 128KB-8KB
* 0x6000 +---------------+ 0x1FC00 +---------------+
* 0x7000 +---------------+ 0x1E000 +---------------+
* | Bootloader | 4KB | Bootloader | 8KB
* 0x7FFF +---------------+ 0x1FFFF +---------------+
*
@ -64,8 +64,8 @@
#define BOOTLOADER_START (FLASH_SIZE - BOOTLOADER_SIZE)
/*
* Entering the Bootloader via Software
/*
* Entering the Bootloader via Software
* http://www.fourwalledcubicle.com/files/LUFA/Doc/120730/html/_page__software_bootloader_start.html
*/
#define BOOTLOADER_RESET_KEY 0xB007B007
@ -137,7 +137,7 @@ void bootloader_jump_after_watchdog_reset(void)
#if 0
/* Jumping To The Bootloader
* http://www.pjrc.com/teensy/jump_to_bootloader.html
*
*
* This method doen't work when using LUFA. idk why.
* - needs to initialize more regisers or interrupt setting?
*/

View File

@ -384,9 +384,6 @@ static bool command_common(uint8_t code)
debug_mouse = true;
} else {
print("\ndebug: off\n");
debug_matrix = false;
debug_keyboard = false;
debug_mouse = false;
}
break;