|
|
@@ -15,32 +15,40 @@
|
|
|
*/
|
|
|
#include QMK_KEYBOARD_H
|
|
|
|
|
|
-const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
-[0] = LAYOUT( /* Base */
|
|
|
- KC_A, KC_1, KC_H, \
|
|
|
- KC_TAB, KC_SPC \
|
|
|
-),
|
|
|
+// Defines the keycodes used by our macros in process_record_user
|
|
|
+enum custom_keycodes {
|
|
|
+ QMKBEST = SAFE_RANGE,
|
|
|
+ QMKURL
|
|
|
};
|
|
|
|
|
|
-const uint16_t PROGMEM fn_actions[] = {
|
|
|
-
|
|
|
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
+ [0] = LAYOUT( /* Base */
|
|
|
+ KC_A, KC_1, KC_H, \
|
|
|
+ KC_TAB, KC_SPC \
|
|
|
+ ),
|
|
|
};
|
|
|
|
|
|
-const macro_t *action_get_macro(keyrecord_t *record, uint8_t id, uint8_t opt)
|
|
|
-{
|
|
|
- // MACRODOWN only works in this function
|
|
|
- switch(id) {
|
|
|
- case 0:
|
|
|
- if (record->event.pressed) {
|
|
|
- register_code(KC_RSFT);
|
|
|
- } else {
|
|
|
- unregister_code(KC_RSFT);
|
|
|
- }
|
|
|
- break;
|
|
|
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
+ switch (keycode) {
|
|
|
+ case QMKBEST:
|
|
|
+ if (record->event.pressed) {
|
|
|
+ // when keycode QMKBEST is pressed
|
|
|
+ SEND_STRING("QMK is the best thing ever!");
|
|
|
+ } else {
|
|
|
+ // when keycode QMKBEST is released
|
|
|
}
|
|
|
- return MACRO_NONE;
|
|
|
-};
|
|
|
-
|
|
|
+ break;
|
|
|
+ case QMKURL:
|
|
|
+ if (record->event.pressed) {
|
|
|
+ // when keycode QMKURL is pressed
|
|
|
+ SEND_STRING("https://qmk.fm/" SS_TAP(X_ENTER));
|
|
|
+ } else {
|
|
|
+ // when keycode QMKURL is released
|
|
|
+ }
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ return true;
|
|
|
+}
|
|
|
|
|
|
void matrix_init_user(void) {
|
|
|
|
|
|
@@ -50,10 +58,6 @@ void matrix_scan_user(void) {
|
|
|
|
|
|
}
|
|
|
|
|
|
-bool process_record_user(uint16_t keycode, keyrecord_t *record) {
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
void led_set_user(uint8_t usb_led) {
|
|
|
|
|
|
}
|