SHARE
TWEET

Untitled

a guest Oct 21st, 2019 74 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  * This program is free software: you can redistribute it and/or modify
  2.  * it under the terms of the GNU General Public License as published by
  3.  * the Free Software Foundation, either version 2 of the License, or
  4.  * (at your option) any later version.
  5.  *
  6.  * This program is distributed in the hope that it will be useful,
  7.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  8.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  9.  * GNU General Public License for more details.
  10.  *
  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.  
  15.  
  16.  
  17. #include QMK_KEYBOARD_H
  18.  
  19. enum custom_keycodes {
  20.   QMKBEST = SAFE_RANGE,
  21. };
  22.  
  23. bool process_record_user(uint16_t keycode, keyrecord_t *record) {
  24.   switch (keycode) {
  25.   case QMKBEST:
  26.     if (record->event.pressed) {
  27.       // when keycode QMKBEST is pressed
  28.       send_string_with_delay_P("QMK is the best thing ever!",50);
  29.     } else {
  30.       // when keycode QMKBEST is released
  31.     }
  32.     break;
  33.  
  34.   }
  35.   return true;
  36. };
  37.  
  38.  
  39. /* Default Anne Pro layout, macOS style with LALT and LWIN switched */
  40. const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
  41.   [0] = LAYOUT(
  42.       KC_ESC,  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,
  43.       KC_TAB,  KC_Q,    KC_W,    KC_E,    KC_R,    KC_T,    KC_Y,    KC_U,    KC_I,    KC_O,    KC_P,    KC_LBRC, KC_RBRC, KC_BSLS,
  44.       KC_CAPS, KC_A,    KC_S,    KC_D,    KC_F,    KC_G,    KC_H,    KC_J,    KC_K,    KC_L,    KC_SCLN, KC_QUOT,          KC_ENT,
  45.       KC_LSPO, KC_Z,    KC_X,    KC_C,    KC_V,    KC_B,    KC_N,    KC_M,    KC_COMM, KC_DOT,  KC_SLSH,                   KC_RSPC,
  46.       KC_LCTL, KC_LALT, KC_LWIN,                   KC_SPACE,                                    KC_RALT, MO(1),   MO(2),   KC_RCTL
  47.   ),
  48.   [1] = LAYOUT(
  49.       KC_GRV,  KC_F1,   KC_F2,   KC_F3,   KC_F4,   KC_F5,   KC_F6,   KC_F7,   KC_F8,   KC_F9,   KC_F10,  KC_F11,  KC_F12,  XXXXXXX,
  50.       XXXXXXX, XXXXXXX, KC_UP,   XXXXXXX, APL_RGB, APL_RAT, APL_BRT, APL_MOD, KC_UP,   KC_SLCK, KC_PAUS, KC_HOME, KC_END,  KC_PSCR,
  51.       XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, XXXXXXX, XXXXXXX, XXXXXXX, KC_LEFT, KC_DOWN, KC_RGHT, KC_PGUP, KC_PGDN,          XXXXXXX,
  52.       _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, TG(3),   XXXXXXX, XXXXXXX, XXXXXXX, KC_INS,  KC_DEL,                    _______,
  53.       _______, _______, _______,                   XXXXXXX,                                     _______, _______, _______, _______
  54.            ),
  55.   [2] = LAYOUT(
  56.       RESET,   XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
  57.       XXXXXXX, QMKBEST, XXXXXXX, QMKBEST, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
  58.       XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,          XXXXXXX,
  59.       _______, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,                   _______,
  60.       _______, _______, _______,                   XXXXXXX,                                     _______, _______, _______, _______
  61.   ),
  62.   [3] = LAYOUT(
  63.       TG(3),   APB_HC1, APB_HC2, APB_HC3, APB_HC4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, APB_LGC, APB_OFF, APB_ON,  XXXXXXX,
  64.       XXXXXXX, APB_HS1, APB_HS2, APB_HS3, APB_HS4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
  65.       XXXXXXX, APB_HD1, APB_HD2, APB_HD3, APB_HD4, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,          XXXXXXX,
  66.       XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,                   XXXXXXX,
  67.       APB_HLQ, XXXXXXX, XXXXXXX,                   XXXXXXX,                                     XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX
  68.   ),
  69. };
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top