Skip to content

Instantly share code, notes, and snippets.

@cathandnya
Last active Aug 16, 2021
Embed
What would you like to do?
QMK Keymap for Keyboard Quantizer with Varmilo VA73M
/* Copyright 2020 sekigon-gonnoc
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include QMK_KEYBOARD_H
#include "keymap_jp.h"
// Defines names for use in layer keycodes and the keymap
enum layer_names {
_BASE,
_LOWER,
_RAISE,
};
// Defines the keycodes used by our macros in process_record_user
enum custom_keycodes {
KC_LAUNCHPAD = SAFE_RANGE
};
#define LOSP LT(_LOWER, KC_SPC)
#define RAEN LT(_RAISE, KC_ENT)
// clang-format off
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Base */
[_BASE] = LAYOUT(
KC_ESC, 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_PSCR, KC_SCROLLLOCK, KC_PAUS,
JP_ZHTG, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, JP_MINS, JP_CIRC, JP_YEN, KC_BSPACE, KC__VOLUP, KC_HOME, KC_LAUNCHPAD, KC_NUMLOCK, KC_KP_SLASH, KC_KP_ASTERISK, KC_KP_MINUS,
KC_TAB, KC_Q, KC_W, KC_E, KC_R, KC_T, KC_Y, KC_U, KC_I, KC_O, KC_P, JP_AT, JP_LBRC, KC_ENT, KC__VOLDOWN, KC_END, KC__MUTE, KC_KP_7, KC_KP_8, KC_KP_9, KC_KP_PLUS,
KC_LCTRL, KC_A, KC_S, KC_D, KC_F, KC_G, KC_H, KC_J, KC_K, KC_L, JP_SCLN, JP_COLN, JP_RBRC, KC_KP_4, KC_KP_5, KC_KP_6,
KC_LSFT, KC_Z, KC_X, KC_C, KC_V, KC_B, KC_N, KC_M, KC_COMM, KC_DOT, JP_SLSH, JP_BSLS, KC_RSFT, KC_UP, KC_KP_1, KC_KP_2, KC_KP_3, KC_KP_ENTER,
KC_CAPS, KC_LALT, KC_LGUI, JP_MEISU, KC_SPC, JP_MKANA, KC_RGUI, KC_RALT, KC_RCTRL, KC_APP, KC_RCTRL, KC_LEFT, KC_DOWN, KC_RIGHT, KC_KP_0, KC_KP_DOT
)
};
// clang-format on
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
switch (keycode) {
case KC_LAUNCHPAD:
if (record->event.pressed) {
host_consumer_send(0x2A0);
} else {
host_consumer_send(0);
}
return false; /* Skip all further processing of this key */
default:
return true; /* Process all other keycodes normally */
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment