You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

653 lines
24 KiB

1 year ago
  1. /* Copyright 2021 Jonavin Eng @Jonavin
  2. Copyright 2022 gourdo1 <gourdo1@outlook.com>
  3. This program is free software: you can redistribute it and/or modify
  4. it under the terms of the GNU General Public License as published by
  5. the Free Software Foundation, either version 2 of the License, or
  6. (at your option) any later version.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  10. GNU General Public License for more details.
  11. You should have received a copy of the GNU General Public License
  12. along with this program. If not, see <http://www.gnu.org/licenses/>.
  13. */
  14. #include QMK_KEYBOARD_H
  15. #include "gourdo1.h"
  16. #include "custom_double_taps.h"
  17. // Tap once for shift, twice for Caps Lock but only if Win Key is not disabled (also disabled by user.config variable)
  18. void dance_LSFT_each_tap(qk_tap_dance_state_t * state, void * user_data) {
  19. if (user_config.double_tap_shift_for_capslock) {
  20. if (state -> count == 1 || keymap_config.no_gui) {
  21. register_code16(KC_LSFT);
  22. } else {
  23. register_code(KC_CAPS);
  24. }
  25. } else {
  26. register_code16(KC_LSFT);
  27. }
  28. }
  29. void dance_LSFT_reset(qk_tap_dance_state_t * state, void * user_data) {
  30. if (state -> count == 1 || keymap_config.no_gui) {
  31. unregister_code16(KC_LSFT);
  32. } else {
  33. unregister_code(KC_CAPS);
  34. unregister_code16(KC_LSFT);
  35. }
  36. }
  37. // Tap Dance definitions
  38. qk_tap_dance_action_t tap_dance_actions[] = {
  39. // Tap once for shift, twice for Caps Lock
  40. [TD_LSFT_CAPS_WIN] = ACTION_TAP_DANCE_FN_ADVANCED(dance_LSFT_each_tap, NULL, dance_LSFT_reset),
  41. // Tap once for Escape, twice to reset to base layer
  42. //[TD_ESC_BASELYR] = ACTION_TAP_DANCE_LAYER_MOVE(KC_ESC, _BASE)
  43. };
  44. // RGB NIGHT MODE
  45. #ifdef RGB_MATRIX_ENABLE
  46. static bool rgb_nightmode = false;
  47. // Turn on/off NUM LOCK if current state is different
  48. void activate_rgb_nightmode(bool turn_on) {
  49. if (rgb_nightmode != turn_on) {
  50. rgb_nightmode = !rgb_nightmode;
  51. }
  52. }
  53. bool get_rgb_nightmode(void) {
  54. return rgb_nightmode;
  55. }
  56. #endif // RGB_MATRIX_ENABLE
  57. // TIMEOUTS
  58. #ifdef IDLE_TIMEOUT_ENABLE
  59. static uint16_t timeout_timer = 0;
  60. static uint16_t timeout_counter = 0; //in minute intervals
  61. static uint16_t timeout_threshold = TIMEOUT_THRESHOLD_DEFAULT;
  62. uint16_t get_timeout_threshold(void) {
  63. return timeout_threshold;
  64. }
  65. void timeout_reset_timer(void) {
  66. timeout_timer = timer_read();
  67. timeout_counter = 0;
  68. };
  69. void timeout_update_threshold(bool increase) {
  70. if (increase && timeout_threshold < TIMEOUT_THRESHOLD_MAX) timeout_threshold++;
  71. if (!increase && timeout_threshold > 0) timeout_threshold--;
  72. };
  73. void timeout_tick_timer(void) {
  74. if (timeout_threshold > 0) {
  75. if (timer_elapsed(timeout_timer) >= 60000) { // 1 minute tick
  76. timeout_counter++;
  77. timeout_timer = timer_read();
  78. }
  79. #ifdef RGB_MATRIX_ENABLE
  80. if (timeout_threshold > 0 && timeout_counter >= timeout_threshold) {
  81. rgb_matrix_disable_noeeprom();
  82. }
  83. #endif
  84. } // timeout_threshold = 0 will disable timeout
  85. }
  86. #endif // IDLE_TIMEOUT_ENABLE
  87. #if defined(ALTTAB_SCROLL_ENABLE) || defined(IDLE_TIMEOUT_ENABLE) // timer features
  88. __attribute__((weak)) void matrix_scan_keymap(void) {}
  89. void matrix_scan_user(void) {
  90. #ifdef ALTTAB_SCROLL_ENABLE
  91. encoder_tick_alttabscroll();
  92. #endif
  93. #ifdef IDLE_TIMEOUT_ENABLE
  94. timeout_tick_timer();
  95. #endif
  96. matrix_scan_keymap();
  97. }
  98. #endif // ALTTAB_SCROLL_ENABLE or IDLE_TIMEOUT_ENABLE
  99. // Initialize variable holding the binary representation of active modifiers.
  100. uint8_t mod_state;
  101. // ============================================= PROCESS KEY CODES =============================================
  102. __attribute__((weak)) bool process_record_keymap(uint16_t keycode, keyrecord_t * record) {
  103. return true;
  104. }
  105. bool process_record_user(uint16_t keycode, keyrecord_t * record) {
  106. mod_state = get_mods();
  107. if (!process_record_keymap(keycode, record)) { return false; }
  108. if (!process_capsnum(keycode, record)) { return false; }
  109. if (!process_esc_to_base(keycode, record)) { return false; }
  110. // Key macros ...
  111. switch (keycode) {
  112. // User configuration toggles
  113. case PRNCONF: // Print verbose status of all user_config toggles (open a text editor before engaging!!)
  114. if (record->event.pressed) {
  115. SEND_STRING(SS_TAP(X_ENT)"gourdo1's GMMK Pro User Settings. Press [FN]+<number key> to toggle each."SS_TAP(X_ENT));
  116. SEND_STRING("Config also visible by holding [FN] and viewing RGB under number keys."SS_TAP(X_ENT));
  117. SEND_STRING("========================================================================="SS_TAP(X_ENT));
  118. SEND_STRING("1. CapsLock RGB highlight alpha keys ");
  119. if (user_config.rgb_hilite_caps) {
  120. SEND_STRING("[ON]"SS_TAP(X_ENT));
  121. } else {
  122. SEND_STRING("[OFF]"SS_TAP(X_ENT));
  123. }
  124. SEND_STRING("2. Numpad RGB highlight layer keys ");
  125. if (user_config.rgb_hilite_numpad) {
  126. SEND_STRING("[ON]"SS_TAP(X_ENT));
  127. } else {
  128. SEND_STRING("[OFF]"SS_TAP(X_ENT));
  129. }
  130. SEND_STRING("3. Double tap ESC to revert to BASE layer ");
  131. if (user_config.esc_double_tap_to_baselyr) {
  132. SEND_STRING("[ON]"SS_TAP(X_ENT));
  133. } else {
  134. SEND_STRING("[OFF]"SS_TAP(X_ENT));
  135. }
  136. SEND_STRING("4. DEL & HOME key locations ");
  137. if (user_config.del_right_home_top) {
  138. SEND_STRING("[HOME on F13;DEL right of BKSPC]"SS_TAP(X_ENT));
  139. } else {
  140. SEND_STRING("[DEL on F13;HOME right of BKSPC]"SS_TAP(X_ENT));
  141. }
  142. SEND_STRING("5. Capslock: Double tap LShift / Numpad on CapsLock ");
  143. if (user_config.double_tap_shift_for_capslock) {
  144. SEND_STRING("[ON]"SS_TAP(X_ENT));
  145. } else {
  146. SEND_STRING("[OFF]"SS_TAP(X_ENT));
  147. }
  148. SEND_STRING("6. Encoder button function ");
  149. if (user_config.encoder_press_mute_or_media) {
  150. SEND_STRING("[MUTE]"SS_TAP(X_ENT));
  151. } else {
  152. SEND_STRING("[MEDIA PLAY/PAUSE]"SS_TAP(X_ENT));
  153. }
  154. SEND_STRING("7. Insert function accessed with ");
  155. if (user_config.ins_on_shft_bkspc_or_del) {
  156. SEND_STRING("[SHIFT]-[BKSPC]"SS_TAP(X_ENT));
  157. } else {
  158. SEND_STRING("[SHIFT]-[DEL]"SS_TAP(X_ENT));
  159. }
  160. SEND_STRING("8. Disable CTRL-SPACE function ");
  161. if (user_config.disable_ctrl_space) {
  162. SEND_STRING("[ON]"SS_TAP(X_ENT));
  163. } else {
  164. SEND_STRING("[OFF]"SS_TAP(X_ENT));
  165. }
  166. SEND_STRING(SS_TAP(X_ENT)"The latest firmware updates are always here: https://github.com/gourdo1/gmmkpro-media"SS_TAP(X_ENT));
  167. }
  168. break;
  169. case TG_CAPS: // Toggle RGB highlighting of Capslock state
  170. if (record->event.pressed) {
  171. user_config.rgb_hilite_caps ^= 1; // Toggles the status
  172. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  173. }
  174. break;
  175. case TG_PAD: // Toggle RGB highlighting of Numpad state
  176. if (record->event.pressed) {
  177. user_config.rgb_hilite_numpad ^= 1; // Toggles the status
  178. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  179. }
  180. break;
  181. case TG_ESC: // Toggle alternate ESC functionality
  182. if (record->event.pressed) {
  183. user_config.esc_double_tap_to_baselyr ^= 1; // Toggles the status
  184. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  185. }
  186. break;
  187. case TG_DEL: // Toggle alternate placement of DEL and HOME keys
  188. if (record->event.pressed) {
  189. user_config.del_right_home_top ^= 1; // Toggles the status
  190. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  191. }
  192. break;
  193. case TG_TDCAP: // Toggle alternate Capslock/Numpad functionality
  194. if (record->event.pressed) {
  195. user_config.double_tap_shift_for_capslock ^= 1; // Toggles the status
  196. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  197. }
  198. break;
  199. case TG_ENC: // Toggle Encoder function
  200. if (record->event.pressed) {
  201. user_config.encoder_press_mute_or_media ^= 1; // Toggles the status
  202. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  203. }
  204. break;
  205. case TG_INS: // Toggle Encoder function
  206. if (record->event.pressed) {
  207. user_config.ins_on_shft_bkspc_or_del ^= 1; // Toggles the status
  208. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  209. }
  210. break;
  211. case TG_CTLSPC: // Toggle CTRL-SPACE disable function
  212. if (record->event.pressed) {
  213. user_config.disable_ctrl_space ^= 1; // Toggles the status
  214. eeconfig_update_user(user_config.raw); // Writes the new status to EEPROM
  215. }
  216. break;
  217. //return false;
  218. // Key to the left of encoder function (default HOME)
  219. case LEFTOFENC:
  220. if (!(user_config.del_right_home_top)) {
  221. if (!(user_config.ins_on_shft_bkspc_or_del)) {
  222. static bool inskey_registered;
  223. if (record -> event.pressed) {
  224. // Detect the activation of either shift keys
  225. if (mod_state & MOD_MASK_SHIFT) {
  226. // First temporarily canceling both shifts so that
  227. // shift isn't applied to the KC_INS keycode
  228. del_mods(MOD_MASK_SHIFT);
  229. register_code(KC_INS);
  230. // Update the boolean variable to reflect the status of KC_INS
  231. inskey_registered = true;
  232. // Reapplying modifier state so that the held shift key(s)
  233. // still work even after having tapped the key.
  234. set_mods(mod_state);
  235. return false;
  236. } else {
  237. register_code(KC_DEL);
  238. return false;
  239. }
  240. } else { // on release of KC_DEL
  241. // In case KC_INS is still being sent even after the release of KC_DEL
  242. if (inskey_registered) {
  243. unregister_code(KC_INS);
  244. inskey_registered = false;
  245. return false;
  246. } else {
  247. unregister_code(KC_DEL);
  248. return false;
  249. }
  250. }
  251. } else {
  252. if (record -> event.pressed) {
  253. register_code(KC_DEL);
  254. return false;
  255. } else {
  256. unregister_code(KC_DEL);
  257. return false;
  258. }
  259. }
  260. } else {
  261. if (record -> event.pressed) {
  262. register_code(KC_HOME);
  263. return false;
  264. } else {
  265. unregister_code(KC_HOME);
  266. return false;
  267. }
  268. }
  269. break;
  270. // Key below encoder function (default DEL)
  271. case BELOWENC:
  272. if (user_config.del_right_home_top) {
  273. if (!(user_config.ins_on_shft_bkspc_or_del)) {
  274. static bool inskey_registered;
  275. if (record -> event.pressed) {
  276. // Detect the activation of either shift keys
  277. if (mod_state & MOD_MASK_SHIFT) {
  278. // First temporarily canceling both shifts so that
  279. // shift isn't applied to the KC_INS keycode
  280. del_mods(MOD_MASK_SHIFT);
  281. register_code(KC_INS);
  282. // Update the boolean variable to reflect the status of KC_INS
  283. inskey_registered = true;
  284. // Reapplying modifier state so that the held shift key(s)
  285. // still work even after having tapped the key.
  286. set_mods(mod_state);
  287. return false;
  288. } else {
  289. register_code(KC_DEL);
  290. return false;
  291. }
  292. } else { // on release of KC_DEL
  293. // In case KC_INS is still being sent even after the release of KC_DEL
  294. if (inskey_registered) {
  295. unregister_code(KC_INS);
  296. inskey_registered = false;
  297. return false;
  298. } else {
  299. unregister_code(KC_DEL);
  300. return false;
  301. }
  302. }
  303. } else {
  304. if (record -> event.pressed) {
  305. register_code(KC_DEL);
  306. return false;
  307. } else {
  308. unregister_code(KC_DEL);
  309. return false;
  310. }
  311. }
  312. } else {
  313. if (record -> event.pressed) {
  314. register_code(KC_HOME);
  315. return false;
  316. } else {
  317. unregister_code(KC_HOME);
  318. return false;
  319. }
  320. }
  321. break;
  322. // Encoder button function
  323. case ENCFUNC:
  324. if (user_config.encoder_press_mute_or_media) {
  325. if (record -> event.pressed) {
  326. register_code(KC_MUTE);
  327. } else unregister_code16(keycode);
  328. }
  329. else {
  330. if (record -> event.pressed) {
  331. register_code(KC_MPLY);
  332. } else unregister_code16(keycode);
  333. }
  334. break;
  335. // DotCom domain macros
  336. case DOTCOM:
  337. if (record -> event.pressed) {
  338. SEND_STRING(".com");
  339. } else {
  340. // when keycode is released
  341. }
  342. break;
  343. case YAHOO:
  344. if (record -> event.pressed) {
  345. SEND_STRING("yahoo.com");
  346. } else {
  347. // when keycode is released
  348. }
  349. break;
  350. case OUTLOOK:
  351. if (record -> event.pressed) {
  352. SEND_STRING("outlook.com");
  353. } else {
  354. // when keycode is released
  355. }
  356. break;
  357. case GMAIL:
  358. if (record -> event.pressed) {
  359. SEND_STRING("gmail.com");
  360. } else {
  361. // when keycode is released
  362. }
  363. break;
  364. case HOTMAIL:
  365. if (record -> event.pressed) {
  366. SEND_STRING("hotmail.com");
  367. } else {
  368. // when keycode is released
  369. }
  370. break;
  371. // Windows Key lockout
  372. case WINLOCK:
  373. if (record -> event.pressed) {
  374. keymap_config.no_gui = !keymap_config.no_gui; //toggle status
  375. } else unregister_code16(keycode);
  376. break;
  377. // Double Zero
  378. case KC_00:
  379. if (record -> event.pressed) {
  380. // when keycode KC_00 is pressed
  381. SEND_STRING("00");
  382. } else unregister_code16(keycode);
  383. break;
  384. // Treat Control+Space as if regular Space
  385. case KC_SPC:
  386. if(user_config.disable_ctrl_space) {
  387. // Initialize a boolean variable that keeps track of the space key status: registered or not?
  388. static bool spckey_registered;
  389. if (record -> event.pressed) {
  390. // Detect the activation of either ctrl keys
  391. if (mod_state & MOD_MASK_CTRL) {
  392. // First temporarily canceling both ctrls so that
  393. // ctrl isn't applied to the KC_SPC keycode
  394. del_mods(MOD_MASK_CTRL);
  395. register_code(KC_SPC);
  396. // Update the boolean variable to reflect the status of KC_SPC
  397. spckey_registered = true;
  398. // Reapplying modifier state so that the held ctrl key(s)
  399. // still work even after having tapped the Space key.
  400. set_mods(mod_state);
  401. return false;
  402. }
  403. } else { // on release of KC_SPC
  404. // In case KC_SPC is still being sent even after the release of KC_SPC
  405. if (spckey_registered) {
  406. unregister_code(KC_SPC);
  407. spckey_registered = false;
  408. return false;
  409. }
  410. }
  411. }
  412. break;
  413. // Treat Shift+Space as if regular Space
  414. case KC_SHIFTSPC: {
  415. // Initialize a boolean variable that keeps track of the space key status: registered or not?
  416. static bool spc2key_registered;
  417. if (record -> event.pressed) {
  418. // Detect the activation of either shift keys
  419. if (mod_state & MOD_MASK_SHIFT) {
  420. // First temporarily canceling both shifts so that
  421. // shift isn't applied to the KC_SPC keycode
  422. del_mods(MOD_MASK_SHIFT);
  423. register_code(KC_SPC);
  424. // Update the boolean variable to reflect the status of KC_SPC
  425. spc2key_registered = true;
  426. // Reapplying modifier state so that the held shift key(s)
  427. // still work even after having tapped the Space key.
  428. set_mods(mod_state);
  429. return false;
  430. }
  431. } else { // on release of KC_SPC
  432. // In case KC_SPC is still being sent even after the release of KC_SPC
  433. if (spc2key_registered) {
  434. unregister_code(KC_SPC);
  435. spc2key_registered = false;
  436. return false;
  437. }
  438. }
  439. }
  440. break;
  441. // INS as SHIFT-modified BackSpace key
  442. case KC_BSPC: {
  443. if (user_config.ins_on_shft_bkspc_or_del) {
  444. // Initialize a boolean variable that keeps track of the ins key status: registered or not?
  445. static bool inskey_registered;
  446. if (record -> event.pressed) {
  447. // Detect the activation of either shift keys
  448. if (mod_state & MOD_MASK_SHIFT) {
  449. // First temporarily canceling both shifts so that
  450. // shift isn't applied to the KC_INS keycode
  451. del_mods(MOD_MASK_SHIFT);
  452. register_code(KC_INS);
  453. // Update the boolean variable to reflect the status of KC_INS
  454. inskey_registered = true;
  455. // Reapplying modifier state so that the held shift key(s)
  456. // still work even after having tapped the key.
  457. set_mods(mod_state);
  458. return false;
  459. }
  460. } else { // on release of KC_BSPC
  461. // In case KC_INS is still being sent even after the release of KC_BSPC
  462. if (inskey_registered) {
  463. unregister_code(KC_INS);
  464. inskey_registered = false;
  465. return false;
  466. }
  467. }
  468. }
  469. }
  470. break;
  471. #ifdef IDLE_TIMEOUT_ENABLE
  472. case RGB_TOI:
  473. if (record -> event.pressed) {
  474. timeout_update_threshold(true);
  475. } else unregister_code16(keycode);
  476. break;
  477. case RGB_TOD:
  478. if (record -> event.pressed) {
  479. timeout_update_threshold(false); //decrease timeout
  480. } else unregister_code16(keycode);
  481. break;
  482. #endif // IDLE_TIMEOUT_ENABLE
  483. #ifdef RGB_MATRIX_ENABLE
  484. case RGB_NITE:
  485. if (record -> event.pressed) {
  486. rgb_nightmode = !rgb_nightmode;
  487. } else unregister_code16(keycode);
  488. break;
  489. #endif // RGB_MATRIX_ENABLE
  490. #ifdef EMOTICON_ENABLE
  491. case EMO_SHRUG:
  492. if (record -> event.pressed) SEND_STRING("`\\_(\"/)_/`");
  493. else unregister_code16(keycode);
  494. break;
  495. case EMO_CONFUSE:
  496. if (record -> event.pressed) SEND_STRING("(*_*)");
  497. else unregister_code16(keycode);
  498. break;
  499. case EMO_TEARS:
  500. if (record -> event.pressed) SEND_STRING("(T_T)");
  501. else unregister_code16(keycode);
  502. break;
  503. case EMO_NERVOUS:
  504. if (record -> event.pressed) SEND_STRING("(~_~;)");
  505. else unregister_code16(keycode);
  506. break;
  507. case EMO_JOY:
  508. if (record -> event.pressed) SEND_STRING("(^o^)");
  509. else unregister_code16(keycode);
  510. break;
  511. case EMO_SAD:
  512. if (record -> event.pressed) SEND_STRING(":'-(");
  513. else unregister_code16(keycode);
  514. break;
  515. #endif // EMOTICON_ENABLE
  516. #ifdef ALTTAB_SCROLL_ENABLE
  517. case KC_TSTOG:
  518. if (record -> event.pressed) encoder_toggle_alttabscroll();
  519. else unregister_code16(keycode);
  520. break;
  521. #endif // ALTTAB_SCROLL_ENABLE
  522. default:
  523. if (record -> event.pressed) {
  524. #ifdef RGB_MATRIX_ENABLE
  525. rgb_matrix_enable();
  526. #endif
  527. #ifdef IDLE_TIMEOUT_ENABLE
  528. timeout_reset_timer(); //reset activity timer
  529. #endif
  530. }
  531. break;
  532. }
  533. return true;
  534. };
  535. uint16_t get_tapping_term(uint16_t keycode, keyrecord_t * record) {
  536. switch (keycode) {
  537. case KC_SFTUP:
  538. return 300;
  539. case KC_RAISESPC:
  540. case KC_LOWERSPC:
  541. return 450;
  542. default:
  543. return TAPPING_TERM;
  544. }
  545. }
  546. // Define custom Caps Word continuity characters
  547. bool caps_word_press_user(uint16_t keycode) {
  548. switch (keycode) {
  549. // Keycodes that continue Caps Word, with shift applied.
  550. case KC_A ... KC_Z:
  551. case KC_TILD:
  552. case KC_UNDS:
  553. case KC_DQT:
  554. case KC_COLN:
  555. case KC_RSFT:
  556. case LSFTCAPSWIN:
  557. add_weak_mods(MOD_BIT(KC_LSFT)); // Apply shift to next key.
  558. return true;
  559. // Keycodes that continue Caps Word, without shifting.
  560. case KC_1 ... KC_0:
  561. case KC_GRV:
  562. case KC_MINS:
  563. case KC_QUOT:
  564. case KC_SCLN:
  565. case KC_BSPC:
  566. case KC_DEL:
  567. return true;
  568. default:
  569. return false; // Deactivate Caps Word.
  570. }
  571. }
  572. // Turn on/off NUM LOCK if current state is different
  573. void activate_numlock(bool turn_on) {
  574. if (IS_HOST_LED_ON(USB_LED_NUM_LOCK) != turn_on) {
  575. tap_code(KC_NUMLOCK);
  576. }
  577. }
  578. // INITIAL STARTUP
  579. __attribute__((weak)) void keyboard_post_init_keymap(void) {
  580. }
  581. void keyboard_post_init_user(void) {
  582. // Read the user config from EEPROM
  583. user_config.raw = eeconfig_read_user();
  584. keyboard_post_init_keymap();
  585. #ifdef STARTUP_NUMLOCK_ON
  586. activate_numlock(true); // turn on Num lock by default so that the numpad layer always has predictable results
  587. #endif // STARTUP_NUMLOCK_ON
  588. #ifdef IDLE_TIMEOUT_ENABLE
  589. timeout_timer = timer_read(); // set initial time for idle timeout
  590. #endif
  591. }
  592. /* Set defaults for EEPROM user configuration variables */
  593. void eeconfig_init_user(void) {
  594. user_config.raw = 0;
  595. user_config.rgb_hilite_caps = true;
  596. user_config.rgb_hilite_numpad = true;
  597. user_config.double_tap_shift_for_capslock = true;
  598. user_config.del_right_home_top = true;
  599. user_config.encoder_press_mute_or_media = true;
  600. user_config.esc_double_tap_to_baselyr = true;
  601. user_config.ins_on_shft_bkspc_or_del = true;
  602. user_config.disable_ctrl_space = true;
  603. eeconfig_update_user(user_config.raw);
  604. }