Skip to content

Commit

Permalink
keymap: Update khord let's split keymap and add chocopad keymap (qmk#…
Browse files Browse the repository at this point in the history
…3482)

* modifications to add mouse buttons 1-4 and misc

* Add khord chocopad keymap

* fix merge message
  • Loading branch information
khord authored and drashna committed Jul 25, 2018
1 parent 4ac48a6 commit c531dfb
Show file tree
Hide file tree
Showing 5 changed files with 124 additions and 4 deletions.
6 changes: 6 additions & 0 deletions keyboards/chocopad/keymaps/khord/config.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#ifndef CONFIG_USER_H
#define CONFIG_USER_H

#include "../../config.h"

#endif
104 changes: 104 additions & 0 deletions keyboards/chocopad/keymaps/khord/keymap.c
Original file line number Diff line number Diff line change
@@ -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;
};
5 changes: 5 additions & 0 deletions keyboards/chocopad/keymaps/khord/rules.mk
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
RGBLIGHT_ENABLE = yes

ifndef QUANTUM_DIR
include ../../../../Makefile
endif
3 changes: 3 additions & 0 deletions keyboards/lets_split/keymaps/khord/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.

#define TAPPING_TERM 150

/* prevent stuck modifiers */
#define PREVENT_STUCK_MODIFIERS

/* Use I2C or Serial, not both */

#define USE_SERIAL
Expand Down
10 changes: 6 additions & 4 deletions keyboards/lets_split/keymaps/khord/keymap.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ enum {
// Dylan's additions
#define C_A_DEL LALT(LCTL(KC_DEL))
#define C_A_INS LALT(LCTL(KC_INS))
//#define MAC_LOK S(LCTL(KC_PWR))
#define MAC_LOK LCTL(LGUI(KC_Q))

const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {

Expand Down Expand Up @@ -64,8 +66,8 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
[_LOWER] = LAYOUT( \
KC_TILD, KC_EXLM, KC_AT, KC_HASH, KC_DLR, KC_PERC, KC_CIRC, KC_AMPR, KC_ASTR, KC_LPRN, KC_RPRN, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_UNDS, KC_PLUS, KC_LCBR, KC_RCBR, KC_PIPE, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_END, KC_HOME, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, MAC_LOK, _______, KC_END, KC_HOME, _______, \
LCTL(KC_UP), KC_BTN3, KC_BTN2, KC_BTN1, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
),

/* Raise
Expand All @@ -76,14 +78,14 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* |------+------+------+------+------+------|------+------+------+------+------+------|
* | | F7 | F8 | F9 | F10 | F11 | F12 | | |PG DN |PG UP |Enter |
* |------+------+------+------+------+------+------+------+------+------+------+------|
* | | | | | | | | Next | Vol- | Vol+ | Play |
* | | | | | | | | MB1 | MB2 | MB3 | MB4 |
* `-----------------------------------------------------------------------------------'
*/
[_RAISE] = LAYOUT( \
KC_GRV, KC_1, KC_2, KC_3, KC_4, KC_5, KC_6, KC_7, KC_8, KC_9, KC_0, KC_BSPC, \
KC_DEL, KC_F1, KC_F2, KC_F3, KC_F4, KC_F5, KC_F6, KC_MINS, KC_EQL, KC_LBRC, KC_RBRC, KC_BSLS, \
_______, KC_F7, KC_F8, KC_F9, KC_F10, KC_F11, KC_F12, _______, _______, KC_PGDN, KC_PGUP, _______, \
_______, _______, _______, _______, _______, _______, _______, _______, KC_MNXT, KC_VOLD, KC_VOLU, KC_MPLY \
_______, _______, _______, _______, _______, _______, _______, _______, KC_BTN1, KC_BTN2, KC_BTN3, KC_BTN4 \
),

/* Adjust (Lower + Raise)
Expand Down

0 comments on commit c531dfb

Please sign in to comment.