Compare commits

..

No commits in common. "5b697beacb559a94e8dd7a8f14ea7dc66f4f37cc" and "bf3e3b4d3ee322183b0403cfd2134c375e05faef" have entirely different histories.

3 changed files with 47 additions and 51 deletions

View File

@ -1,16 +0,0 @@
all: clean build flash
clean:
rm qmk_firmware/ktec_ergodone_dejvino.hex
build: qmk_firmware/ktec_ergodone_dejvino.hex
flash: build | hid_bootloader_cli
sudo ./hid_bootloader_cli -mmcu=atmega32u4 qmk_firmware/ktec_ergodone_dejvino.hex
qmk_firmware/ktec_ergodone_dejvino.hex:
cd qmk_firmware && make ktec/ergodone:dejvino
hid_bootloader_cli:
wget https://raw.githubusercontent.com/kairyu/tkg-toolkit/master/linux/bin/hid_bootloader_cli -O hid_bootloader_cli
chmod +x hid_bootloader_cli

View File

@ -1,26 +1,30 @@
# Dejvino's ErgoDone Keyboard Firmware
## Setup
## Compile
1. Clone this repo in recursive mode (with submodules): `git clone --recurse-submodules <url>`
2. Setup QMK (see [docs](https://docs.qmk.fm/#/newbs_getting_started))
1. Install qmk helper: `python3 -m pip install --user qmk`
2. Run the setup: `qmk setup`
3. Install Dejvino's keyboard layout: `ln -s $(pwd)../keymap keyboards/ktec/ergodone/keymaps/dejvino`
## Compile
Run `make build`.
3. Compile (inside `qmk_firmware`)
1. default ErgoDone keyboard (optional): `make ktec/ergodone:default`
2. link Dejvino's keyboard layout: `ln -s $(pwd)../keymap keyboards/ktec/ergodone/keymaps/dejvino`
3. Dejvino's ErgoDone keyboard layout: `make ktec/ergodone:dejvino`
## Flash
If you're not on Linux, download the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) flashing utility for your system manually, otherwise let `make` do it.
(see [ErgoDone Readme](./qmk_firmware/keyboards/ktec/ergodone/readme.md))
1. Enter flashing mode
1. Disconnect KBD
2. Press and hold two top-right-most keys on the left-half KBD
3. Connect KBD (LEDs will be blinking)
2. Run `make flash`. (Tip: just run `make` to compile & flash)
Get the [TKG Toolkit](https://github.com/kairyu/tkg-toolkit) flashing utility: `wget https://raw.githubusercontent.com/kairyu/tkg-toolkit/master/linux/bin/hid_bootloader_cli -O hid_bootloader_cli && chmod +x hid_bootloader_cli`
(see [ErgoDone Readme](https://github.com/qmk/qmk_firmware/blob/master/keyboards/ktec/ergodone/readme.md) for details)
### Enter flashing mode
1. Disconnect KBD
2. Press and hold two top-right-most keys on the left-half KBD
3. Connect KBD (LEDs will be blinking)
### Flashing
1. `sudo ./hid_bootloader_cli -mmcu=atmega32u4 qmk_firmware/ktec_ergodone_dejvino.hex`
2. Disconnect & connect KBD
## Resources
- [QMK Firmware](https://github.com/qmk/qmk_firmware)
- [TKG Toolkit](https://github.com/kairyu/tkg-toolkit)
- [ErgoDone Readme](./qmk_firmware/keyboards/ktec/ergodone/readme.md)

View File

@ -11,11 +11,14 @@
enum custom_keycodes {
PLACEHOLDER = SAFE_RANGE, // can always be here
VRSN,
DYNAMIC_MACRO_RANGE
};
#include "dynamic_macro.h"
// [Info]
// Meh = LCtrl + LAlt + LShift
// L_X = Layer X
const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
/* Keymap 0: WORKMAN-D Basic layer
@ -34,7 +37,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* ,-------------. ,-------------.
* |L_NUMB| ` | | Home | End |
* ,------|------|------| |------+------+------.
* | | | Alt | | PgUp | | |
* | | | App | | PgUp | | |
* | Space|Backsp|------| |------| Del |Enter |
* | |ace | LCmd | | PgDn | | |
* `--------------------' `--------------------'
@ -76,7 +79,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
* | | | | 0 | . | | | | | | |
* `-----------------------------------' `----------------------------------'
* ,-------------. ,-------------
* | |NLock | | | |
* | | | | | |
* ,------|------|------| |------+------+------.
* | | | | | | | |
* | | |------| |------| | |
@ -91,7 +94,7 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
_______,_______,_______,KC_KP_4,KC_KP_5,KC_KP_6,
_______,_______,_______,KC_KP_1,KC_KP_2,KC_KP_3,KC_KP_ENTER,
_______,_______,_______,KC_KP_0,KC_KP_DOT,
_______,KC_NUM_LOCK,
_______,_______,
_______,
_______,_______,_______,
// right hand
@ -149,21 +152,30 @@ const uint16_t PROGMEM keymaps[][MATRIX_ROWS][MATRIX_COLS] = {
};
int capslock = 0;
int numlock = 0;
const uint16_t PROGMEM fn_actions[] = {
[1] = ACTION_LAYER_TAP_TOGGLE(NUMB), // FN1 - Momentary Layer 1 (Numbers)
};
bool led_update_user(led_t led_state) {
// Following disables the default LED indicators:
bool process_record_user(uint16_t keycode, keyrecord_t *record) {
if (!process_record_dynamic_macro(keycode, record)) {
return false;
}
switch (keycode) {
case VRSN:
if (record->event.pressed) {
SEND_STRING (" <[ Dejvino's Keyboard ]> ");
}
return false;
break;
}
return true;
}
bool led_update_kb(led_t led_state) {
numlock = led_state.num_lock;
capslock = led_state.caps_lock;
// Following disables the default LED indicators:
return false;
}
/**/
// Runs just one time when the keyboard initializes.
void matrix_init_user(void) {
//set_unicode_input_mode(UC_LINX);
};
// Runs constantly in the background, in a loop.
void matrix_scan_user(void) {
@ -174,22 +186,18 @@ void matrix_scan_user(void) {
ergodox_right_led_1_off();
ergodox_right_led_2_off();
ergodox_right_led_3_off();
switch (layer) {
case FNCK:
ergodox_board_led_on();
ergodox_right_led_1_on();
break;
case NUMB:
ergodox_board_led_on();
if (numlock) {
ergodox_right_led_1_on();
}
ergodox_right_led_2_on();
break;
default:
if (capslock) {
ergodox_right_led_2_on();
}
// none
break;
}