From a30dd2bb1711f5402007adf89af9b3adb758a7fb Mon Sep 17 00:00:00 2001 From: Danilo Vulicevic Date: Wed, 7 Nov 2018 02:04:02 +0100 Subject: Add xd75/billypython keymap (#4381) * Add xd75/billypython keymap * Expand rules.mk (cherry picked from commit 806fee94ae3a21b6ca7a34624101349b57d41b75) * Expand billypython's rules.mk * Remove unused stuff in whitefox/billypython --- keyboards/xd75/keymaps/billypython/config.h | 17 ++++ keyboards/xd75/keymaps/billypython/keymap.c | 119 ++++++++++++++++++++++++++++ keyboards/xd75/keymaps/billypython/rules.mk | 15 ++++ 3 files changed, 151 insertions(+) create mode 100644 keyboards/xd75/keymaps/billypython/config.h create mode 100644 keyboards/xd75/keymaps/billypython/keymap.c create mode 100644 keyboards/xd75/keymaps/billypython/rules.mk (limited to 'keyboards/xd75') diff --git a/keyboards/xd75/keymaps/billypython/config.h b/keyboards/xd75/keymaps/billypython/config.h new file mode 100644 index 000000000..275f8effb --- /dev/null +++ b/keyboards/xd75/keymaps/billypython/config.h @@ -0,0 +1,17 @@ +#pragma once + +#define FORCE_NKRO + +#define MAGIC_KEY_LAYER0_ALT1 BSLS +#define MAGIC_KEY_BOOTLOADER ESC + +#define MOUSEKEY_DELAY 50 +#define MOUSEKEY_INTERVAL 15 +#define MOUSEKEY_MAX_SPEED 4 +#define MOUSEKEY_TIME_TO_MAX 50 +#define MOUSEKEY_WHEEL_MAX_SPEED 1 +#define MOUSEKEY_WHEEL_TIME_TO_MAX 50 + +#define PERMISSIVE_HOLD +#define TAPPING_TERM 200 +#define TAPPING_TOGGLE 2 diff --git a/keyboards/xd75/keymaps/billypython/keymap.c b/keyboards/xd75/keymaps/billypython/keymap.c new file mode 100644 index 000000000..8a06074ca --- /dev/null +++ b/keyboards/xd75/keymaps/billypython/keymap.c @@ -0,0 +1,119 @@ +#include QMK_KEYBOARD_H + +#define TOP LCTL(KC_HOME) +#define BOTTOM LCTL(KC_END) + +#define FN MO(L_FN) +#define FN_CAPS LT(L_FN, KC_CAPS) +#define FN_FNLK TT(L_FN) + +#define COMMA UC(0x002C) +#define L_PAREN UC(0x0028) +#define R_PAREN UC(0x0029) +#define EQUALS UC(0x003D) +#define TIMES UC(0x00D7) +#define DIVIDE UC(0x00F7) +#define MINUS UC(0x2212) + +void eeconfig_init_user(void) { + set_unicode_input_mode(UC_LNX); +} + +enum layers { + L_BASE, + L_FN, + L_NUMPAD, +}; + +enum custom_keycodes { + CLEAR = SAFE_RANGE, + NUMPAD, +}; + +bool process_record_user(uint16_t keycode, keyrecord_t *record) { + switch (keycode) { + case CLEAR: + if (record->event.pressed) { + SEND_STRING(SS_LCTRL("a") SS_TAP(X_DELETE)); + } + return false; + + case NUMPAD: + if (record->event.pressed) { + layer_invert(L_NUMPAD); + bool num_lock = host_keyboard_leds() & 1<