Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed MxSS ISO layouts in QMK configuator (hopefully) #3352

Merged
merged 16 commits into from
Jul 9, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Defined a new safe range for custom keycodes in keymap.c
  • Loading branch information
MxBlu committed Jul 8, 2018
commit ae82aa6efe67ed9fecca67d3cde0250606a6d9fb
6 changes: 6 additions & 0 deletions keyboards/mxss/keymaps/default/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ const hs_set layer_colors[] = {
};
const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t);

// Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control
enum custom_keycodes {
MY_KEYCODE = NEW_SAFE_RANGE,
};


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
LAYOUT( /* Base */
KC_GESC, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_MINS, KC_EQL, KC_BSPC,
Expand Down
3 changes: 2 additions & 1 deletion keyboards/mxss/mxss_frontled.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ typedef struct _hs_set {
enum fled_keycodes {
FLED_MOD = SAFE_RANGE,
FLED_VAI,
FLED_VAD
FLED_VAD,
NEW_SAFE_RANGE // define a new safe range
};

bool eeprom_is_valid(void); // Check if EEPROM has been set up
Expand Down
6 changes: 5 additions & 1 deletion keyboards/mxss/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,4 +47,8 @@ Colors for FLED_INDI mode are hardcoded as hue/saturation values, the caps lock

- FLED_MOD - Cycle between the 3 modes (FLED_OFF -> FLED_RGB -> FLED_INDI)
- FLED_VAI - Increase front LED brightness
- FLED_VAD - Decrease front LED brightness
- FLED_VAD - Decrease front LED brightness

# Further Notes

As SAFE_RANGE is used for defining the custom keycodes seen above, please use NEW_SAFE_RANGE as the starting value for any custom keycodes in keymap.c, as per the example.
6 changes: 6 additions & 0 deletions keyboards/mxss/templates/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@ hs_set layer_colors[] = {
};
const size_t lc_size = sizeof(layer_colors) / sizeof(uint16_t);

// Use NEW_SAFE_RANGE to define new custom keycodes in order to not overwrite the ones used for front LED control
enum custom_keycodes {
MY_KEYCODE = NEW_SAFE_RANGE,
};


const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
__KEYMAP_GOES_HERE__
};