mirror of
https://github.com/Keychron/qmk_firmware.git
synced 2024-11-23 17:06:52 +06:00
Adding my Roadkit keymap (#1798)
* Initial khord roadkit keymap * Remove bad readme * Transfer dot through to layer 2 and add clarifications to layout comments
This commit is contained in:
parent
0cc62459a7
commit
e446eddca9
15
keyboards/roadkit/keymaps/khord/config.h
Normal file
15
keyboards/roadkit/keymaps/khord/config.h
Normal file
|
@ -0,0 +1,15 @@
|
|||
#ifndef CONFIG_USER_H
|
||||
#define CONFIG_USER_H
|
||||
|
||||
#include "../../config.h"
|
||||
|
||||
// place overrides here
|
||||
#define TAPPING_TERM 175
|
||||
|
||||
#ifdef BACKLIGHT_ENABLE
|
||||
#define BACKLIGHT_PIN B5
|
||||
#define BACKLIGHT_LEVELS 3
|
||||
#define BACKLIGHT_ON_STATE 0
|
||||
#endif
|
||||
|
||||
#endif
|
111
keyboards/roadkit/keymaps/khord/keymap.c
Normal file
111
keyboards/roadkit/keymaps/khord/keymap.c
Normal file
|
@ -0,0 +1,111 @@
|
|||
#include "roadkit.h"
|
||||
#include "action_layer.h"
|
||||
#include "eeconfig.h"
|
||||
|
||||
extern keymap_config_t keymap_config;
|
||||
|
||||
#define _NP 0
|
||||
#define _L1 1
|
||||
#define _L2 2
|
||||
|
||||
// Fillers to make layering more clear
|
||||
#define _______ KC_TRNS
|
||||
#define XXXXXXX KC_NO
|
||||
|
||||
enum custom_keycodes {
|
||||
NUMPAD = SAFE_RANGE,
|
||||
ADMIN,
|
||||
SMSPC1,
|
||||
STR192,
|
||||
STR255
|
||||
};
|
||||
|
||||
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
||||
|
||||
/* Numpad
|
||||
* ,-----------------------.
|
||||
* | 7 | 8 | 9 |Bksp |
|
||||
* |-----`-----`-----`-----|
|
||||
* | 4 | 5 | 6 | Tab |
|
||||
* |-----`-----`-----`-----|
|
||||
* | 1 | 2 | 3 |Enter|
|
||||
* |-----`-----`-----`-----|
|
||||
* | 0 |Space| . | / |
|
||||
* `-----`-----`-----`-----'
|
||||
* | L1 | L2 | | | Layer hold
|
||||
*/
|
||||
[_NP] = /* Numpad */
|
||||
SINGLES_KEYMAP(KC_P7, KC_P8, KC_P9, KC_BSPC, \
|
||||
KC_P4, KC_P5, KC_P6, KC_TAB, \
|
||||
KC_P1, KC_P2, KC_P3, KC_PENT, \
|
||||
LT(1, KC_P0), LT(2, KC_SPC), KC_PDOT, KC_PSLS),
|
||||
|
||||
/* L1
|
||||
* ,-----------------------.
|
||||
* |Reset| | | Del |
|
||||
* |-----`-----`-----`-----|
|
||||
* | Left| Down| Up |Right|
|
||||
* |-----`-----`-----`-----|
|
||||
* | 192.| 255 | | |
|
||||
* |-----`-----`-----`-----|
|
||||
* |_____| LED | . | |
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_L1] = /* LAYER 1 */
|
||||
SINGLES_KEYMAP(RESET, XXXXXXX, XXXXXXX, KC_DEL, \
|
||||
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT, \
|
||||
STR192, STR255, XXXXXXX, XXXXXXX, \
|
||||
_______, BL_STEP, _______, XXXXXXX),
|
||||
|
||||
/* L2
|
||||
* ,-----------------------.
|
||||
* | | | str | str |
|
||||
* |-----`-----`-----`-----|
|
||||
* | | | | |
|
||||
* |-----`-----`-----`-----|
|
||||
* | | | | |
|
||||
* |-----`-----`-----`-----|
|
||||
* | |_____| | |
|
||||
* `-----`-----`-----`-----'
|
||||
*/
|
||||
[_L2] = /* LAYER 2 */
|
||||
SINGLES_KEYMAP(XXXXXXX, XXXXXXX, ADMIN, SMSPC1, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX, \
|
||||
XXXXXXX, _______, XXXXXXX, XXXXXXX)
|
||||
};
|
||||
|
||||
void persistent_default_layer_set(uint16_t default_layer) {
|
||||
eeconfig_update_default_layer(default_layer);
|
||||
default_layer_set(default_layer);
|
||||
}
|
||||
|
||||
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 SMSPC1:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("Simspace1!");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case STR192:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("192.168.");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
case STR255:
|
||||
if (record->event.pressed) {
|
||||
SEND_STRING("255");
|
||||
}
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
return true;
|
||||
};
|
22
keyboards/roadkit/keymaps/khord/rules.mk
Normal file
22
keyboards/roadkit/keymaps/khord/rules.mk
Normal file
|
@ -0,0 +1,22 @@
|
|||
# Build Options
|
||||
# change to "no" to disable the options, or define them in the Makefile in
|
||||
# the appropriate keymap folder that will get included automatically
|
||||
#
|
||||
BOOTMAGIC_ENABLE = no # Virtual DIP switch configuration(+1000)
|
||||
MOUSEKEY_ENABLE = yes # Mouse keys(+4700)
|
||||
EXTRAKEY_ENABLE = yes # Audio control and System control(+450)
|
||||
CONSOLE_ENABLE = no # Console for debug(+400)
|
||||
COMMAND_ENABLE = yes # Commands for debug and configuration
|
||||
NKRO_ENABLE = yes # Nkey Rollover - if this doesn't work, see here: https://github.com/tmk/tmk_keyboard/wiki/FAQ#nkro-doesnt-work
|
||||
BACKLIGHT_ENABLE = yes # Enable keyboard backlight functionality
|
||||
MIDI_ENABLE = no # MIDI controls
|
||||
AUDIO_ENABLE = no # Audio output on port C6
|
||||
UNICODE_ENABLE = no # Unicode
|
||||
BLUETOOTH_ENABLE = no # Enable Bluetooth with the Adafruit EZ-Key HID
|
||||
RGBLIGHT_ENABLE = no # Enable WS2812 RGB underlight. Do not enable this with audio at the same time.
|
||||
SLEEP_LED_ENABLE = no # Breathing sleep LED during USB suspend
|
||||
TAP_DANCE_ENABLE = no # Enable Tap Dance functionality
|
||||
|
||||
ifndef QUANTUM_DIR
|
||||
include ../../../../Makefile
|
||||
endif
|
Loading…
Reference in New Issue
Block a user