Migrate ACTION_BACKLIGHT_* to BL_* (#6299)

* Branch point for 2019 Aug 30 Breaking Change

* LUFA USB descriptor cleanup (#4871)

* Fix indentation

* Fix braces

* Expand descriptor headers

* Align descriptor elements

* Nicer formatting

* Tidy up preprocessor statements

* Remove VERSION_BCD redefine - LUFA_VERSION_INTEGER is currently 0x170418

* Tidy up comments

* Tweak ordering of  HID report elements (no functional changes)

* We don't need all of these newlines

* Move default USB_MAX_POWER_CONSUMPTION closer to where it makes sense

* Ask nicely

* Add some more comments

* Change indentation back to 4 spaces

* Add changelog entry

* Language Keymap extras backport from ZSA fork (#6198)

* Swedish extra keymap refactor

* Fix swedish $ sign definition (#81)

* Fix br abnt2 keymap compilation error

* Add PR changelog doc

* Update PR6198.md

* Enforce clang-format (#6293)

* Enforce clang-format on commit for core files

* forgot about tests

* Migrate ACTION_LAYER_MOMENTARYs to MO() (#5176)

* Migrate ACTION_LAYER_MOMENTARYs to MO()

* Add changelog entry

* Update docs/ChangeLog/20190830/PR5176.md

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>

* Migrate ACTION_BACKLIGHT_* to BL_*

* Add changelog

* Update docs/ChangeLog/20190830/PR6299.md

Co-Authored-By: skullydazed <skullydazed@users.noreply.github.com>
This commit is contained in:
fauxpark 2019-08-03 06:12:56 +10:00 committed by skullydazed
parent 267a85c885
commit 3619678b10
6 changed files with 22 additions and 46 deletions

View File

@ -0,0 +1,4 @@
* Migrating `ACTION_BACKLIGHT_*()` entries in `fn_actions` to `BL_` keycodes
* `fn_actions` is deprecated, and its functionality has been superseded by direct keycodes and `process_record_user()`
* All keymaps using these actions have had the relevant `KC_FN*` keys replaced with the equivalent `BL_*` keys
* If you currently use `KC_FN*` you will need to replace `fn_actions` with the [custom keycode](https://docs.qmk.fm/#/custom_quantum_functions) and [macro](https://docs.qmk.fm/#/feature_macros) features

View File

@ -4,6 +4,8 @@
#define KC_MO2 MO(2) #define KC_MO2 MO(2)
#define KC_MO3 MO(3) #define KC_MO3 MO(3)
#define KC_BLTG BL_TOGG
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_kc( [0] = LAYOUT_kc(
ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC, ESC, Q, W, F, P, G, J, L, U, Y, SCLN, QUOT, BSPC,
@ -19,7 +21,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS,
TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), TRNS, BLTG, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS),
[3] = LAYOUT_kc( [3] = LAYOUT_kc(
TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, TRNS, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS,
@ -29,7 +31,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 7, 8, 9, 0, TRNS, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, LBRC, 4, 5, 6, DOT, TRNS,
TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, RBRC, 1, 2, 3, BSLS, TRNS,
TRNS, FN29, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS), TRNS, BLTG, TRNS, TRNS, TRNS, PAUSE, EQL, MINS, TRNS, TRNS),
}; };
enum macro_id enum macro_id
@ -49,12 +51,7 @@ const uint16_t PROGMEM fn_actions[] = {
[10] = ACTION_MACRO(PSWD1), [10] = ACTION_MACRO(PSWD1),
[11] = ACTION_MACRO(PSWD2), [11] = ACTION_MACRO(PSWD2),
[12] = ACTION_MACRO(PSWD3), [12] = ACTION_MACRO(PSWD3)
[29] = ACTION_BACKLIGHT_TOGGLE(),
[30] = ACTION_BACKLIGHT_INCREASE(),
[31] = ACTION_BACKLIGHT_DECREASE()
}; };
/* /*

View File

@ -4,6 +4,8 @@
*/ */
#define KC_TT2 TT(2) #define KC_TT2 TT(2)
#define KC_BLST BL_STEP
#define KC_BLTG BL_TOGG
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = LAYOUT_kc( [0] = LAYOUT_kc(
@ -15,9 +17,9 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC, GRV, TRNS, UP, TRNS, 7, 8, 9, 0, MINS, EQL, PSCR, LBRC, RBRC,
TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS, TRNS, LEFT, DOWN, RGHT, 4, 5, 6, INS, HOME, PGUP, SCLN, TRNS,
TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS, TRNS, TRNS, TRNS, TRNS, 1, 2, 3, DEL, END, PGDN, TRNS, TRNS,
TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, FN3, TRNS, TRNS), TRNS, TRNS, TRNS, SPC, TRNS, DEL, TRNS, BLST, TRNS, TRNS),
[2] = LAYOUT_kc( [2] = LAYOUT_kc(
TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, FN3, FN4, TRNS, TRNS, VOLU, TRNS, F7, F8, F9, F10, F11, F12, PSCR, BLST, BLTG,
TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS, TRNS, MPRV, VOLD, MNXT, F4, F5, F6, J, K, L, SCLN, TRNS,
TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS, TRNS, TRNS, TRNS, TRNS, F1, F2, F3, MUTE, MPRV, MNXT, MSTP, TRNS,
TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS) TRNS, TRNS, TRNS, LGUI, TRNS, TRNS, TRNS, TRNS, PAUS, TRNS)
@ -37,9 +39,8 @@ enum macro_id
const uint16_t PROGMEM fn_actions[] = { const uint16_t PROGMEM fn_actions[] = {
[0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT), [0] = ACTION_MODS_TAP_TOGGLE(MOD_LSFT),
[1] = ACTION_MACRO(M_LAYER1), [1] = ACTION_MACRO(M_LAYER1)
[3] = ACTION_BACKLIGHT_STEP(), };
[4] = ACTION_BACKLIGHT_TOGGLE()};
const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt) const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
{ {

View File

@ -8,18 +8,6 @@
// Fillers to make layering more clear // Fillers to make layering more clear
#define ______ KC_TRNS #define ______ KC_TRNS
// 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()
};
/* /*
* | | | * | | |
* | | | * | | |
@ -67,7 +55,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
______, 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_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,______, ______, ______, ______, ______, ______, \ ______, ______, ______, ______, ______, ______, ______, KC_PSCR,______, ______, ______, ______, ______, ______, \
______, ______, S_LED, S_LEDI, S_LEDD,______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \ ______, ______, BL_TOGG, BL_INC, BL_DEC, ______,KC_MUTE,KC_VOLU,KC_VOLD,______, ______, ______, ______,KC_MPLY, \
______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT \ ______, ______, ______, ______, KC_DEL, ______, KC_MPRV, KC_MSTP, KC_MNXT \
), ),

View File

@ -7,18 +7,6 @@
// Fillers to make layering more clear // Fillers to make layering more clear
#define ______ KC_TRNS #define ______ KC_TRNS
// 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] = { const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Qwerty /* Qwerty
* ,-----------------------------------------------------------------------------------------. * ,-----------------------------------------------------------------------------------------.
@ -56,7 +44,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
*/ */
[_FN] = LAYOUT( /* Layer 1 */ [_FN] = LAYOUT( /* 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_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_CAPS, S_LED, S_LEDI, S_LEDD, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \ KC_CAPS, BL_TOGG, BL_INC, BL_DEC, ______, ______, ______, ______, KC_PSCR, KC_SLCK, KC_PAUS, KC_UP, ______, ______, \
______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, ______, \ ______, KC_VOLD, KC_VOLU, KC_MUTE, ______, ______, KC_PAST, KC_PSLS,KC_HOME, KC_PGUP, KC_LEFT, KC_RGHT, ______, ______, \
______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______,______,KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______,______, \ ______, ______, KC_MPRV, KC_MPLY, KC_MNXT,______,______,KC_PPLS,KC_PMNS,KC_END, KC_PGDN, KC_DOWN, ______,______, \
______, ______, ______, ______, KC_DEL, KC_MSTP, ______, ______, ______ \ ______, ______, ______, ______, KC_DEL, KC_MSTP, ______, ______, ______ \

View File

@ -2,10 +2,13 @@
#define KC_MO2 MO(2) #define KC_MO2 MO(2)
#define KC_MO3 MO(3) #define KC_MO3 MO(3)
#define KC_BLTG BL_TOGG
#define KC_BLIN BL_INC
#define KC_BLDE BL_DEC
const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = { const uint8_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[0] = KEYMAP( /* Wilba */ [0] = KEYMAP( /* Wilba */
FN27, FN28, FN29, E, R, T, Y, U, I, O, P, BSPC, BLTG, BLIN, BLDE, E, R, T, Y, U, I, O, P, BSPC,
TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT, TAB, A, S, D, F, G, H, J, K, L, SCLN, QUOT,
LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT, LSFT, Z, X, C, V, B, N, M, COMM, DOT, SLSH, ENT,
LCTL, LGUI, LALT, RSFT, MO2, SPC, MO3, LEFT, DOWN, UP, RGHT), LCTL, LGUI, LALT, RSFT, MO2, SPC, MO3, LEFT, DOWN, UP, RGHT),
@ -47,10 +50,5 @@ const uint16_t PROGMEM fn_actions[] = {
[24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // } [24] = ACTION_MODS_KEY(MOD_LSFT, KC_RBRC), // }
[25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // | [25] = ACTION_MODS_KEY(MOD_LSFT, KC_BSLS), // |
[26] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE), [26] = ACTION_MODS_KEY(MOD_LSFT | MOD_RSFT, KC_PAUSE)
[27] = ACTION_BACKLIGHT_TOGGLE(),
[28] = ACTION_BACKLIGHT_INCREASE(),
[29] = ACTION_BACKLIGHT_DECREASE()
}; };