summaryrefslogtreecommitdiff
path: root/keyboards/gh60
diff options
context:
space:
mode:
authorRyan <fauxpark@gmail.com>2021-07-15 03:52:45 +1000
committerGitHub <noreply@github.com>2021-07-15 03:52:45 +1000
commitfd8628ccdc97482aae1814cec5c2059c2978daad (patch)
treeb4cb8d8811023236254ddd631bc45120bcd2bb84 /keyboards/gh60
parente69c325a9ce84bc144dbc89978f800fc7560757d (diff)
Migrate more `fn_actions` stuff (#13502)
Diffstat (limited to 'keyboards/gh60')
-rw-r--r--keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c33
1 files changed, 15 insertions, 18 deletions
diff --git a/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c b/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c
index 5b58d7686a..a79b89e9c2 100644
--- a/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c
+++ b/keyboards/gh60/revc/keymaps/dbroqua_7U/keymap.c
@@ -3,6 +3,10 @@
#define _DEFAULT 0
#define _FN 1
+enum custom_keycodes {
+ LED_TOGGLE = SAFE_RANGE
+};
+
int esc_led = 0;
// Fillers to make layering more clear
@@ -44,7 +48,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* `-----------------------------------------------------------------'
*/
[_FN] = LAYOUT_60_ansi_split_bs_rshift( /* Layer 1 */
- F(0), 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, \
+ LED_TOGGLE,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_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_MPRV, KC_MPLY, KC_MNXT, ______, ______, KC_PPLS, KC_PMNS, KC_END, KC_PGDN, KC_DOWN, ______, ______, \
@@ -52,14 +56,6 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
)
};
-enum function_id {
- LED_TOGGLE
-};
-
-const uint16_t PROGMEM fn_actions[] = {
- [0] = ACTION_FUNCTION(LED_TOGGLE)
-};
-
void esc_led_toggle(void) {
if (esc_led == 0){
esc_led = 1;
@@ -70,12 +66,13 @@ void esc_led_toggle(void) {
}
}
-void action_function(keyrecord_t *record, uint8_t id, uint8_t opt) {
- switch (id) {
- case LED_TOGGLE:
- if (record->event.pressed) {
- esc_led_toggle();
- }
- break;
- }
-} \ No newline at end of file
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case LED_TOGGLE:
+ if (record->event.pressed) {
+ esc_led_toggle();
+ }
+ return false;
+ }
+ return true;
+}