summaryrefslogtreecommitdiff
path: root/keyboards/chocopad
diff options
context:
space:
mode:
authorDylan Khor <thekhord@gmail.com>2018-07-25 11:30:17 -0400
committerDrashna Jaelre <drashna@live.com>2018-07-25 08:30:17 -0700
commitc531dfb6a778a70888a6638144e6475e45f48bac (patch)
treebae41565c5ef43b3b0beee2f18d98bedff202426 /keyboards/chocopad
parent4ac48a61a66206beaf2fdd5f2939d8bbedd0004c (diff)
downloadqmk_firmware-c531dfb6a778a70888a6638144e6475e45f48bac.tar.gz
qmk_firmware-c531dfb6a778a70888a6638144e6475e45f48bac.zip
keymap: Update khord let's split keymap and add chocopad keymap (#3482)
* modifications to add mouse buttons 1-4 and misc * Add khord chocopad keymap * fix merge message
Diffstat (limited to 'keyboards/chocopad')
-rw-r--r--keyboards/chocopad/keymaps/khord/config.h6
-rw-r--r--keyboards/chocopad/keymaps/khord/keymap.c104
-rw-r--r--keyboards/chocopad/keymaps/khord/rules.mk5
3 files changed, 115 insertions, 0 deletions
diff --git a/keyboards/chocopad/keymaps/khord/config.h b/keyboards/chocopad/keymaps/khord/config.h
new file mode 100644
index 0000000000..7fa3bf328e
--- /dev/null
+++ b/keyboards/chocopad/keymaps/khord/config.h
@@ -0,0 +1,6 @@
+#ifndef CONFIG_USER_H
+#define CONFIG_USER_H
+
+#include "../../config.h"
+
+#endif
diff --git a/keyboards/chocopad/keymaps/khord/keymap.c b/keyboards/chocopad/keymaps/khord/keymap.c
new file mode 100644
index 0000000000..ea36c6f640
--- /dev/null
+++ b/keyboards/chocopad/keymaps/khord/keymap.c
@@ -0,0 +1,104 @@
+#include "chocopad.h"
+
+#define _BASE 0
+#define _FN1 1
+#define _FN2 2
+
+// Fillers to make layering more clear
+#define KC_ KC_TRNS
+#define KC_XX KC_NO
+
+#define KC_L1 LT(1, KC_P0)
+#define KC_L2 LT(2, KC_SPC)
+#define KC_RST RESET
+#define KC_BSTP BL_STEP
+#define KC_RTOG RGB_TOG
+#define KC_RMOD RGB_MOD
+#define KC_RHUI RGB_HUI
+#define KC_RHUD RGB_HUD
+#define KC_RSAI RGB_SAI
+#define KC_RSAD RGB_SAD
+#define KC_RVAI RGB_VAI
+#define KC_RVAD RGB_VAD
+#define KC_MAC1 ADMIN
+#define KC_MAC2 SMSPC
+#define KC_M192 M192
+#define KC_M255 M255
+
+enum custom_keycodes {
+ NUMPAD = SAFE_RANGE,
+ ADMIN,
+ SMSPC,
+ M192,
+ M255
+};
+
+const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
+
+ [_BASE] = KC_KEYMAP(
+ //,----+----+----+----.
+ P7 , P8 , P9 ,BSPC,
+ //|----+----+----+----|
+ P4 , P5 , P6 ,TAB ,
+ //|----+----+----+----|
+ P1 , P2 , P3 ,PENT,
+ //|----+----+----+----|
+ L1 , L2 ,PDOT,PSLS
+ //`----+----+----+----'
+ ),
+
+ [_FN1] = KC_KEYMAP(
+ //,----+----+----+----.
+ ESC ,MAC1,MAC2,DEL ,
+ //|----+----+----+----|
+ LEFT,DOWN, UP ,RGHT,
+ //|----+----+----+----|
+ M192,M255, XX , XX ,
+ //|----+----+----+----|
+ , XX , , XX
+ //`----+----+----+----'
+ ),
+
+ [_FN2] = KC_KEYMAP(
+ //,----+----+----+----.
+ RST , XX , XX , XX ,
+ //|----+----+----+----|
+ RTOG,RHUI,RSAI,RVAI,
+ //|----+----+----+----|
+ RMOD,RHUD,RSAD,RVAD,
+ //|----+----+----+----|
+ BSTP, , XX , XX
+ //`----+----+----+----'
+ )
+
+};
+
+bool process_record_user(uint16_t keycode, keyrecord_t *record) {
+ switch (keycode) {
+ case ADMIN:
+ if (record->event.pressed) {
+ SEND_STRING("Administrator");
+ }
+ return false;
+ break;
+ case SMSPC:
+ if (record->event.pressed) {
+ SEND_STRING("Simspace1!");
+ }
+ return false;
+ break;
+ case M192:
+ if (record->event.pressed) {
+ SEND_STRING("192.168.");
+ }
+ return false;
+ break;
+ case M255:
+ if (record->event.pressed) {
+ SEND_STRING("255");
+ }
+ return false;
+ break;
+ }
+ return true;
+};
diff --git a/keyboards/chocopad/keymaps/khord/rules.mk b/keyboards/chocopad/keymaps/khord/rules.mk
new file mode 100644
index 0000000000..1e57612788
--- /dev/null
+++ b/keyboards/chocopad/keymaps/khord/rules.mk
@@ -0,0 +1,5 @@
+RGBLIGHT_ENABLE = yes
+
+ifndef QUANTUM_DIR
+ include ../../../../Makefile
+endif