2018-07-05 02:59:35 +02:00
|
|
|
#include QMK_KEYBOARD_H
|
2017-10-05 19:22:58 +02:00
|
|
|
|
|
|
|
extern keymap_config_t keymap_config;
|
|
|
|
|
|
|
|
#define _NP 0
|
|
|
|
#define _L1 1
|
|
|
|
#define _L2 2
|
|
|
|
|
|
|
|
enum custom_keycodes {
|
|
|
|
NUMPAD = SAFE_RANGE,
|
|
|
|
ADMIN,
|
|
|
|
SMSPC1,
|
|
|
|
STR192,
|
|
|
|
STR255
|
|
|
|
};
|
|
|
|
|
|
|
|
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
|
|
|
|
|
2018-07-05 02:59:35 +02:00
|
|
|
/* Numpad
|
|
|
|
* ,-----------------------.
|
|
|
|
* | 7 | 8 | 9 |Bksp |
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | 4 | 5 | 6 | Tab |
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | 1 | 2 | 3 |Enter|
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | 0 |Space| . | / |
|
|
|
|
* `-----`-----`-----`-----'
|
|
|
|
* | L1 | L2 | | | Layer hold
|
|
|
|
*/
|
|
|
|
[_NP] = LAYOUT_ortho_4x4( /* Numpad */
|
2022-12-30 01:48:05 +01:00
|
|
|
KC_P7, KC_P8, KC_P9, KC_BSPC,
|
|
|
|
KC_P4, KC_P5, KC_P6, KC_TAB,
|
|
|
|
KC_P1, KC_P2, KC_P3, KC_PENT,
|
2018-07-05 02:59:35 +02:00
|
|
|
LT(1, KC_P0), LT(2, KC_SPC), KC_PDOT, KC_PSLS
|
|
|
|
),
|
2017-10-05 19:22:58 +02:00
|
|
|
|
2018-07-05 02:59:35 +02:00
|
|
|
/* L1
|
|
|
|
* ,-----------------------.
|
|
|
|
* |Reset| | | Del |
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | Left| Down| Up |Right|
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | 192.| 255 | | |
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* |_____| LED | . | |
|
|
|
|
* `-----`-----`-----`-----'
|
|
|
|
*/
|
|
|
|
[_L1] = LAYOUT_ortho_4x4( /* LAYER 1 */
|
2022-12-30 01:48:05 +01:00
|
|
|
QK_BOOT, XXXXXXX, XXXXXXX, KC_DEL,
|
|
|
|
KC_LEFT, KC_DOWN, KC_UP, KC_RGHT,
|
|
|
|
STR192, STR255, XXXXXXX, XXXXXXX,
|
2018-07-05 02:59:35 +02:00
|
|
|
_______, BL_STEP, _______, XXXXXXX
|
|
|
|
),
|
|
|
|
|
|
|
|
/* L2
|
|
|
|
* ,-----------------------.
|
|
|
|
* | | | str | str |
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | | | | |
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | | | | |
|
|
|
|
* |-----`-----`-----`-----|
|
|
|
|
* | |_____| | |
|
|
|
|
* `-----`-----`-----`-----'
|
|
|
|
*/
|
|
|
|
[_L2] = LAYOUT_ortho_4x4( /* LAYER 2 */
|
2022-12-30 01:48:05 +01:00
|
|
|
XXXXXXX, XXXXXXX, ADMIN, SMSPC1,
|
|
|
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
|
|
|
XXXXXXX, XXXXXXX, XXXXXXX, XXXXXXX,
|
2018-07-05 02:59:35 +02:00
|
|
|
XXXXXXX, _______, XXXXXXX, XXXXXXX
|
|
|
|
)
|
2017-10-05 19:22:58 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
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) {
|
2018-07-05 02:59:35 +02:00
|
|
|
SEND_STRING("Administrator");
|
2017-10-05 19:22:58 +02:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
case SMSPC1:
|
|
|
|
if (record->event.pressed) {
|
2018-07-05 02:59:35 +02:00
|
|
|
SEND_STRING("Simspace1!");
|
2017-10-05 19:22:58 +02:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
case STR192:
|
|
|
|
if (record->event.pressed) {
|
2018-07-05 02:59:35 +02:00
|
|
|
SEND_STRING("192.168.");
|
2017-10-05 19:22:58 +02:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
case STR255:
|
|
|
|
if (record->event.pressed) {
|
2018-07-05 02:59:35 +02:00
|
|
|
SEND_STRING("255");
|
2017-10-05 19:22:58 +02:00
|
|
|
}
|
|
|
|
return false;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return true;
|
|
|
|
};
|